$products = Mage::getModel('catalog/category')->load($cat_id)
->getProductCollection()->addAttributeToSelect('*')
->addAttributeToFilter(
'status', array('eq' => Mage_Catalog_Model_Product_Status::STATUS_DISABLED)
//replace DISABLED to ENABLED for products with status enabled
);
I am a Magento 2 Certified Developer, and I have more than 10 years of experience in the Magento, PHP, and WordPress sectors. I specialise in backend and frontend Magento module development. In addition, when someone updates their store's products, those will be instantly updated on the destination domain via API. Also, I have developed a Magento multivendor marketplace website. I have developed more than 700 custom modules as per the requirements.
Wednesday, 3 July 2013
Magento filter products by status
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Thanks for your comments.