Here's the code for zencart versions below 1.3x:
Here you go. You need to add this in the includes/modules/pages/checkout_success/header_php.php file
Code:
$jam1 = $db->Execute("select * from " . TABLE_ORDERS_TOTAL . " where orders_id = '".(int)$orders->fields['orders_id']."' AND class = 'ot_subtotal'");
$jam_zen_1 = (number_format($jam1->fields['value'],2));
$jam_zen_2 = $jam1->fields['orders_id'];
print "<script language=\"JavaScript\" type=\"text/javascript\" src=\"http://www.mysite.com/affiliates/sale.php?amount=$jam_zen_1&trans_id=$jam_zen_2\"></script>"
Bookmarks