Magento category with products that have stock greater than 0

We had to modify the code we used for this Magento category with all products except out of stock products

Change this part

$inStockProductIds = array();

$inStockCollection = Mage::getModel(‘cataloginventory/stock’)
array( ‘eq’ => 1 )

To this

$inStockCollection = Mage::getModel('cataloginventory/stock')
->addQtyFilter('>', 0)

Leave a Reply

Your email address will not be published. Required fields are marked *