I want to apply layer navigation filter in custom product collection.
Now I have collection of products of particular seller as per below code.
$layer = Mage::getModel('catalog/layer'); $category = Mage::getModel('catalog/category')->load(Mage::app()- >getStore()->getRootCategoryId()); $layer->setCurrentCategory($category); $collection = $layer->getProductCollection(); $collection->addAttributeToSelect('*'); $collection->addAttributeToFilter('entity_id', array('in' => '339,340,345,356')); $collection->addAttributeToFilter('visibility', array('in' => array(4))); $this->setCollection($collection);
Now before set collection ($this->setCollection($collection)), I want to apply layered filter to collection as per query string.
Means apply condition and brand filter.
Please help me as soon as possible. I have waste almost one day in this customization.
Or give me some alternative solution.