Question

What is the difference between out of stock and 0 of stock?

I have an extension that automatically displays products from the same category as related products, however it displays products that are out of stock as well.

I checked in system configurations/inventory/stock options Display Out of Stock Products NO

In it's code it does not check for quantity left, it checks for stock value. So do I need to set up a stock value for every product? If so how do I do it?

I found this in the code of the extension

            $products->getSelect()->order(new Zend_Db_Expr('RAND()'));
            Mage::getModel('cataloginventory/stock')->addInStockFilterToCollection($products);

            $this->setData('related_products', $products);

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top