Quote Originally Posted by gchalk View Post
I installed JROX at the some Time I upgraded from 1.1 to 1.2, so maybe that is where my problem is too.
I have seen in a number of instances where the installation of JAM (creating a new "footer" file for the checkout success page) causes problems with the code that is inserted during Google Analytics install which goes on the "tpl_main_page.php" page.

This might be something to look into with the JROX code as well.

To resolve this I have moved users JAM code to the tpl_main_page.php file and added an if then statement as such:

<?php
if ($_GET['main_page']=="checkout_success") { // If this is the checkout page, then insert the affiliate tracking code.
##########################################
## START JAM INTEGRATION WITH ZEN CART ##
## ZC Integration code by DrByte 8/2006 ##
##########################################
if ((int)$orders_id > 0) {
$JAM = $db->Execute("select class, value from " . TABLE_ORDERS_TOTAL . " where orders_id = '".(int)$orders_id."' AND class in ('ot_coupon', 'ot_subtotal', 'ot_group_pricing')");
while (!$JAM->EOF) {
switch ($JAM->fields['class']) {
case 'ot_subtotal':
$order_subtotal = $JAM->fields['value'];
break;
case 'ot_coupon':
$coupon_amount = $JAM->fields['value'];
break;
case 'ot_group_pricing':
$group_pricing_amount = $JAM->fields['value'];
break;
}
$JAM->MoveNext();
}
$commissionable_order = ($order_subtotal - $coupon_amount - $group_pricing_amount);
$commissionable_order = number_format($commissionable_order,2,'.','');
echo "<script language=\"JavaScript\" type=\"text/javascript\" src=\"http://www.someurlhere.com/affiliates/sale.php?amount=$commissionable_order&trans_id=$orders_id\"></script></td></tr>

</table>";
}

#######################################
## END JAM INTEGRATION WITH ZEN CART ##
#######################################
} // End if to determine if this is the checkout page
?>