6

When I add a specific subcategory to my query string on my search results page I can see the chosen refinements list and filter options for other categories, price ranges, etc. However if I only do a keyword search I do not see any filter options. How can I set my results page to show all available filters with just a keyword search?

Edited to add - here is the layout xml:

               <catalogsearch_result_index translate="label">
    <label>Quick Search Form</label>
    <update handle="page_two_columns_left" />
    <reference name="root">
        <action method="setTemplate"><template>page/1column.phtml</template></action>
    </reference>
    <reference name="left">
    </reference>
    <reference name="content">
        <block type="catalogsearch/layer" name="catalogsearch.leftnav" after="currency" template="catalog/layer/view.phtml"/>

        <block type="catalogsearch/result" name="search.result" template="catalogsearch/result.phtml">
            <block type="catalog/product_list" name="search_result_list" template="catalog/product/list.phtml">
                <block type="catalog/layer_view" name="filter" template="catalog/layer/view.phtml"/>
                <block type="catalog/product_list_toolbar" name="product_list_toolbar" template="catalog/product/list/toolbar.phtml">
                    <block type="page/html_pager" name="product_list_toolbar_pager"/>
                </block>
                <action method="setColumnCount"><count>3</count></action>

                <action method="addColumnCountLayoutDepend"><layout>empty</layout><count>6</count></action>
                <action method="addColumnCountLayoutDepend"><layout>one_column</layout><count>5</count></action>
                <action method="addColumnCountLayoutDepend"><layout>two_columns_left</layout><count>4</count></action>
                <action method="addColumnCountLayoutDepend"><layout>two_columns_right</layout><count>4</count></action>
                <action method="addColumnCountLayoutDepend"><layout>three_columns</layout><count>3</count></action>
                <action method="setToolbarBlockName"><name>product_list_toolbar</name></action>
            </block>
            <action method="setListOrders"/>
            <action method="setListModes"/>
            <action method="setListCollection"/>
        </block>
    </reference>
</catalogsearch_result_index>

Here is a screen shot of the page prior to any filters on the search: enter image description here

Here is one with a category filter added: enter image description here

  • what is layout of the catalog search page? like 2column-right or left? – Keyul Shah Aug 6 '14 at 6:01
  • The layout is one column. I've moved layer_view into the content section. Here is the layout XML – KRay Aug 7 '14 at 0:04
  • make layout 2columns-left then test – Keyul Shah Aug 7 '14 at 4:18
8

It may depends of the number of results.

Open the search settings at admin - system - configurations - catalog - catalog search and find the option "Apply Layered Navigation if Search Results are Less Than"

Enter "0" to enable layered navigation for any number of results.

  • I changed the setting from 2000 to 0 and cleared the cache but no dice. – KRay Aug 7 '14 at 0:03
  • May be all products on the result set has the same attribute values? Please post 2 screens with results, including the address bar? – Amasty Aug 7 '14 at 7:49
  • @KRay did you also refresh the indexes, specifically the Product Attributes index? – Doug McLean Aug 3 '15 at 12:18
  • @KRay : Is it working ? – Gem Apr 17 '17 at 7:43
  • @Amasty "Apply Layered Navigation if Search Results are Less Than" option is not available in Magento 2.1.7 – Rishabh Rk Rai Dec 19 '17 at 11:52
3

replace xml

<reference name="left">

</reference>

with

<reference name="left">
<block type="catalogsearch/layer" name="catalogsearch.leftnav" after="currency" template="catalog/layer/view.phtml"/>

</reference>

and remove from name='content'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.