Magento Forum

   
layer navigation filters with simple products
 
dorkad
Jr. Member
 
Total Posts:  5
Joined:  2008-09-24
 

Hi,
I would like to display items only for simple products in layer navigation filters. Can anyone tell me how to filter only simple products in created collection?Thx in advance.

 
Magento Community Magento Community
Magento Community
Magento Community
 
dorkad
Jr. Member
 
Total Posts:  5
Joined:  2008-09-24
 

ok, in \app\code\core\Mage\Catalog\Model\Layer\Filter\Abstract.php I’ve changed

protected function _getBaseCollectionSql()
    
{
        
return $this->getLayer()->getProductCollection()->getSelect();
    
}

to:

protected function _getBaseCollectionSql()
    
{
        
return $this->getLayer()->getProductCollection()->getSelect()->where("e.type_id='simple'");
    
}

and now the simple products are everywhere wink ... I mean in layer navigation filters and product list. I would like to display them only in navigation.

please help smile

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top