开发者

Magento - product stock status not changing until manual save

开发者 https://www.devze.com 2023-01-29 23:22 出处:网络
hopefully someone can help with thi开发者_开发技巧s. When a products inventory level reaches 0, it\'s status remains as in-stock.If I open up one of these products from within the admin area and save

hopefully someone can help with thi开发者_开发技巧s. When a products inventory level reaches 0, it's status remains as in-stock. If I open up one of these products from within the admin area and save it, without changing any of it's properties, the stock status correctly changes to out of stock. The logs are showing no exceptions or otherwise relating to this or any other events around the checkout process.

I am using configurable products, configurable by 1 attribute: size.

I have been unable to find the source of the problem, and have been resorting to trial and error with the various observers etc that are involved when a product is purchased. Has anyone experienced anything similar or can at least point me in the right direction here?

Thanks,

Drew

EDIT: I have a workaround in the meantime which involves updating the out of stock products and then reindexing the stock status from the success action of the onepage controller:

Mage::getResourceSingleton('cataloginventory/stock')->updateSetOutOfStock();
Mage::getModel('index/process')->load(9)->reindexEverything();

While its good this is working, something is causing the status to not change so I would really like to get to the bottom of this. Does anyone have any ideas on this?


It should be marked as out of stock if you went into Index management and reindexed the stock status index

0

精彩评论

暂无评论...
验证码 换一张
取 消