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 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.
kiran 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.

Nick Cox 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.
Andie said...

Great Read! I am impressed on how you make your article easy to understand. I'll come back for more :D

Japs Buidon is a Social Media Specialist and belongs to a team of Magento Developer in Florida. For more tutorial and tips you can follow him here -> http://alwaysopencommerce.com/

LinkWithin

Related Posts Plugin for WordPress, Blogger...