How can I disable all the payment options, when the cart value is 0. I heard about zero subtotal checkout, but when the cart value is 0, all the payment methods appear along with the zero subtotal checkout and if someone clicks on any other payment options, error comes.

So is there any way where I can disable all the payment options when the cart value comes to zero. please tell step by step as I am super new in Magento.


2 Answers 2


Megento have this option in admin section.

Go to System > Configuration > Payment Methods > Zero Subtotal Checkout

check this reference link


  • I used this last time, but even when the cart value is 0, it still shows other payment options and if you choose any of those then we get an error.
    – Pratik
    Apr 5, 2018 at 9:35
  • another option you can hide with jquery, if total vaue is 0 then other option should be hide. Apr 5, 2018 at 10:09
  • But how, can you tell me those steps.
    – Pratik
    Apr 5, 2018 at 12:38

Do this using event observer.....create an event on payment_method_is_active and depends on grandtoatal group disable and enable payment method.

Enable Zero Subtotal Checkout : System > Configuration > Payment Methods > Zero Subtotal Checkout

check this reference link

Payment method - Zero Subtotal Checkout - hide all others

Create config.xml under app/code/local/Bh/ZeroSubtotalpaymentmethod/etc. code of this file is

<?xml version="1.0" ?>

Create Observer.php under app/code/local/Bh/ZeroSubtotalpaymentmethod/Model/ code is

class Bh_ZeroSubtotalpaymentmethod_Model_Observer {

    public function filterpaymentmethod(Varien_Event_Observer $observer) {
        /* call get payment method */
    $method = $observer->getEvent()->getMethodInstance();

$quote = $observer->getEvent()->getQuote();
/* this condition will disable rest of  payment method if grandtotal  <= 0 */
    if($method->getCode()!='free' && (Mage::app()->getStore()->roundPrice($quote->getGrandTotal())<=0))

        $result = $observer->getEvent()->getResult();   
        $result->isAvailable = false;

/* this condtion prevent zero payment to display when grandtotal greater then 0 */
        $quote = $observer->getEvent()->getQuote();
        $result = $observer->getEvent()->getResult();   
        $result->isAvailable = false;
  • The link you share me, i didn't understand how it is done. can you please explain me in detail.
    – Pratik
    Apr 5, 2018 at 9:34
  • @Pratik , check my updated answer. Apr 5, 2018 at 11:32
  • Hi, Chirag i tried the exact steps that you provided, but it still work. I still get other payment options when the cart value is 0. :(
    – Pratik
    Apr 5, 2018 at 12:37
  • @Pratik Replace "free" with Zero Payment method code and try please Apr 5, 2018 at 13:06
  • What do you means by Zero Payment method code, sorry i am very new. so its hard for me to understand.
    – Pratik
    Apr 6, 2018 at 10:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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