网络营销电子商务研究中心  
How to buy the best prescription safety glasses in Canada? Let's study!
Go Back   网络营销电子商务研究中心 > 网站建设 > Magento
User Name
Password
 
FAQ Members List Calendar Cheap Glasses

Reply
 
Thread Tools Display Modes
  #1   IP: 199.115.98.60
Old 2016-10-02, 07:11 PM
Sahuarita Sahuarita is offline
初级会员
 
Join Date: 2012-03-27
Posts: 2
Sahuarita 现在声名狼藉
Default 让magento的评论显示在产品页面

1.首先找到对应模板文件里的catalog.xml 文件,在 控制产品详细信息的节点<catalog_product_view translate="label">中

<reference name="content"> 的这个节点之中在合适的位置放入 如下代码:

<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>

我一般是把这段放在 如下面这段之后:

<block type="catalog/product_view" name="product.info.addtocart" as="addtocart" template="catalog/product/view/addtocart.phtml"/>

2.接着在对应模板文件里面的catalog/product/view.phtml 文件里面适当位置插入一行代码:

< ?php echo $this->getChildHtml('product_review') ?>

4.刷新缓存即可。
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Prescription-glasses.com offers prescription glasses online at discount prices.
All times are GMT +8. The time now is 09:18 AM.


Powered by vBulletin Version 3.8.7
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.