Tony, there are a couple of things going on here.
First, you shouldn't be getting that "something's changed" message when updating a "credit-class" order total by clicking an "Apply" button. In /includes/modules/pages/checkout_one_confirmation/header_php.php, find:
Code:
if ($checkout_one->hashSession ($currencies->format ($order->info['total'])) != $session_start_hash) {
$error = true;
$messageStack->add_session ('checkout_payment', ERROR_NOJS_ORDER_CHANGED, 'error');
}
and change that to
Code:
if ($order_confirmed && $checkout_one->hashSession ($currencies->format ($order->info['total'])) != $session_start_hash) {
$error = true;
$messageStack->add_session ('checkout_payment', ERROR_NOJS_ORDER_CHANGED, 'error');
}
I'll get that updated in the next OPC release.
Secondly, the processing performed by your Priority Handling order-total will require some re-alignment to interoperate with OPC. An OT module's collect_posts function is called on each entry to the OPC's initial page, just like on the normal checkout_payment page. Your order-total, for that method :
Code:
function collect_posts()
{
global $db, $currencies;
if ($_POST['opt_priority_handling']) {
$_SESSION['priority_handling'] = $_POST['opt_priority_handling'];
} else {
$_SESSION['priority_handling'] = '0';
}
}
resets the session-based value if the associated $_POST variable isn't set ... which it isn't upon return to the OPC initial page after ticking and clicking the Apply button.
This processing is similar to the order-total's behavior in a normal checkout. If you tick the "Priority Handling" box on the payment page but choose to edit your order's comments from the confirmation page, the box is no longer ticked when the payment page is redisplayed.
I'll "chew" on this a bit, as it's not yet clear to me how to preserve the state of that checkbox input.
Bookmarks