Sorry, after months of not having time to look into this, yet wishing I had OPC, I've finally got round to looking into it again.
BillJ:
I've come up against another issue with OPC. Whenever I try to confirm an order, I end up back on the checkout page with the message:
"Your order's details have changed. Please review the current values and re-submit."
This is Zen Cart 1.57c with OPC 2.3.9 and using the Responsive Classic template.
Running the opc_debug_redirection_error tool over the log highlights a single, very significant difference:
2021-12-22 00:07:00: Found a redirection back to <code>checkout_one</code>, difference follows.<br><br> 'securityToken' => '00c23d84c0826846b46f1c1500e43b00',
'customers_host_address' => 'xxxxx',
'opc' =>
OnePageCheckout::__set_state(array(
'isGuestCheckoutEnabled' => true,
'registeredAccounts' => false,
'guestIsActive' => true,
'isEnabled' => true,
'tempAddressValues' =>
array (
'ship' =>
array (
'which' => 'bill',
'company' => 'Saabits Ltd',
'firstname' => 'Bill',
'lastname' => 'Jones',
'street_address' => 'Unit 9, Dainton Manor Estate',
'suburb' => 'Dainton',
'city' => 'Newton Abbot',
'state' => 'Devon',
'zone_id' => '',
'postcode' => 'TQ12 5TZ',
'zone_country_id' => '222',
'gender' => false,
'country' => '222',
'zone_name' => '',
'error_state_input' => false,
'country_has_zones' => false,
'show_pulldown_states' => true,
'error' => false,
'validated' => true,
'selected_country' => '222',
'state_field_label' => '',
),
'bill' =>
array (
'which' => 'bill',
'company' => 'Saabits Ltd',
'firstname' => 'Bill',
'lastname' => 'Jones',
'street_address' => 'Unit 9, Dainton Manor Estate',
'suburb' => 'Dainton',
'city' => 'Newton Abbot',
'state' => 'Devon',
'zone_id' => '',
'postcode' => 'TQ12 5TZ',
'zone_country_id' => '222',
'gender' => false,
'country' => '222',
'zone_name' => '',
'error_state_input' => false,
'country_has_zones' => false,
'show_pulldown_states' => true,
'error' => false,
'validated' => true,
'selected_country' => '222',
'state_field_label' => '',
),
),
'guestCustomerInfo' =>
array (
'firstname' => 'Bill',
'lastname' => 'Jones',
'email_address' => '[email protected]',
'telephone' => '01392 581185',
'dob' => '',
),
'guestCustomerId' => 9403,
'tempBilltoAddressBookId' => 11434,
'tempSendtoAddressBookId' => 11435,
'dbStringType' => 'stringIgnoreNull',
'paypalAddressOverride' => NULL,
'paypalTotalValue' => NULL,
'paypalTotalValueChanged' => NULL,
'paypalNoShipping' => NULL,
'customerInfoOk' => true,
'billtoTempAddrOk' => true,
'sendtoTempAddrOk' => true,
'isVirtualOrder' => false,
'billtoAddressChangeable' => true,
'sendtoAddressChangeable' => true,
'observerAliases' =>
array (
'NOTIFIY_ORDER_CART_SUBTOTAL_CALCULATE' => 'NOTIFY_ORDER_CART_SUBTOTAL_CALCULATE',
),
'label_params' => ' class="inputLabel"',
)),
'cartID' => '62612',
'cart' =>
shoppingCart::__set_state(array(
'contents' =>
array (
377 =>
array (
'qty' => 1.0,
),
),
'total' => 78.43000000000000682121026329696178436279296875,
'weight' => 2.5,
'cartID' => '62612',
'content_type' => 'physical',
'free_shipping_item' => 0,
'free_shipping_weight' => 0,
'free_shipping_price' => 0.0,
'download_count' => 0,
'total_before_discounts' => 65.3599999999999994315658113919198513031005859375,
'display_debug_messages' => false,
'flag_duplicate_msgs_set' => false,
'flag_duplicate_quantity_msgs_set' =>
array (
),
'observerAliases' =>
array (
'NOTIFIY_ORDER_CART_SUBTOTAL_CALCULATE' => 'NOTIFY_ORDER_CART_SUBTOTAL_CALCULATE',
),
)),
'language' => 'english',
'languages_id' => '1',
'languages_code' => 'en',
'check_valid_prod' => true,
'layoutType' => 'legacy',
'currency' => 'GBP',
'today_is' => '2021-12-22',
'updateExpirations' => true,
'antispam_fieldname' => 'AhD5oDXadE',
'tass' =>
taxamo_assure::__set_state(array(
'token' => 'seller_token_uvHTz3pPyqBsdv38I4lNiZUfKHudCCoaD4YU3d95b6U',
'url' => 'https://seller-transaction-api.marketplace.taxamo.com',
'transaction' => NULL,
'transaction_key' => NULL,
'stored' => false,
'ioss' => NULL,
'enabled' => false,
'error' => NULL,
'tass_debug' => false,
)),
'session_counter' => true,
'customers_ip_address' => 'xx.xx.xx.xx',
'inc_ex_tax' => true,
'new_products_id_in_cart' => '377',
'valid_to_checkout' => true,
'cart_errors' => '',
'cart_country_id' => '222',
'country_info' =>
array (
'countries_name' => 'United Kingdom',
'countries_iso_code_2' => 'GB',
'countries_iso_code_3' => 'GBR',
),
'shipping_weight' => 2.5099999999999997868371792719699442386627197265625,
'is_guest_checkout' => true,
'customer_id' => 9403,
'customer_default_address_id' => 11434,
'customer_country_id' => '222',
'customer_zone_id' => '',
'customers_authorization' => '0',
'billto' => 11434,
'sendto' => 11434,
'customer_first_name' => 'xxxxx',
'customer_last_name' => 'xxxxx',
'shipping' =>
array (
'id' => 'rmbusinessuk_rm48',
'title' => 'Royal Mail (2nd Class Tracked (Delivered normally within 2-5 working days of despatch))',
'cost' => 4.9199999999999999289457264239899814128875732421875,
),
'shipping_tax_amount' => 0.9839999999999997637445403597666881978511810302734375,
'shipping_tax_description' => 'VAT 20%',
'order_current_total' => <del>'0',
)
</del> <ins>'£84.34',
)
</ins> <hr><br><br>Report completed.
At some point, order_current_total is seen as 0, which clearly isn't the correct value. I'm not sure where to start looking, to be honest.
Everything else appears fine while going through checkout and it all adds up correctly. If I comment out the check on line 277 of includes/modules/pages/checkout_one_confirmation/header_php.php, then the sale completes successfully and the correct amount is charged.