Originally Posted by
DrByte
Does this match your line 1195? If so, I'm struggling to see any PHP7 issue with that. Hmmm...
Code:
if ($order_totals[$i]['code'] == 'ot_total') $optionsST['AMT'] = round($order_totals[$i]['value'],2);
The mod downloaded from https://www.zen-cart.com/downloads.php?do=file&id=212 contains the following around 1195
Code:
// handle other order totals:
global $$order_totals[$i]['code'];
if ((substr($order_totals[$i]['text'], 0, 1) == '-') || (isset($$order_totals[$i]['code']->credit_class) && $$order_totals[$i]['code']->credit_class == true)) {
// handle credits
$creditsApplied += round($order_totals[$i]['value'], 2);
} else {
// treat all other OT's as if they're related to handling fees or other extra charges to be added/included
$surcharges += $order_totals[$i]['value'];
}
I've made the following changes and it seems to have solved the problem
Code:
// handle other order totals:
global ${$order_totals[$i]['code']};
if ((substr($order_totals[$i]['text'], 0, 1) == '-') || (isset($$order_totals[$i]['code']->credit_class) && ${$order_totals[$i]['code']->credit_class} == true)) {
// handle credits
$creditsApplied += round($order_totals[$i]['value'], 2);
} else {
// treat all other OT's as if they're related to handling fees or other extra charges to be added/included
$surcharges += $order_totals[$i]['value'];
}
Bookmarks