A-A+

Magento禁止游客发表评论:阻止Magento垃圾评论

2012年08月31日 心情随笔 评论 11 条 阅读 2,594 人 次

很多时候,我们开启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]

标签:

11 条留言  访客:11 条  博主:0 条

  1. feilung
  2. zise
  3. enjoysilk
  4. Esther
  5. dugujianxiao
    • dugujianxiao
  6. littleduo
    • 渋驀
  7. 渋驀
    • littleduo
      • 渋驀

评论已关闭!