Site maintenance: Sun 15 Nov, from 12:00 UTC, about 4–6 hours. Details

This cutover relies on some testing that is still incomplete so may be cancelled at short notice

Forums / Managing Customers and Orders / Tracking Code on Checkout Page

Tracking Code on Checkout Page

Locked

Started by bigmacyin on 2 May 2007, 3:23 PM · Views: 2,040

Results 1 to 1 of 1
This thread is locked. New replies are disabled.
2 May 2007, 3:23 PM
#1
bigmacyin avatar

bigmacyin

New Zenner

Join Date:
Feb 2006
Location:
UK
Posts:
30
Plugin Contributions:
0

Tracking Code on Checkout Page

I have recently signed up to an affiliate program here in the UK called Affiliate Window. Obviously, to work out the commission and track the orders gained through the Affiliate Network, they need the order information.

I eventually worked out how to pass the order total (would prefer subtotal but I haven't managed that yet) by doing the following in my custom tpl_checkout_success._default.php file:

//Edit for order total query
$ordertotal_query = "select order_total from " . TABLE_ORDERS . "
where customers_id = '" . (int)$_SESSION['customer_id'] . "'
order by date_purchased desc limit 1";
$ordertotal = $db->Execute($ordertotal_query);
//Finish order total query

Then adding this to the javascript code:

<?php echo (int)$ordertotal->fields['order_total']; ?>

I am now passing the order total value and that is registering in AW admin but I have yet to work out how to pass the categories_id to be able to setup the different commission structures I need to offer. Is anyone able to point me in the right direction as to how I could pass the product categories_id (could also do it using manufacturers_id) in the tracking code please?

Many thanks.

Big H

Big H