I'm on Magento 1.7 and use Magestore's gift-card plugin.

When someone buys something with a gift card, it's possible that the cart total can be zero.

When it does that, it still offers both payment options: "Credit Cards" and "No Payment Information Required" (I've got the "Zero Subtotal Checkout" option enabled.)

Is it possible to:

  1. Have the "No Payment" option automatically selected? And/or:

  2. Have the "Credit Card" option hidden?

I think the current system is confusing. If the total is zero, defaults should be selected so the user can just skip onward, rather than making the user click things.

2 Answers 2


Each of the various Credit Card payment methods which Magento includes out-of-the-box include a Minimum Order Total setting. If you set this to a penny (0.01) the method should no longer show up when the value of the cart has a zero subtotal and since there would only be a single payment method now available, it would eliminate the need for the customer to choose one.

Note: I've not tested this, so can't personally say whether or not it will for certain work, but I don't see why it wouldn't. Let me know if it does! :)

  • Ah, that's a good idea. I'll test it in my dev site. I believe that if there's only one payment option available, you don't get any radio buttons. So this could be a quick and simple fix.
    – SamC
    Nov 26, 2013 at 0:10
  • This solution is fantastic. Do you know if it's possible to configure a minimum order amount for Paypal?
    – kevando
    Feb 24, 2014 at 5:47
  • @kevando Based on a quick look in the admin, I don't see the setting on the PayPal methods, so probably not without customizing it on the code level.
    – davidalger
    Feb 25, 2014 at 14:45

Set the sort order for Zero Subtotal Checkout as low as possible (All other active payment methods should have higher values)

Now edit (copy to local) Mage_Checkout_Block_Onepage_Payment_Methods and change the _canUseMethod($method) function like this:

protected function _canUseMethod($method)
    if (!$method || !$method->canUseCheckout()) {
        return false;

    if ($method->getCode() == 'free' && parent::_canUseMethod($method)) {
        Mage::register('payment_free_active', true);
    else if (Mage::registry('payment_free_active')) {
        return false;

    return parent::_canUseMethod($method);

This should work quite well, as long as you don't forget to sort your payment methods, otherwise the registry value won't be set early enough, and all payment methods with a lower sort order value will still be shown.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.