Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2009
    Posts
    46
    Plugin Contributions
    0

    Default Affiliate Code Question

    I'm using Zen Cart 1.3.8a, it is a basic install with no add ons, besides a new template.

    I'm only offering a couple things, a service and a download file so I have nothing to ship, and integrated SonicFog's affiliate program.

    The affiliate is pretty simple and uses cookies. I placed a line of code in my index.php page so when someone clicks the affiliate link and goes to my home page, it places a cookie on their computer with code that says, who, what and how much they earn. Now when a purchase is completed I need to add another line into the php on the final page that says the order was completed, that way the affiliate will earn their credit.

    I'm using Paypal express. What php page should I add this other line into that shows the order was completed. Normally it would go into a thank you page.

    I'm thinking it should be the ipn_main_handler.php because that is what I set at Paypal to return to once the sale is finished, and if it is this page, where on it should it go? The line I need to add is-
    include_once "../affiliate/sale.php";

    Thanks,
    Dan

    If anyone is curious about the affiliate code, and wants to use it, it wasn't complete and needed a lot of work to get going, and isn't usefull if you have a lot of products, because of the cookies, whatever affiliate product link the user clicked to get to your site is the only product the affiliate will get paid for, that is, if purchased. So if someone purchases additional items only the one item will be paid a commission on.

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Affiliate Code Question

    I would not mess in the ipn code...
    Not withstanding what payment method is used there is a ZenCart "Success" page loaded after a successful transaction is completed...

    /includes/templates/template_default/templates/tpl_checkout_success_default.php

    Make a copy for your template override structure

 

 

Similar Threads

  1. v139h Help whit affiliate code
    By SkalHuset in forum General Questions
    Replies: 0
    Last Post: 10 Oct 2012, 10:23 AM
  2. v150 Affiliate with unique coupon code?
    By keeperbay in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 1
    Last Post: 17 Sep 2012, 08:49 PM
  3. Where to put my Affiliate Tracking Code??
    By danwebman in forum General Questions
    Replies: 27
    Last Post: 24 Aug 2011, 05:56 PM
  4. Customising Footer to include Affiliate Code?
    By andycole in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 3 Dec 2009, 05:04 PM
  5. Javascript Affiliate Code Problem
    By zohe in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 1 Jun 2006, 12:09 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