sshare Posted November 8, 2012 Share Posted November 8, 2012 (edited) Hi Everyone, Is it possible to set a certain value for a payment method to appear? We're going to have free greeting cards available on a site, but the people need to go to a "payment method page" (modified bankwire module page), where a phone number appears that they can call to give the details where to send the card, etc. But right now when the cart value is 0.00 no payment methods get shown. How can I change this? Many thanks in advance. Edited November 9, 2012 by sshare (see edit history) Link to comment Share on other sites More sharing options...
bellini13 Posted November 9, 2012 Share Posted November 9, 2012 which version of Prestashop is it? Link to comment Share on other sites More sharing options...
sshare Posted November 9, 2012 Author Share Posted November 9, 2012 (edited) Sorry its a 1.4.0.17 (not sure if we can upgrade to 1.4.9 as the theme said it was compatible with 1.4.0.x) Edited November 9, 2012 by sshare (see edit history) Link to comment Share on other sites More sharing options...
sshare Posted November 9, 2012 Author Share Posted November 9, 2012 Forgot to add, the shop obviously sees the value being 0.00 and thus doesn't show payment methods, I just need to remove that variable, but can't seem to find where it is. Link to comment Share on other sites More sharing options...
sshare Posted November 9, 2012 Author Share Posted November 9, 2012 I'm still looking at this now, I've narrowed it down to OrderOpcController, OrderController (not sure if that one is needed as we are using OPC), ParentOrderController and order-opc.js (in the js folder of our theme). But I can't figure out what needs to be changed to get it to do what we would like, any ideas? Link to comment Share on other sites More sharing options...
bellini13 Posted November 9, 2012 Share Posted November 9, 2012 OrderOpcController has a function called _getPaymentMethods. It checks if the order total is zero, and then skips the payment step if it is. You should override this function to remove that logic. /* Bypass payment step if total is 0 */ if (self::$cart->getOrderTotal() <= 0) return '<p class="center"><input type="button" class="exclusive_large" name="confirmOrder" id="confirmOrder" value="'.Tools::displayError('I confirm my order').'" onclick="confirmFreeOrder();" /></p>'; 1 Link to comment Share on other sites More sharing options...
sshare Posted November 9, 2012 Author Share Posted November 9, 2012 Thank you, problem is I don't know what to override it with? Link to comment Share on other sites More sharing options...
bellini13 Posted November 9, 2012 Share Posted November 9, 2012 you said you wanted the payment module to appear if the order total is zero, so you would remove that code. 1 Link to comment Share on other sites More sharing options...
sshare Posted November 9, 2012 Author Share Posted November 9, 2012 OK thank you once more, I thought I needed some special code in there. I will try and report back. Link to comment Share on other sites More sharing options...
sshare Posted November 9, 2012 Author Share Posted November 9, 2012 Thank you very much bellini13 it works, I deleted that code before but also removed all other references to the "freeorder" which didnt work. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now