Affiliate Software Documentation

Commission Integration Using PHP Code

To integrate the affiliate software for commission generation using PHP code, you will need to do the following:

  1. First, make sure your hosting account supports either CURL or the file_get_contents function in PHP.
  2. Open up your shopping cart's or web site's thank-you page.
  3. You will need to find the $AMOUNT and $ORDERID for your thank-you page. This is required to generate commissions on a sale.
  4. Add the PHP code block to your thank-you page. Here's some sample code:
    <?php 
    file_get_contents("http://www.yourdomain.com/affiliates/sale/amount/$AMOUNT/trans_id/$ORDERID/tracking_code/" . $_COOKIE['jamcom']);
    ?>
  5. Make sure to change the http://www.yourdomain.com/affiliates to point to your affiliate install and change the $AMOUNT and $ORDERID variables to reflect that of your shopping cart or thank-you page.