In my payment method that I'm testing on OC4021 I have a condition to be available only above a certain order total. However when changing the content of a shopping cart to a lower value, the payment method is not reloaded and checked again. In this case the payment module is still available while it should not be. Is there are way to re-check the payment conditions after a cart update?
How are you changing the cart contents? All the add, edit and remove methods in catalog/controller/checkout/cart.php clear the payment methods.
I see what you mean. OpenCart 3.0.x used to redirect to the cart page if anything was removed from the cart at checkout. It seems OpenCart 4.0.2.1 does not. It won't let you checkout afterwards, but it's not very user friendly.
You could check if it's been reported on GitHub.
You could check if it's been reported on GitHub.
If you can checkout, do you have a check for the $this->session->data['payment_method'] in your confirm method?
Such as this one.
https://github.com/opencart/opencart/bl ... hp#L23-L25
Such as this one.
https://github.com/opencart/opencart/bl ... hp#L23-L25
As I do not use the confirm function in my payment method I am not able to use this check, it would mean that I would have to re-code the entire extension to adapt. For now I regard this a bug in this latest version from OpenCart as also the payment totals are not updated using the default shipping/payment methods when making a cart change.




Who is online
Users browsing this forum: No registered users and 3 guests