Hi
I want to use PostAffiliatePro for affiliates.
It has an integration guide for oscom ..see below ..but will this work on oscmax ?
Thanks
Roy
1. Find and open file checkout_success.php
2. Inside the file find this line
if ($global['global_product_notifications'] != '1') {
...
3. insert the following code just above that 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 invisible image to register sale
if($pap_total_value != "" && $pap_order_id != "")
{
$img = '<script id="pap_licencecode" src="http://www.mysite.com/scripts/sale.js" type="text/javascript"></script>
<script type="text/javascript"><!--
var TotalCost="'.$pap_total_value.'";
var OrderID="'.$pap_order_id.'";
var ProductID="";
papSale();
--></script>';
print $img;
}
//--------------------------------------------------------------------------
// END of integration code
//--------------------------------------------------------------------------




LinkBack URL
About LinkBacks










Bookmarks