Results 1 to 10 of 15

Hybrid View

  1. #1
    Join Date
    Aug 2009
    Posts
    31
    Plugin Contributions
    0

    Default How to Integrate ShareASale tracking code?

    I'm using ZenCart 1.3.8a and am using PayPal Website Payments Standard for all transactions. It is set up so that the customer returns to my site, to a Thank You page, after payment on PayPal has been made. I'm trying to implement ShareASale affiliate tracking code, but am at a loss.

    The ShareASale site provides this info for integration:

    Tracking Code details for PayPal Website Payments Standard

    Unfortunately, integrating with PayPal Website Payments Standard is more difficult than most shopping carts. You will need to setup their Payment Data Transfer system before integrating with ShareASale. See PayPal's documentation and sample code here:

    https://www.paypal.com/cgi-bin/websc...-intro-outside

    Unfortunately, ShareASale is unable to help in setting up the Payment Data Transfer system. If you require assistance you should contact PayPal directly.

    Once you have the Payment Data Transfer system running, you can use the following tracking codes in your Auto-Return script:

    ASP
    Response.Write("<img src=""https://shareasale.com/sale.cfm?amount=" & mcGross & "&tracking=" & txToken & "&transtype=SALE&merchantID=XXXX"" width=""1"" height=""1"">")

    PHP
    echo ("<img src=\"https://shareasale.com/sale.cfm?amount=$amount&tracking=$tx_token&transtype=SALE&merchantID =XXXX\" width=\"1\" height=\"1\">");

    Where you replace XXXX with your ShareASale merchant ID number.


    For how to install with ZenCart, they provide this:

    Tracking Code details for ZenCart for ZenCart version 1.3.8 and higher:

    You will be marking changes to the following file:

    /includes/templates/DEFAULT/checkout_success/tpl_footer.php

    Where DEFAULT is the name of the current template group that you are using. If the checkout_success folder does not exist, you can create it. If the tpl_footer.php file does not exist, you can create it. Add the following code to the tpl_footer.php page:

    <font face="trebuchet ms, verdana" point-size="10" size="-1">&lt;?php if (isset($zv_orders_id) &amp;&amp; (int)$zv_orders_id &gt; 0 &amp;&amp; isset($order_summary) &amp;&amp; is_array($order_summary)) { if (!isset($_SESSION['affiliate_order_id']) || $_SESSION['affiliate_order_id'] != $zv_orders_id ) { $_SESSION['affiliate_order_id'] = $zv_orders_id; $commissionable_order_formatted = number_format($order_summary['commissionable_order'], 2, '.', ''); echo '&lt;img src="https://shareasale.com/sale.cfm?amount=' . $commissionable_order_formatted . '&amp;tracking=' . $order_summary['order_number'] . '&amp;transtype=sale&amp;merchantID=XXXX" width="1" height="1"&gt;'; } } ?&gt;

    Where you replace XXXX with your merchant ID number. </font>

    I have tried placing both versions of code in my tpl_footer.php file which is located in a checkout_success folder. I have tested both, but neither test is being recognized by ShareASale.

    Do I need to add any other code to the tpl_footer.php or any other file? If so, can someone direct me on what to do?

    my site is: www.pennylanepapersgiftbags.com

    thanks so much!

  2. #2
    Join Date
    Jan 2004
    Posts
    66,445
    Plugin Contributions
    81

    Default Re: How to Integrate ShareASale tracking code?

    The instructions they've given for Zen Cart sites are correct.
    Maybe you've not put it in the right folder/file path?

    Test it: when you get to the checkout-success page, look at the raw HTML in your browser. Is the code they told you to add showing up there? If not, you've put the code in the wrong place. If it *is* present, inspect the numbers/values in it, and see whether you're getting valid order numbers and amounts. If not, you've got other customizations conflicting. If yes, then something's wrong on the shareasale end.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Aug 2009
    Posts
    31
    Plugin Contributions
    0

    Default Re: How to Integrate ShareASale tracking code?

    Thanks!

    I tried again, and when I add the code for Zen Cart, the page source shows this (which is nothing):

    <!--ShareASale tracking code -->

    <!--End ShareASale tracking code -->

    When I use the code for PayPal Website Payments Standard, the page source shows this (the X's after merchantID is my merchant number which shows properly; I removed it for this post):

    <!--ShareASale tracking code -->

    echo
    ("&lt;img
    src=\"https://shareasale.com/sale.cfm?amount=$amount&amp;tracking=$tx_token&amp;transtype=SALE&amp;merchantID =XXXXX\"
    width=\"1\" height=\"1\"&gt;");


    <!--End ShareASale tracking code -->

    Nothing is registering on the ShareASale end.

    Any thoughts as to what I need to do? Appreciate your help!

  4. #4
    Join Date
    Jan 2004
    Posts
    66,445
    Plugin Contributions
    81

    Default Re: How to Integrate ShareASale tracking code?

    Quote Originally Posted by pennylane View Post
    I tried again, and when I add the code for Zen Cart, the page source shows this (which is nothing):

    <!--ShareASale tracking code -->

    <!--End ShareASale tracking code -->
    That doesn't make sense at all ... because if you've added the <!-- ShareASale ... stuff to the tpl_footer file (you'd have to, since Zen Cart doesn't know about it otherwise) then you should *also* be seeing the <font ... stuff you also added.
    Quote Originally Posted by pennylane View Post
    When I use the code for PayPal Website Payments Standard, the page source shows this (the X's after merchantID is my merchant number which shows properly; I removed it for this post):

    <!--ShareASale tracking code -->

    echo
    ("&lt;img
    src=\"https://shareasale.com/sale.cfm?amount=$amount&amp;tracking=$tx_token&amp;transtype=SALE&amp;merchantID =XXXXX\"
    width=\"1\" height=\"1\"&gt;");


    <!--End ShareASale tracking code -->
    That code is intended for sites that don't have an advanced automated interaction with PayPal like Zen Cart does.
    You should be ignoring the PayPal-specific instructions they've given you unless you're using something other than Zen Cart.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #5
    Join Date
    Aug 2009
    Posts
    31
    Plugin Contributions
    0

    Default Re: How to Integrate ShareASale tracking code?

    thanks. I'll try adding the code specific to Zen Cart again, maybe i missed something.

  6. #6
    Join Date
    Aug 2009
    Posts
    31
    Plugin Contributions
    0

    Default Re: How to Integrate ShareASale tracking code?

    well i tried the PayPal code again, and it still doesn't show in the page source and it's not being recognized by ShareASale. Do I need to define any of items in the ShareASale code string in ZenCart? And if so, how/where would I do that?

    again, this is the code I've added to the tpl_footer.php file (I've replaced my merchant code with X's in this post):

    <?php if (isset($zv_orders_id) && (int)$zv_orders_id > 0 && isset($order_summary) && is_array($order_summary)) { if (!isset($_SESSION['affiliate_order_id']) || $_SESSION['affiliate_order_id'] != $zv_orders_id ) { $_SESSION['affiliate_order_id'] = $zv_orders_id; $commissionable_order_formatted = number_format($order_summary['commissionable_order'], 2, '.', ''); echo '<img src="https://shareasale.com/sale.cfm?amount=' . $commissionable_order_formatted . '&tracking=' . $order_summary['order_number'] . '&transtype=sale&merchantID=XXXXX" width="1" height="1">'; } } ?>

  7. #7
    Join Date
    Jan 2004
    Posts
    66,445
    Plugin Contributions
    81

    Default Re: How to Integrate ShareASale tracking code?

    Quote Originally Posted by pennylane View Post
    I'm using ZenCart 1.3.8a and am using PayPal Website Payments Standard for all transactions. It is set up so that the customer returns to my site, to a Thank You page, after payment on PayPal has been made.
    Oh ... I misread that you're using Standard. Now I see why you were intent on using the PayPal code they suggested, even though it's not suitable for Zen Cart sites.
    It's very complicated to get Standard to work reliably ... especially with affiliate programs.
    It's MAJORLY simpler if you're using Express Checkout. ie: if you turn off Standard and turn on Express (and configure it: http://www.zen-cart.com/getpaypal ), your affiliate code will work fine.

    What's happening now is likely that you're testing on a site that's not getting proper communication back from PayPal to release your orders, and thus the affiliate system isn't able to produce any information because there's nothing for it to pass forward. I'm pretty sure it's failing because it's seeing an order-number of 0 because PayPal's background IPN process isn't completing properly on your site.
    While you should still get the IPN process fixed (http://www.zen-cart.com/wiki/index.php/PayPal ) in order to have refunds etc reflected in your store, I strongly recommend using Express Checkout instead.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  8. #8
    Join Date
    Aug 2009
    Posts
    31
    Plugin Contributions
    0

    Default Re: How to Integrate ShareASale tracking code?

    Thank you so much!!

    I switched to PayPal Express and ShareASale is capturing the info.

  9. #9
    Join Date
    Jan 2004
    Posts
    66,445
    Plugin Contributions
    81

    Default Re: How to Integrate ShareASale tracking code?

    Quote Originally Posted by pennylane View Post
    Thank you so much!!

    I switched to PayPal Express and ShareASale is capturing the info.
    I'm glad that sorted it out for you.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. Replies: 22
    Last Post: 20 Sep 2021, 02:38 AM
  2. How/Where do I install Conversion Tracking Code
    By boy1da in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 15 Mar 2011, 04:33 PM
  3. Replies: 5
    Last Post: 27 May 2009, 07:50 PM
  4. How do I put a Google tracking code in my checkout-success file?
    By kevinmc3 in forum Templates, Stylesheets, Page Layout
    Replies: 10
    Last Post: 25 Jul 2008, 07:52 PM
  5. Integrate payment gateway code
    By sunny747 in forum Addon Payment Modules
    Replies: 1
    Last Post: 16 Mar 2007, 08:07 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg