如何在产品详细信息页面上显示最近查看的产品列表-magento
我已经使用了magento的MobileShope主题,并试图在产品详细信息页面显示最近查看的产品列表,但有些是如何工作的 在catalog.xml下面添加了代码如何在产品详细信息页面上显示最近查看的产品列表-magento,magento,themes,product,Magento,Themes,Product,我已经使用了magento的MobileShope主题,并试图在产品详细信息页面显示最近查看的产品列表,但有些是如何工作的 在catalog.xml下面添加了代码 <catalog_product_view translate="label"> <reference name="content"> <block type="reports/product_viewed" name="product.recently.viewed" as="product_recen
<catalog_product_view translate="label">
<reference name="content">
<block type="reports/product_viewed" name="product.recently.viewed" as="product_recently_viewed" template="reports/product_viewed.phtml"/>
</reference>
</catalog_product_view>
以下代码位于app\design\frontend\default\mobileshoppe\template\catalog\product\view.phtml
<?php echo $this->getChildHtml('product_recently_viewed') ?>
我也尝试过同样的默认主题,但它也不起作用,有人能帮我解决这个问题吗
谢谢…请将xml参考内容替换到左侧 而不是这个
<reference name="content">
在下面使用并检查
<reference name="left">
因为它是侧边栏的一部分,所以它应该与您希望在页面中显示的左/右列一起工作
干杯 在产品详细信息模板(view.phtml)上,您必须在xml中更具体地将块放置在何处。请参见下面的示例,使用主题布局目录(app/design/frontend/your package/your theme/layout/local.xml)中的local.xml插入块。这里有一个我正在工作的网站的例子。具有讽刺意味的是,我们在显示一致性方面遇到了问题,我现在正试图弄清楚这一点,但这在大多数情况下都是有效的!尝试在catalog.xml中更具体一些,它应该会起作用。xml在local.xml中,echo在catalog/product/view.phtml中
<?php echo $this->getChildHtml('recently_viewed') ?>
<catalog_product_view>
<reference name="content">
<reference name="product.info">
<block type="reports/product_viewed" name="left.reports.product.viewed" template="reports/product_viewed.phtml" as="recently_viewed" />
</reference>
</reference>