我期待在magento的产品页面的侧边栏中显示产品(可能是3或4)的最新评论。希望在产品页面的侧边栏中显示产品评论magento
显示审查,明星酒吧和评论页面的链接的前10名或15个字来查看所有评论..
任何建议或指针大为赞赏,
谢谢,
约翰尼
我期待在magento的产品页面的侧边栏中显示产品(可能是3或4)的最新评论。希望在产品页面的侧边栏中显示产品评论magento
显示审查,明星酒吧和评论页面的链接的前10名或15个字来查看所有评论..
任何建议或指针大为赞赏,
谢谢,
约翰尼
HTH :)
正如ElGabby说,创建一个扩展将是一条路。
但你可以通过编辑你当前的布局来做到这一点。
转到文件的catalog.xml在/ app /设计/前端/预设/ [您的主题] /布局/或/应用/设计/前端/基/ [您的主题] /布局/
发现部分:
在那里你proberly有这样一段:在节中添加
<reference name="right">
:
<block type="review/product_view" name="right.rewiev" template="review/rightbar.phtml" />
在我的例子中,部分是这样的:
<reference name="right">
<block type="review/product_view" name="right.rewiev" template="review/rightbar.phtml" />
<block type="catalog/product_list_related" name="catalog.product.related" before="-" template="catalog/product/list/related.phtml"/>
</reference>
保存文件,并创建一个新文件: /应用程序/设计/前端/预设/ [您的主题] /设计/审查/ rightbar该文件的一个.phtml
内容会是这样的:
<?php $collection = $this->getReviewsCollection(); ?>
<?php if(count($collection) > 0):?>
<?php foreach ($collection as $rating):?>
<?php echo $rating->title //title of the rewiev?>
<?php echo $rating->detail //content of the rewiev?>
<?php echo $rating->created_at //data rewiev is created?>
<?php endforeach;?>
<?php endif;?>