osc2nuke integration
Integration with osc2nuke is made by placing sale tracking script intothe confirmation page. To obtain the values of OrderID and TotalSale,snippet connects to osc2nuke database and retrieves the values fromthere.
Edit template
Find and open file ‘modules/catalog/checkout_success.php‘
Locate integration place
Find following line in this file:
require(DIR_WS_CLASSES . 'checkout_success.php');
Integration
Add following code before this line:
//--------------------------------------------------------------------------
// 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
//--------------------------------------------------------------------------
Effortlessly integrate your e-commerce site with Post Affiliate Pro and boost your affiliate program's success. Our expert team ensures seamless integration with your payment processor, handling technical issues along the way. Enjoy a free trial and free integration service, saving you time and maximizing your ROI. Join now and experience top-notch affiliate management with over 500 integration options.
Discover seamless integration with osCSS on Post Affiliate Pro. Our open-source e-commerce solution offers powerful shopping cart functionality under the GNU General Public License. Easily integrate by placing a sale tracking script on the confirmation page to retrieve OrderID and TotalSale values. Join now for a free trial and optimize your affiliate management effortlessly!