Page 1 of 2 12 LastLast
Results 1 to 10 of 28

Hybrid View

  1. #1
    Join Date
    Nov 2008
    Posts
    71
    Plugin Contributions
    0

    Default Where to put my Affiliate Tracking Code??

    Company Name: Payne-Mason
    ZenCart: v1.3.7

    I have the following javascript code for some affiliate tracking and I'm having problems identifying where and what file I need to insert this into:

    <!-- Payne-Mason Tag Begins Here -->

    <script language='Javascript'>

    document.write( '<scr'+'ipt language="Javascript" src="' );

    if( document.location.toString().indexOf( 'https://' ) != -1 ){ document.write( 'https' ); } else { document.write( 'http' ); }

    document.write( '://hits.affiliatetraction.com/cgi-bin/convert?js=1&offer=4656&amount=[DYNAMIC AMOUNT]&uid=[UNIQUE TRANSACTION ID]"><\/scr'+'ipt>' );

    </script>

    <noscript><img src='http://hits.affiliatetraction.com/cgi-bin/convert?offer=4656&amount=[DYNAMIC AMOUNT]&uid=[UNIQUE TRANSACTION ID]' border=0 width=1 height=1></noscript>

    <!-- Payne-Mason Tag Ends Here -->

    Any insight would be awesome... everywhere I've tried to insert it...it messes up the file/page I inserted it into...

  2. #2

    Default Re: Where to put my Affiliate Tracking Code??

    It will go in the tpl_main_page.php located in your template folder.

    Code:
    http://www.yoursite.com/includes/templates/YOUR_TEMPLATE/common/tpl_main_page.php
    Karl

  3. #3
    Join Date
    Nov 2008
    Posts
    71
    Plugin Contributions
    0

    Default Re: Where to put my Affiliate Tracking Code??

    Phoenix you are AWESOME! Thank you!! It works! I just don't know what the Dynamic Tags are for [Customer ID #] and [Transaction #] for the order? Any idea what those are so the script can identify and send that info through? Thanks Again!

  4. #4
    Join Date
    Jul 2005
    Posts
    537
    Plugin Contributions
    0

    Default Re: Where to put my Affiliate Tracking Code??

    Actually, if you're tracking only from the checkout-success page, you need to take it out of the tpl-main-page file (since that's used on *every* page), and put it into a copy of tpl_footer.php that you store in a new folder, like this: /includes/templates/YOUR_TEMPLATE/checkout_success/tpl_footer.php
    Then you can substitute those dynamic pieces for the data available on that page.

    You can see an example of that on the JROX JAM website where it talks about integration with Zen Cart.

  5. #5
    Join Date
    Nov 2008
    Posts
    71
    Plugin Contributions
    0

    Default Transaction ammount and ID identifiers??

    Does anyone know what the code or tag for Transaction ID (order #) and also Transaction ammount (subtotal $ for the order) ... I have a software code to track the order and need to imput these 2 things..

    [DYNAMIC AMOUNT]
    [UNIQUE TRANSACTION ID]

    I have tested it a couple times but keep inserting the wrong identifiers

  6. #6
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Transaction ammount and ID identifiers??

    chuck's suggestion above will point you to code that does the same sort of thing for an afffiliate manager already integrated for Zen Cart.


    Namely:
    - $order_summary['commissionable_order']
    - $order_summary['order_number']
    respectively.
    .

    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.

  7. #7
    Join Date
    Nov 2008
    Posts
    71
    Plugin Contributions
    0

    Default Re: Where to put my Affiliate Tracking Code??

    Yeah, I looked into Chuck's suggestion and tried it too, but unless you are using the Affiliate Software he referances... it is no good. I am using a different kind. Are you suggesting all I need to do is put [commisionable_order] and [order_number] in the tags for my purposes? Thanks,

    Dan

  8. #8
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Where to put my Affiliate Tracking Code??

    If you do it on tpl_footer.php in a checkout_success override folder, then you would use the variable names exactly as I mentioned them:

    $order_summary['commissionable_order']
    and
    $order_summary['order_number']
    .

    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.

  9. #9
    Join Date
    Nov 2008
    Posts
    71
    Plugin Contributions
    0

    Default Re: Where to put my Affiliate Tracking Code??

    Thanks, I only have one more question for this thread,
    Do I have to make any adustments to the code or module, or if I put a /checkout_success new folder with a tpl.footer.php file (with the inputs you reccomended... will the zencart automatically figure out that there is a new folder and file it needs to read? Sorry if this is a dumb question, I am just learning about .php and zencart. I am hoping someday soon I will be able to help others like I am being helped!

    p.s.- my affiliate code asks for me to adjust/imput : [UNIQUE TRANSACTION ID] into the code--should I put just the ['order_number'] in there or the whole [$order_summary['order_number']]

  10. #10
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Where to put my Affiliate Tracking Code??

    Quote Originally Posted by danwebman View Post
    ZenCart: v1.3.7
    Seems I missed the fact that you're talking about v1.3.7.
    The specific variables I gave you are for 1.3.8, as a number of enhancements were added in that version to give better tracking capability.

    For v1.3.7 you'll need:

    $commissionable_order (for the amount)
    $insert_id (for the order number)


    You'd use them like this:

    <?php echo $commissionable_order; ?>
    <?php echo $insert_id; ?>
    .

    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.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Where to put google analytics tracking code???
    By cmike in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 23 Apr 2014, 08:05 AM
  2. where 2 put PaidOnResults affiliate tracking code
    By barricades in forum General Questions
    Replies: 8
    Last Post: 20 Oct 2010, 12:52 PM
  3. Replies: 5
    Last Post: 27 May 2009, 07:50 PM
  4. Where do I put a tracking pixel for an affilaite network?
    By beejeebers in forum General Questions
    Replies: 2
    Last Post: 27 Nov 2008, 01:48 PM
  5. 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

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