In my magento store (ce-1.9.0) I have setup a custom product attribute:
And the attribute has the setting of
Used in Product Listing : Yes Used for Sorting in Product Listing : Yes
I now need to filter any
getLoadedProductCollection() with this attribute. The attribute will either be set at:
null 0 1
I need to filter all instances of
getLoadedProductCollection() so that it will EXLCUDE any products with
custom_depth_check : 1
I have tried to clear and reload like so:
$_productCollection=$this->getLoadedProductCollection() ->clear() ->addAttributeToFilter('custom_depth_check', array('neq' => 1));
But that results in an empty collection. I also tried adding
->load() at the end but again nothing comes up.
I have to stored this collection into an array for specific field such as name, price, description, images etc.
how can i achieve this.