Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

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