Magento搜索没有显示结果(没有布局!)

时间:2014-07-17 12:50:24

标签: magento magento-1.7

我遇到了Magento Search的问题。当我搜索一个单词时,它会给我一个空白的内容页面。

这是搜索查询结果页面的示例:http://bengar.de/de/catalogsearch/result/?q=bengar

您是否知道为什么此页面上没有结果(或至少是布局!)?

感谢。

catalogsearch.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/2columns-left.phtml</template></action>
    </reference>
    <reference name="left">
        <block type="catalogsearch/layer" name="catalogsearch.leftnav" after="currency" template="catalog/layer/view.phtml"/>
    </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>

1 个答案:

答案 0 :(得分:0)

使用以下

替换您的布局
 <catalogsearch_result_index translate="label">
<reference name="root">
        <action method="setTemplate"><template>page/2columns-left.phtml</template></action>
    </reference>
    <reference name="head">
        <action method="setTitle" translate="title" module="catalogsearch"><title>Advanced Search</title></action>
        <action method="addItem"><type>js_css</type><name>calendar/calendar-win2k-1.css</name><params/><!--<if/><condition>can_load_calendar_js</condition>--></action>
        <action method="addItem"><type>js</type><name>calendar/calendar.js</name><!--<params/><if/><condition>can_load_calendar_js</condition>--></action>
        <action method="addItem"><type>js</type><name>calendar/calendar-setup.js</name><!--<params/><if/><condition>can_load_calendar_js</condition>--></action>
    </reference>
    <reference name="content">
        <block type="catalogsearch/advanced_form" name="catalogsearch_advanced_form" template="catalogsearch/advanced/form.phtml"/>
        <block type="core/html_calendar" name="html_calendar" as="html_calendar" template="page/js/calendar.phtml"/>
    </reference>
</catalogsearch_result_index>