In Stock Product Collection

Updated . Posted . Visible to the public.

This snippet provides a collection of in-stock products, or products which do not have stock management enabled on them

$productCollection = Mage::getResourceModel('catalog/product_collection');
Mage::getSingleton('cataloginventory/stock')->addInStockFilterToCollection($productCollection);

Mike Whitby
Last edit
Posted by Mike Whitby to Magento (2012-03-14 16:12)