Wednesday, February 23, 2011

Set Default Quantity to 1 in Magento

By default, the quantity box on the product page is always blank and that is not very user friendly. It would be great if the box would be set to "1" by default .

Now this can be done without any programming - only through configuration changes in the backend as follows:


  1. Go to Admin Panel -> System -> Configuration -> Inventory-> Product Stock Options from the Menu
  2. Click on Add Minimum Qty button (next to Minimum Qty Allowed in Shopping Cart option)
  3. Choose Customer Group: ALL GROUPS as you want this to be applied to all users
  4. Enter 1 for Minimum Qty
  5. Save Config

Abracadabra! The work is done - now products page quantity box is defaulted to 1.

10 comments:

Krešo said...

Thanks for this, very good solution! I would be messing around with javascript to add "1" somehow or by templates.. but this was fast :)

Darshan Shah said...

Yep - I prefer doing such changes through configuration rather than through code which could possible break with the next update!

Anonymous said...

I get a strange "bug/feature" after enabling this -> if simple products inside configurable product have stock = 1 or 0, than the whole configurable product becomes "out of stock"! Any ideas? Tenks

Anonymous said...
This comment has been removed by a blog administrator.
Anonymous said...

Thanks a lot......:)

Anonymous said...

This worked great, but found a bug in magento 1.7 i had to actually create the rule twice, because it would always delete the first one.

Anonymous said...

I've created the minimum quantity of 1 in the default config but it doesn't show up in any of my other stores and the option isn't available to them in their configs. Any ideas?

Anonymous said...

I also found I had to Add Minimum Qty rule twice in Magento 1.8 in order for it to save. Then it worked like a charm!

Andie said...
This comment has been removed by the author.
Tori R said...

This was lovely, thanks for writing this

LinkWithin

Related Posts Plugin for WordPress, Blogger...