Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save rodrigowebjump/5e92ac8a5d74e922cb62 to your computer and use it in GitHub Desktop.
Save rodrigowebjump/5e92ac8a5d74e922cb62 to your computer and use it in GitHub Desktop.
Magento filtrar produtos ativos na collection Magento filter active products in collection
//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