Totally Zenned
- Join Date:
- Jun 2005
- Location:
- Cumbria, UK
- Posts:
- 10,327
- Plugin Contributions:
- 0
New Jrox JAM integration code for 1.3.8
Just had word that Jrox JAM has obtained (via zencart chaps) the new integration code for 1.3.8.
------------------------
// bof JROX integration
if (isset($zv_orders_id) && (int)$zv_orders_id > 0 && isset($order_summary) && is_array($order_summary)) {
if (!isset($_SESSION['affiliate_order_id']) || $_SESSION['affiliate_order_id'] != $zv_orders_id ) {
$_SESSION['affiliate_order_id'] = $zv_orders_id;
$commissionable_order_formatted = number_format($order_summary['commissionable_order'], 2, '.', '');
echo '<script language="javascript" type="text/javascript" src="http://www.yourdomain.com/affiliates/sale.php?amount=' . $commissionable_order_formatted . '&trans_id=' . $order_summary['order_number'] . '"></script>';
}
}
// eof JROX integration
-------------------------
My questions are:-
- Does this code perform the same calculation(s) as the old footer integration code - particularly with regard to deducting discounts from the sub total. Here is the relevant line in the old code:-
$commissionable_order = ($order_subtotal - $coupon_amount - $group_pricing_amount);
- And is it possible to ALSO subtract Gift Certificate amount, which a few of us think is vital to the correct calculation of affiliate commissions:-
$commissionable_order = ($order_subtotal - $gv_amount - $coupon_amount - $group_pricing_amount);
If the NEW code can't do (2) above, is it still okay to use the old code?