【问题标题】:How to remove recently viewed products in product page magento如何在产品页面 magento 中删除最近查看的产品
【发布时间】:2016-06-12 11:55:24
【问题描述】:

我想删除产品页面中最近查看的产品。我已经尝试了很多次但无法找到解决方案。我在 local.xml 中做了一些编辑

但是没有用

【问题讨论】:

  • 向我们展示您的尝试

标签: magento


【解决方案1】:

打开您的主题模板的reports.xml。 (app\design\frontend\theme\default\layout\reports.xml) 会有类似

的代码
<block type="reports/product_viewed" before="right.permanent.callout" name="right.reports.product.viewed" template="reports/product_viewed.phtml" />

删除它,清除缓存并重新加载

【讨论】:

    【解决方案2】:

    尝试从 catalog.xml 文件中的 &lt;catalog_product_view&gt; 中删除相关产品块:

    <reference name="right">
        <block type="catalog/product_list_related" name="catalog.product.related" before="-" template="catalog/product/list/related.phtml"/>
    </reference>
    

    移除方块:

    <block type="catalog/product_list_related" name="catalog.product.related" before="-" template="catalog/product/list/related.phtml"/>
    

    【讨论】:

      【解决方案3】:

      尝试在您的商店中查找查看的产品说明。然后,在 yout 主题的 local.xml 中,使用正确的句柄将其从想要的部分中删除。

      例如,如何在产品视图中移除 Magento 的基本主题默认指令:

          <catalog_product_view>
              <remove name="right.reports.product.viewed" />
          </catalog_product_view>
      

      下一个示例是我如何将其从商店中删除,它基于不同的主题:

          <catalog_product_view>
              <remove name="product.info.viewed" />
          <catalog_product_view>
      

      清除缓存,一切顺利!

      这是推荐的方式。您应该避免复制或修改原始 XML 布局文件。始终使用您的主题 local.xml 文件。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2013-10-16
        • 2013-11-24
        • 2019-07-15
        • 1970-01-01
        相关资源
        最近更新 更多