This bug manifests itself only when Registering a New Customer Account and then Reviewing the Shopping Cart, i.e. it will not happen when pressing 'Checkout' directly - one must first click on the 'Shopping Cart' link in the upper toolbar or on the black Cart Button, then 'View Cart' link (again, if one clicks on the black Cart Button, then on the 'Checkout' link within, without reviewing the cart, the bug won't be triggered). Also it happens irregularly, in about 50-75% of cases on average.
After agreeing to Terms & Conditions and pressing the 'Continue' button, OpenCart gets stuck on the 'Payment Method' with the error message "Warning: Payment method required!" even though the payment method is pre-selected.
I have firstly thought that this is caused by a lack of the second radio button choice (as I have started getting this error with only a single Payment Provider). But as you can see from the attached screenshot, it happens even with the two Payment Providers and two Radio Buttons to choose from.
The bug is triggered on the line:
Code: Select all
elseif (!isset($this->session->data['payment_methods'][$this->request->post['payment_method']]))
{
$json['error']['warning'] = $this->language->get('error_payment');
}
Any suggestions how to fix this, i.e. stopping $this->session->data['payment_methods'] losing its value ?