I am having a problem of displaying out of stock products website based.

In admin System -> Configuration -> Inventory, there's a field call Display Out of Stock Products. But it is a global field meaning that we cannot set it in website scope.

I am running 2 sites using the same Magento instance.

My question is: Is there anyway to show out of stock products only for a specific website?

1 Answer 1


this will return you out of stock collection base on current website

$products = Mage::getModel('catalog/product')
                    ->addAttributeToFilter('is_in_stock', array('eq' => 0));

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.