Changing Default Quantity in Magento from 0 to 1

Geoff Jackson

Geoff Jackson (more commonly known by his online pseudonym zigojacko) is the founder of Design Haven and The Clubnet Group which hosts numerous agencies including the most widely recognised of them, Clubnet Digital, a full service digital marketing and creative design/development agency. He also has a personal blog but it doesn't get updated as much as he'd like.

You may also like...

Sponsored Links...

Subscribe to Design Haven UK

Enter your email address to subscribe and receive our new posts by email.

12 Responses

  1. tinkesh says:

    Thanks its working fine

  2. tspiro says:

    Hi. Do you have any idea why this is solution is not working for me in Magento 1.8.1? I modified the code and the back-end as indicated above and can’t seem to get it to work. Appreciate any further insight…

  3. Tanmay says:

    Thanx….. I was about to make a mess!!! 🙂

  4. Anthony L says:

    I’m using Magento 1.9.1 and it seems to work for some product types.  It seems to work for configurable but the simple products are showing a “0”.  Any suggestions?

    • I’d imagine there has been some sort of code change for this in your theme already Anthony if after re-indexing and clearing cache, simple products default to 0 quantity and configurable products default to 1 quantity.

      I think this was already handled by default in Magento 1.9.x.

      What theme are you using? Are you able to revert to the default Magento theme and test to see if anything changes?

      • Anthony L says:

        I’m using a theme called Argento Theme (Mall) from It has several themes included as well as some extensions built in. I’ll bet there’s something that overwrites that setting. In any case, I’ll try to look into it a bit more. Thank you.

        • Ah yes, I’m familiar with the theme.

          As mentioned, literally the quickest way is to revert to the default Magento theme for two seconds, reload a simple product page/configurable product page and then switch the themes back in the Magento admin.

          You can them compare if anything is different between the themes for the default quantity. See how you get on and feel free to leave another comment if you don’t get to the bottom of it.

  5. Anthony L says:

    In app/design/frontend/base/default/template/catalog/product/view/addtocart.phtml the quantity is set to “$this->getProductDefaultQty() * 1”.  I can just easily replace that with “$this->__(‘1’)”, however, there’s something causing the default to show as “0”.  I don’t know where to look for that function to diagnose it.

    • Replied to your last comment at the same time as you posted this one. Heh.

      Does the theme you are using also have a addtocart.phtml template file at the equivalent location?

      You did set the minimum quantity in the admin for all customer groups didn’t you?

      • Anthony L says:

        No, the theme doesn’t have addtocart.phtml in the equivalent location. Yes, I did set the minimum quantity for all levels in the configuration. Do you suppose that leaving the value as “$this->__(‘1’)” will be regrettable for any reason down the line?

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: