osc2nuke integration
Integracji z osc2nuke dokonuje się poprzez umieszczenie skryptu śledzenia sprzedaży na stronie potwierdzenia. Aby uzyskać wartości OrderID i TotalSale, snippet łączy się z bazą danych osc2nuke i pobiera stamtąd wartości.
Edycja szablonu
Znajdź i otwórz plik „modules/catalog/checkout_success.php”
Znajdź miejsce integracji
Znajdź następujący wiersz w tym pliku:
require(DIR_WS_CLASSES . 'checkout_success.php');
Integracja
Dodaj następujący kod przed tym wierszem:
//--------------------------------------------------------------------------
// integration code
//--------------------------------------------------------------------------
// get order id
$sql = "select orders_id from ".TABLE_ORDERS.
" where customers_id='".(int)$customer_id.
"' order by date_purchased desc limit 1";
$pap_orders_query = tep_db_query($sql);
$pap_orders = tep_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.
"' and class='ot_subtotal'";
$pap_orders_total_query = tep_db_query($sql);
$pap_orders_total = tep_db_fetch_array($pap_orders_total_query);
$pap_total_value = $pap_orders_total['value'];
// draw script to register sale
if($pap_total_value != "" && $pap_order_id != "") {
print '<script id="pap_x2s6df8d" src="https://URL_TO_PostAffiliatePro/scripts/trackjs.js" type="text/javascript"></script>'."
</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 integration code
//--------------------------------------------------------------------------
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!
Discover seamless integration solutions with Post Affiliate Pro, the leading affiliate marketing software. Effortlessly connect with platforms like Authorize.net, Calendly, FormAssembly, and more to enhance your e-commerce and reporting capabilities. Enjoy free trials, 24/7 support, and maximize your marketing ROI with advanced tracking and flexible commission options. Visit now to revolutionize your affiliate marketing strategy!
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!