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:
- First, make sure your hosting account supports either CURL or the file_get_contents function in PHP.
- Open up your shopping cart's or web site's thank-you page.
- You will need to find the $AMOUNT and $ORDERID for your thank-you page. This is required to generate commissions on a sale.
- 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']); ?>
- 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.