Created
June 26, 2014 21:21
-
-
Save rodrigowebjump/5e92ac8a5d74e922cb62 to your computer and use it in GitHub Desktop.
Magento filtrar produtos ativos na collection
Magento filter active products in collection
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Método depreciado não funciona | |
Mage::getSingleton('catalog/product_status')->addSaleableFilterToCollection($productCollection); | |
//Utilizar | |
$productCollection->addAttributeToFilter('status', Mage_Catalog_Model_Product_Status::STATUS_ENABLED); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment