This is my code:
$visibility = array( Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH, Mage_Catalog_Model_Product_Visibility::VISIBILITY_IN_CATALOG, Mage_Catalog_Model_Product_Visibility::VISIBILITY_NOT_VISIBLE ); $_productCollection = Mage::getSingleton('catalog/category') ->load($_categoryId) ->getProductCollection() ->addAttributeToSelect('*') ->addAttributeToFilter('visibility', $visibility);
I want to get all products, no matter what visibility they have. The code above skips those that are not visible though. Whats wrong? Is there another way to do what I want?