XtCommerce integration
A shopping cart system.
Integration with XtCommerce is made by changing checkout_success.php file.
Edit template
Find and open checkout_success.php file.
Integration
Put the following code:
//--------------------------------------------------------------------------
// Post Affiliate Pro code
// The code below will get the order_id and total value of recent order
// from the database and displays invisible image that registers the sale
// for affiliate (if some affiliate referred this visitor)
//--------------------------------------------------------------------------
$sql = "select orders_id from ".TABLE_ORDERS." where customers_id='".$_SESSION['customer_id']."' order by orders_id desc limit 1";
$pap_orders_query = xtc_db_query($sql);
$pap_orders = xtc_db_fetch_array($pap_orders_query);
$pap_order_id = $pap_orders['orders_id'];
// get total amount of order
$sql = "select value from ".TABLE_ORDERS_TOTAL.
" where orders_id='".(int)$pap_order_id."'";
$pap_orders_total_query = xtc_db_query($sql);
$pap_orders_total = xtc_db_fetch_array($pap_orders_total_query);
$pap_total_value = $pap_orders_total['value'];
// draw sale tracking code to register sale
if($pap_total_value != "" && $pap_order_id != "")
{
$smarty->assign('pap_sale_tracking','<script id="pap_x2s6df8d" src="https://URL_TO_PostAffiliatePro/scripts/trackjs.js" type="text/javascript"></script>'."
<script type="text/javascript">
PostAffTracker.setAccountId('Account_ID');var sale = PostAffTracker.createSale();
sale.setTotalCost('$pap_total_value');
sale.setOrderID('$pap_order_id');
PostAffTracker.register();
</script>");
}
//--------------------------------------------------------------------------
// END of Post Affiliate Pro code
//------------------------------------------------------------------
right before line:
if (DOWNLOAD_ENABLED == 'true')
Edit template
Find and open /templates/xtc4/module/checkout_success.html file.
Integration
Put the following code:
<!-- START of Post Affiliate Pro code -->
{$pap_sale_tracking}
<!-- END of Post Affiliate Pro code -->
right before line:
{if $downloads_content neq '}
Savage X Fenty Affiliate Program
Savage X Fenty offers a CPS affiliate program for retail trade, with single-tier commissions and no minimum payout. They use CJ Affiliate software and accept worldwide traffic sources. The company promotes inclusivity and diversity in its products and marketing campaigns, making it an attractive option for affiliate marketers.
Simcoe Media Solutions Affiliate Program
Simcoe Media Solutions offers an affiliate program with single-tier commissions and a minimum payout of $100. They accept worldwide traffic and offer monthly payouts via PayPal or wire transfer. Contact them to start building your own affiliate program.
Replacements Affiliate Program
The Replacements affiliate program offers single-tier commissions, fixed commission structure, and no minimum payout. They cater to both retail and wholesale customers, offering a wide range of high-quality products. With over 40 years of experience, they continue to set the standard for the perfect dining and entertaining experience.