shenbo Posted February 19, 2009 Share Posted February 19, 2009 My store uses oscommerse as the shopping cart. The store offers two payment options: PayPal and 2Checkout. I have just signed up with shareasale. I followed instructions on shareasale website to set up the tracking code: 1)In the page: catalog/checkout_process.php, just above the line: // load the after_process function from the payment modules add the following code: // Begin Affiliate Program - Sales Tracking $orders_total=$currencies->format($cart->show_total()- $total_tax); tep_session_register('orders_total'); $orders_id=$insert_id; tep_session_register('orders_id'); // End Affiliate Program - Sales Tracking 2)In the page: catalog/checkout_success.php, just below the line, <h3><?php echo TEXT_THANKS_FOR_SHOPPING; ?></h3></td> add the following code: <!-- Start Affiliate Program - Sales Tracking --> <?php echo '<img src="https://shareasale.com/sale.cfm?amount='.$orders_total.'&tracking='.$orders_id.'&transtype=sale&merchantID=XXXX" width="1" height="1">'; tep_session_unregister('orders_total'); tep_session_unregister('orders_id'); ?> <!-- // End Affiliate Program - Sales Tracking --> I replaced XXXX with my merchant ID number. Then I tested the system. Test order was paid via PayPal. The test result shows "The test does not appear to have worked, please refer back to the instructions on how to place the code." The shareasale transaction result recorded the correct order ID (Sale - 3775) , but the orders_total (sale amount) was zero. I don't know what's been wrong, since the whole process was exactly the same as shareasale instruction. To find the problem, I added some testing code on checkout_success.php: echo ("<b>Order Total: $orders_total</b><br>\n"); echo ("<b>Order ID: $orders_id</b><br>\n"); the correct orders_total and order_id were printed on the checkout_success page. But why didn't the correct order_total go to shareasale affiliate? Someone here uses shareasale? I would really appreciate it if you can help me out. Thanks a lot. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.