【问题标题】:How do I add the recently viewed products box to the homepage?如何将最近查看的产品框添加到主页?
【发布时间】:2013-02-08 00:37:40
【问题描述】:

这是一个非常简单的问题,但我无法解决。

我尝试了以下方法:

将布局xml添加到此cms页面后端的更新布局字段:

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

或在local.xml中相同

<cms_index_index>
    <reference name="right">
      <block type="reports/product_viewed" before="right.permanent.callout" name="right.reports.product.viewed" template="reports/product_viewed.phtml" />
    </reference>
</cms_index_index>

非常感谢,我知道它并不复杂,但我无法理解。

【问题讨论】:

    标签: magento layout content-management-system sidebar


    【解决方案1】:

    这里有一些检查:

    1. 检查您的页面是使用右两列还是三列布局。

    2. 清除缓存

    3. 直接将布局更新添加到 cms.xml 并清除缓存。

    希望有帮助

    【讨论】:

      【解决方案2】:

      您可能错过了在自定义主页模板文件中回显该块?

      echo $this->getChildHtml('right.reports.product.viewed');
      

      或者可能是您的主页使用 2-template left 或其他没有“右”内容块的模板。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2021-04-05
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多