My website shows quaintity as 0, but when I add product to cart its one, Can I change it so that it shows quantity 1

Here is sample:


5 Answers 5


Edit the product, go to the inventory tab and set the value 1 (or check the "use config" checkbox) for the "Minimum qty allowed in cart."


This input field value is coming from getProductDefaultQty function of block class Mage_Catalog_Block_Product_View.

According this function This field value depends on getMinimalQty() and getPreconfiguredValues()->getQty() and set between highest value of this two functions.

 $qty = $this->getMinimalQty($product);
        $config = $product->getPreconfiguredValues();
        $configQty = $config->getQty();
        if ($configQty > $qty) {
            $qty = $configQty;

Minimal qty field in managed by min_sale_qty(Minimum qty allowed in cart.) field of Products Inventory .It can this from admin>Product Inventory field

and getPreconfiguredValues()->getQty() function only work for group products because for group have multiple product.

It mean this input field depends on mini_sale_qty field


When you add the product to your cart if it is 0 it automatically makes it 1. If you set it to 3, 10, or whatever quantity it will add that quantity instead. Otherwise what is the point of adding 0 of a product to the cart?


Follow this steps:

Login in magento admin

Go to System -> Config -> Catalog -> Inventory -> Product stock options

  • Minimum Qty Allowed in Shopping Cart Select customer group like (ALL GROUPS) and add your qty value.

Please do the following to display 1 in the Qty input fields on the frontend:

  1. In admin menu go to System -> Configuration
  2. Then on right side go to Catalog -> Inventory
  3. Then left side find Product Stock Options accordion tab
  4. Then find Minimum Qty Allowed in Shopping Cart option
  5. Click on the Add Minimum Qty button
  6. Choose Customer Group: ALL GROUPS (if you want all users)
  7. Enter 1 for Minimum Qty
  8. Click the Save Config button

Now it will display a default number of 1 for all Qty input boxes.

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.