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

Search Results. Show Layered Navigation
 
brendanb
Mentor
 
Total Posts:  1093
Joined:  2008-07-16
London, United Kingdom
 

Is it possible to show the layered navigation on the search results page?

Currently when you run your seach it returns the product.list.

But lets say i return 20+ results across multiple categories. If i had the layered navigation this woudl allow a user to use this to further filter list.

Has anyone implemented this?

brendan

 
Magento Community Magento Community
Magento Community
Magento Community
 
Yarhajile
Sr. Member
 
Avatar
Total Posts:  90
Joined:  2008-08-28
Spokane, WA
 

I would also like to know this as well. Some of our customers most popular searches give result sets of several hundred products and having the ability to perform the same layered navigation filtering you get while browsing products would be fantastic.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Hercilio Costa
Member
 
Total Posts:  59
Joined:  2008-07-15
 

I’m trying to do the same. Anyone know how we can do this??

 
Magento Community Magento Community
Magento Community
Magento Community
 
Hercilio Costa
Member
 
Total Posts:  59
Joined:  2008-07-15
 

I figured out a way to put layered navigation in the search results page but it didn’t work properly.

To put the layered navigation in the search results page I add this code in app/design/frontend/default/blank/layout/catalogsearch.xml

<catalogsearch_result_index>
        .
        .
        .
        <
reference name="left">
            <
block type="catalog/layer_view" name="catalog.leftnav" before="right.newsletter" template="catalog/layer/view.phtml"/>
        </
reference>
        .
        .
        .
    </
catalogsearch_result_index>

Then I add this code to app/code/core/mage/CatalogSearch/controllers/ResultController.php

public function indexAction()
    
{
    
        $categoryId 
29// ID OF CATEGORY YOU WANT
            
        
$category Mage::getModel('catalog/category')
            ->
setStoreId(Mage::app()->getStore()->getId())
            ->
load($categoryId);

        if (!
Mage::helper('catalog/category')->canShow($category)) {
            
return false;
        
}
        
        Mage
::getSingleton('catalog/session')->setLastVisitedCategoryId($category->getId());
        
Mage::register('current_category'$category); 
        
        
        .
        .
        .
    
}

I see this code in this thread: http://www.magentocommerce.com/boards/viewthread/4810/

The layered navigation appear in the search results page but it didn’t work properly. Anyone know a fix to this??

 
Magento Community Magento Community
Magento Community
Magento Community
 
itchytrig
Sr. Member
 
Avatar
Total Posts:  162
Joined:  2008-10-03
UK
 

Hi,

Did you ever get this fix to work?

Thanks!

 
Magento Community Magento Community
Magento Community
Magento Community
 
Hercilio Costa
Member
 
Total Posts:  59
Joined:  2008-07-15
 

No, I just forget the idea…

 
Magento Community Magento Community
Magento Community
Magento Community
 
itchytrig
Sr. Member
 
Avatar
Total Posts:  162
Joined:  2008-10-03
UK
 

Doh!

If you could search for say, just a normal site search for the attribute; manufacturer, then the filtered results would show.

I know you can just search for the name of the manufacturer, but this just throws out a standard results page. Ideally, we would want to see a filtered section result, for that attribute/manufacturer alone.

A fix would be to perhaps, create a section, name it as a Manufacturer, then manually create all the subsections and clone the manufacturers products that way. But this is a very slow way to setup a store. Especially if you have several manufacturers!

I hope this can get picked up some how…

Thanks!

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