Magento:显示访客最近浏览的产品 [英] Magento: Show Visitor's Recently Viewed Product

查看:79
本文介绍了Magento:显示访客最近浏览的产品的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这个问题与我的 magento是否为此功能提供任何默认功能,还是我必须按照上一个问题中提到的方式进行操作.

This question is somehow related to my previous question. I want the "recently viewed" section to show the products which are recently viewed by my (as a visitor). So in that way, every visitor will see their recently viewed products in that section.
Does magento provide any default functionality for this feature or do I have to do it the way I referred in my previous question.

推荐答案

是的magento具有其默认功能 转到app/design/frontend/default/(yourtheme)/tempalte/reports文件夹

Yes magento has its default functionality Goto app/design/frontend/default/(yourtheme)/tempalte/reports folder

如果您在主题中看不到该文件夹​​,只需将其复制并保存到主题文件夹中

If you cant see that folder in your theme, just copy it and save it to your theme folder

您可以使用以下代码在布局文件中显示

you can use the below code to display in layout files

<block type="reports/product_viewed" name="left.reports.product.viewed" template="reports/product_viewed.phtml" />

要在CMS页面(主页)中呼叫

To call in CMS pages (homepage)

{{block type="reports/product_viewed" name="left.reports.product.viewed" template="reports/product_viewed.phtml"}}

要调用phtml文件

<?php echo $this->getLayout()->createBlock('reports/product_viewed')->setTemplate('reports/product_viewed.phtml')->tohtml(); ?>

这篇关于Magento:显示访客最近浏览的产品的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆