Magento产看产品评论需要点击到另外一个页面中,这种设计对于用户体验和SEO都相当不利。一方面用户无法在产品页面查看该产品的一些用户评
价,另外,搜索引擎也会收录很多与产品无关的页面。那么如何让产品评论直接显示在产品页面呢?我们需要修改一下模板文件,很简单即可实现。
首先,在layout/catalog.xml布局文件中找到 Product view 部分,添加如下block节点,
<block type="review/product_view_list" name="product.info.product_additional_data" as="product_review" template="review/product/view/list.phtml">
<block type="review/form" name="product.review.form" as="review_form"/>
</block>
然后,在view.phtml模板文件中需要显示产品评论的位置调用该block文件,
<?php echo $this->getChildHtml('product_review'); ?>
更新缓存,用户评论就显示在产品页面了!具体显示的位置可以根据模板文件的位置适当调整即可。
来源:http://www.ruiwant.com/how-to-display-comments-on-product-page-in-magento.html
分享到:
相关推荐
NULL 博文链接:https://justcoding.iteye.com/blog/2100394
magento通过产品名称获取产品id提示代码
magento站点首页显示新产品及产品数量,可在block块中设置产品数量
如何给产品描述里的关键字、字词批量添加链接?我想大家一直在的这样的插件。说实话,我也找了很久,也没有找到。可是由于需要,不得不自己开发一个这样的插件。并支持到Magento1.6.2 说明请查看:...
magento 评论插件
批量导入 导出 magento商城商品的评论
NULL 博文链接:https://justcoding.iteye.com/blog/1711166
Magento导入导出产品插件 编辑csv表格导入产品 Import Products categories multiple images and custom options 1 1 2 tgz 与官方插件一样
magento程序添加多个表运费,可以自行设置运费计算公式
magento企业版全页缓存,magento的加速利器
magento全页缓存
NULL 博文链接:https://hudeyong926.iteye.com/blog/1728074
Ability to place any block in any position by easily changing CMS page layout Unlimited number of blocks inside each position Unlimited number of content items inside each block Block items can ...
为什么magento产品不改变“缺货”尽管数量已经低于最低
Magento全页缓存插件,适用于1.6-1.8社区版
无需进入产品产品详情页就可以预览产品图片,商店访问者也可以通过单击项目图片进入产品页面而没有任何问题(禁止用作商业用途)
magento产品名称及描述批量修改sql
Magento 2 Beginners Guide by Gabriel Guarino English | 14 Mar. 2017 | ASIN: B01MS81BQX | 442 Pages | AZW3 | 31.84 MB Key Features Set up and manage your very first online store with a friendly and ...
Magento1.7测试可用 批量产品多图上传 包含上传样本