Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ajankovic/4276657 to your computer and use it in GitHub Desktop.
Save ajankovic/4276657 to your computer and use it in GitHub Desktop.
<?php
Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($collection);
Mage::getSingleton('catalog/product_visibility')->addVisibleInCatalogFilterToCollection($collection);
Mage::getSingleton('cataloginventory/stock')->addInStockFilterToCollection($collection);
$collection->addAttributeToFilter('is_saleable', TRUE);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment