共计 726 个字符,预计需要花费 2 分钟才能阅读完成。
很多时候,我们开启Magento的评论模块,是为了更好的和客户交流,让客户有个舒展的通道,但是这也给那些垃圾信息发布者提供了非常便利的通道。
我们想要阻止垃圾评论,却不想伤害客户的心,所以我们允许注册客户发表评论,不允许游客发表评论,成为唯一的方法。
方法有二:
1、System –> Configuration –> Catalog –> Catalog –> Product Reviews I have “Allow guests to write reviews” set to “NO”.
2、Magento: Login required for Add Review
If you want to restriction for adding review than add below condition to form which is located at.
app\design\frontend\base\default\template\review\form.phtml
add below code to before form start
[php]if ((boolean) $this->helper(‘customer’)->isLoggedIn() ) { ?>
[/php]
add below code to after form end and before script start
[php]else //customer is NOT logged in { echo $this->__(‘To prevent SPAM we ask our customers to login before posting a review. Thank you for your understanding!’); echo ‘Please Sign In to post review ‘; } ?>
[/php]
求方法