I have a simple product with a qty of 0. I'm setting the manage_product to 0 like this:
product = Mage::getModel("catalog/product")->load($nextId); $stockItem = Mage::getModel('cataloginventory/stock_item')->loadByProduct($product->getId()); $stockItem->setData('use_config_manage_stock', 0); $stockItem->setData('manage_stock', 0); $stockItem->save();
However, even though the quantity is 0, when I call
$product->getStockStatus(); in another script, it's returning the product as in stock!
I tried reindexing, checked that the quantity to put out of stock is 0 in the configuration tab, but nothing seems to work. I even tried changing manage_stock from the CMS, but it still doesn't fix it.
Why is that happening? How can I solve this issue?