Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

Magento Configurable products and their quantity logic

In Magento strictly saying, a Configurable product(CP) is not a product in itself, but a collection of
simple products. When you are choosing among 10 colors of a CP is nothing but choosing 10
different simple products of the same color.

Suppose a store have only one RED Ball and two magic boxes CP1 and CP2.

Now you can take out the RED Ball from any of the boxes,as it is a magic box. But when you take
out the ball from one of the boxes(CP1), the RED Ball can't be taken out from the other box(CP2)
or from the CP1 as there is only One RED Ball.

Now you can have hundreds of Magic Boxes and you can take the RED Ball from any of the
boxes(if the magician allows it- in this case store owner), but when the stock of RED Ball is out
then nobody can take out the RED Ball from any of the boxes.

And to make the product out of stock when the Quantity becomes zero, you have to go to

System->Configuration->Inventory(under
catalog tab)

As shown in the image below, set the field


marked in red to zero.

That's it. Hope I made your concept clear


about Configurable Product. Enjoy...

Logic Behind Inventory Manage:

Yes, if you reduce the stock of an associated simple product, the stock status is updated in all of the parent
configurable products that contain that simple product. The configurable products will only become out of
stock if all of their own associated child products are out of stock.

The system logic is fairly complicated as Magento accommodates a number of built in product types, but is
also designed to accommodate custom product types. Inventory can be managed (or not managed) in a variety
of ways in these different product types.

When you complete an order in Magento, the quote object representing the shopping cart is converted to an
order object. If you look in Mage/CatalogInventory/etc/config.xml you'll see that this module is
observing events in the system that relate to inventory levels. A lot of these events are emitted by
Mage_Sales_Model_Service_Quote::submitOrder() which is the method that is driving most of the
conversion from a quote to an order. The CatalogInventory observer methods both reduce the inventory levels
and issue requests to re-index the stock levels.

In Mage_CatalogInventory_Model_Stock_Status::updateStatus() on line 266 you can see the call that


updates the stock status of all parents of a simple product when the simple product's stock status changes.

You might also like