【问题标题】:custom list.phtml template is not used on search result page[magento]搜索结果页面未使用自定义 list.phtml 模板[magento]
【发布时间】:2016-02-20 08:29:11
【问题描述】:

产品/类别列表页面使用我的自定义模板。但是当我搜索产品时。结果显示在默认的 list.phtml 模板中。

如何告诉 Magento 也将我的 [list.phtml] 模板用于结果页面。

【问题讨论】:

    标签: magento-1.9


    【解决方案1】:

    转到主题布局文件夹中的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

    希望对你有帮助

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-11-19
      • 2012-08-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多