As follow-up, according to wizer, the person who fixed his site also saw the problem I mentioned about the $order object, and applied a bandage which appears to be allowing it to work. (They did some other things too, related to zones.) However, the selected bandage doesn't directly fix the specific root cause, and is not a full fix suitable for inclusion in core code.
However, further testing suggests that a little broader approach may be quite reliable. For those interested in experimenting with the idea, read on:
bluedye's first post in this thread mentioned two lines of code at line 1685. If you replace those 2 lines with the following it may provide the symptomatic relief wizer is experiencing:
Code:
global $order, $order_totals;
if (!isset($order) || !isset($order->info) || !is_array($order->info) || !zen_not_null($order)) {
$this->zcLog('ec_step2 ', 'Re-instantiating $order object.');
// init new order object
if (!class_exists('order')) require(DIR_WS_CLASSES . 'order.php');
$order = new order;
// load the selected shipping module so that shipping taxes can be assessed
if (!class_exists('shipping')) require(DIR_WS_CLASSES . 'shipping.php');
$shipping_modules = new shipping($_SESSION['shipping']);
// load OT modules so that discounts and taxes can be assessed
if (!class_exists('order_total')) require(DIR_WS_CLASSES . 'order_total.php');
$order_total_modules = new order_total;
$order_totals = $order_total_modules->pre_confirmation_check();
$order_totals = $order_total_modules->process();
$this->zcLog('ec_step2 ', 'Instantiated $order object contents: ' . print_r($order, true));
}
$order->info['total'] = $response['AMT'];
I advise that you use caution and be prepared to back it out if your testing (which you should do immediately after you make the change) doesn't produce the desired results.
If you do try it, please send me the debug logs from your testing, via PM. Thanks.
Bookmarks