-
-
Save Dan0sz/e8cdfc84a53c0f9eb7ee08e97ee22c7f to your computer and use it in GitHub Desktop.
How to show only Visible/Active Products in Product Count
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
<?php | |
$collection = $_category->getProductCollection(); | |
$collection->setVisibility(array(Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH, Mage_Catalog_Model_Product_Visibility::VISIBILITY_IN_CATALOG)); | |
$collection->addFieldToFilter('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