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