Jump to content

[Solved] Possible to set a payment method for a certain value in a cart?


sshare

Recommended Posts

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 by sshare (see edit history)
Link to comment
Share on other sites

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

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>';

  • Like 1
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...