XtCommerce integration
Um sistema de carrinho de compras.
A integração com o XtCommerce é feita alterando o arquivo checkout_success.php.
Edite o modelo
Encontre e abra o arquivo checkout_success.php.
Integração
Coloque o seguinte código:
//--------------------------------------------------------------------------
// 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
//------------------------------------------------------------------
antes da linha:
if (DOWNLOAD_ENABLED == 'true')
Edite o modelo
Encontre e abra o arquivo /templates/xtc4/module/checkout_success.html.
Integração
Coloque o seguinte código:
<!-- START of Post Affiliate Pro code -->
{$pap_sale_tracking}
<!-- END of Post Affiliate Pro code -->
antes da linha:
{if $downloads_content neq '}
Discover the essentials of clicks (referrals) tracking with our comprehensive guide. Learn about the importance of click tracking code, explore various code examples including simple, asynchronous, and PHP versions, and dive into advanced tracking options. Optimize your affiliate marketing strategy with expert tips on setting account IDs, managing cookies, and customizing tracking parameters. Visit now to enhance your click tracking implementation!
Discover the power of the Lifetime Commissions plugin! Ensure lifetime referral tracking with unique customer identifiers, allowing affiliates to earn commissions on future sales without repeated clicks. Easily manage customer-affiliate relations and configure settings to suit your needs. Boost your affiliate program's efficiency with customizable options and ensure commissions for affiliates, even across different devices or channels. Explore seamless integration with eCommerce systems and enhance your marketing strategy today!
Import and update transactions (commissions)
Easily import or update commissions in Post Affiliate Pro using CSV files. Learn formatting, configuration, and troubleshooting tips.
FlowHunt AI Chatbot Integration
Create AI chatbots effortlessly with FlowHunt's no-code platform. Free demo & support available. Enhance your affiliate marketing!