0

I'm dealing right now with a common problem: Spam.

More exactly: Spam on my Magento 2.1.3 product reviews.

I'm trying to find solutions on how to avoid this problem. Right now any visitor can comment and review on my shop as a guest.

My approaches (that didn't help much so far):

/app/design/frontend/VendorName/ModuleName/Magento_Review/templates/form.phtml

Here i added some Javascript/jQuery + HTML:

  1. An input field as a question like "7+8 = ?". If the user answers right "15" the review submit button will be enabled (which has been disabled before).
  2. I've added ".. required />" to every input field.
  3. I've created another input field. If you enter something there the whole review container will be removed by jQuery. So if any bot does automatically try to enter something it should get removed.

=> No success, still spam to see in Admin > Marketing > Reviews

Spam in Backend: enter image description here

Looking at those spam-reviews there are two things that are strange:

  1. The spam-reviews had been made on the same product all the time
  2. The spam-reviews do not have any "star-rating" (1-5 stars) entered even if they are required in the form.phtml.

Conclusion: These spammers must be bots that somehow ignore the required attributes and ignore the Javascript/jQuery code at frontend.

My Question: Do you have any creative ideas on how to deal with that? There aren't any extensions out there (niche alert !☺) to prevent this.. Maybe from server site? PHP? Please help!

1

Here i added some Javascript/jQuery + HTML:

  1. An input field as a question like "7+8 = ?". If the user answers right "15" the review submit button will be enabled (which has been disabled before).
  2. I've added ".. required />" to every input field.
  3. I've created another input field. If you enter something there the whole review container will be removed by jQuery. So if any bot does automatically try to enter something it should get removed.

All this relies on JavaScript or browser behavior. Bots usually do not execute JavaScript or use a browser, so they don't care.

For a CAPTCHA (like the one you tried to implement in (1)) you need server side validation. Magento comes with a CAPTCHA module, but unfortunately does not use it for reviews and ratings.

There aren't any extensions out there

A search for "magento review captcha" gives countless results, at least for Magento 1, there are many free extensions. You can probably implement one for Magento 2 in a similar way.

A possible approach is explained here: Magento 2: How Captcha Module works?

  • Hey Fabian. Thanks for your reply. I will give it a try. Regards, – eskaliert Jan 26 '17 at 16:51
  • Thanks alot. This has worked out so far. Will see if it prevents the spam. – eskaliert Jan 28 '17 at 13:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.