【发布时间】:2016-02-20 08:29:11
【问题描述】:
产品/类别列表页面使用我的自定义模板。但是当我搜索产品时。结果显示在默认的 list.phtml 模板中。
如何告诉 Magento 也将我的 [list.phtml] 模板用于结果页面。
【问题讨论】:
标签: magento-1.9
产品/类别列表页面使用我的自定义模板。但是当我搜索产品时。结果显示在默认的 list.phtml 模板中。
如何告诉 Magento 也将我的 [list.phtml] 模板用于结果页面。
【问题讨论】:
标签: magento-1.9
转到主题布局文件夹中的catalogsearch.xml。(如果找不到xml,请从base/default/layout复制xml文件> 到您的主题布局文件夹)。然后
找到<catalogsearch_result_index translate="label">
找到里面
<block type="catalog/product_list" name="search_result_list" template="catalog/product/list.phtml">
替换您的模板路径而不是 catalog/product/list.phtml
希望对你有帮助
【讨论】: