I have this module ready to go, and would even like it to be added to the core in the next release of OpenCart. It works by checking the totals when loading and if there is 0.00 total between cart, shipping, and taxes, it will display itself. If there is any cost greater than 0.00 it will not display.
But there is a problem. Due to the way the checkout/payment page saves the "payment_methods" to the session, If you choose Free shipping, then choose Free payment, then went back to shipping and changed it to $10.00, the payment methods session variable would prevent rechecking to see if the total is still 0, so it would still offer the Free payment option, which we don't want.
I can see the purpose of having the shipping_methods saved to the session, so you don't have to get quotes each time. But for payment, there are no quotes to get really. So since there is no real need for the payment having a session set, removing the session for payment_methods would allow for this new payment module to work without breaking anything else. At the very least you could change the check to this:
Code: Select all
if (!isset($this->session->data['payment_methods']) || $this->config->get('free_checkout_status')) {
In the meantime, i can release this with a quick explanation on how to comment out the 1 line of code that checks the session for payments.