I am building a site for a client who sells fabric. She'd like to allow her customers to order in decimals. Does anyone know if this is possible?

1 Answer 1


Magento already supports this. All you have to do is to set in the 'Inventory' the field 'Qty Uses Decimals' to 'Yes'. You can also set the increments in decimal if you want to sell in qty like 1.3, 2.6, 3.9, ....

I had an issue in the past with qty increments an decimal qty. In Mage_CatalogInventory_Model_Stock_Item::suggestQty() there is this line:

$qtyIncrements = (int)$this->getQtyIncrements(); // Currently only integer increments supported

I just removed the cast to int and it worked without problems with decimal increments also.

  • Thanks Marius. I'm wondering how I would enable this for certain products only? My client sells fabric but also sells buttons and other tools that can't be sold in decimal increments other than 1 Aug 8, 2013 at 23:10
  • @ChristinaRule. Just edit the products you want to sell in decimal qty and set the flag Qty Uses Decimals to Yes. You can do that one by one, or from the product grid, using Update products
    – Marius
    Aug 9, 2013 at 5:59
  • Hey @marius do you know if we're able to set this to a "default value" so when new products are added it automatically sets yes to "Qty Uses Decimals" ? Feb 19, 2014 at 22:37
  • I don't think it's possible. There is no option for it in System->configuration
    – Marius
    Feb 20, 2014 at 9:08

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.