为什么没有任何搜索结果?

时间:2012-08-20 05:50:27

标签: magento

 <catalogsearch_result_index translate="label">
        <label>Quick Search Form</label>
        <reference name="root">
            <action method="setTemplate"><template>page/3columns.phtml</template></action>
        </reference>
        <reference name="left">

        </reference>
        <reference name="content">
            <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/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="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>

我想将布局设为page/2columns-left.phtml。并且不显示<block type="catalogsearch/layer" name="catalogsearch.leftnav" after="currency" template="catalog/layer/view.phtml"/>

所以我删除了上面的代码。当我测试搜索功能时。它显示Your search returns no results.

当我保留代码时。搜索功能没问题,但左边的布局是无序的。如何纠正它。谢谢。

1 个答案:

答案 0 :(得分:0)

通过在xml文件中再添加一行来删除左侧导航:

<remove name="catalogsearch.leftnav" />