I have a filtered product collection using custom attribute. How do I implement layered navigation for the same?

I have extended Mage_Catalog_Block_Product_List in my block to and override _getProductCollection() to update $this->_productCollection variable filtering it through a custom attribute. It gets nicely displayed.

But the layered navigation section appears to be unchanged. It appears to show all products. I want to show only $this->_productCollection products in layered navigation.

How do I do it? I feel that I may have to extend Mage_Catalog__Model_Layer and I even tried to but I couldn't produce the desired result.

  • Do you want to get filtered collection, based on custom attributes? Jun 6, 2014 at 14:44
  • I want to get my layered navigation to work properly. My custom attribute filtered productCollection has no problom. Just tell me how to get layered navigation menu according to this new ProductCollection. Jun 6, 2014 at 17:06
  • I've been cracking my head over this as well. The only post I found that makes a bit more sense and might help you in the right direction is this one: http://stackoverflow.com/questions/5726891/magento-layered-navigation-on-custom-product-collection Only problem I have is that I can't get it working. I extended Mage_Catalog_Model_Layer and updated getProductCollection with the same adjustments made in list.php. This works but since it's a model it works for the entire webshop while I only want Jun 13, 2014 at 10:01