sulabh
sulabh

Reputation: 1117

Magento Configurable products don't go out of stock

I have the usual configurable-simple products store. Ideally I would like that a configurable products should automatically go out of stock when all of its associated products go out of stock. How ever this does not seem to happen. Am I missing something in the configuration or is this not supported?

I am using magento community 1.6.1.

Upvotes: 0

Views: 3177

Answers (2)

Dmitry Lysohor
Dmitry Lysohor

Reputation: 1

Probably it's not supported. I have similar problem and I use this code to eliminate out of stock products:

$_productCollection = Mage::getResourceModel('catalog/product_collection')
    ->addAttributeToFilter('type_id', array('eq' => 'configurable'));

Mage::getSingleton('catalog/product_visibility')->addVisibleInCatalogFilterToCollection($_productCollection);

Upvotes: 1

Sergey
Sergey

Reputation: 1494

sulabh
First check your inventory configuration for every product ("manage stock") should be set to true.
Then run stock reindex. It will check if every child is out of stock -> will set configurable product out of stock.

Upvotes: 0

Related Questions