en Jump to content
polosat

[Free Module] Contact form anti-spam: reCAPTCHA and blacklist (PS 1.5/1.6/1.7)

Recommended Posts

Hi everyone!

I want to share my contact form antispam module. It uses reCAPTCHA and a simple blacklist.
The module is fully compatible with PrestaShop 1.5, 1.6 and 1.7.
You just need to fill reCAPTCHA keys and it will work.

Get reCAPTCHA keys here: https://www.google.com/recaptcha/admin

Any feedback is highly appreciated.

 

Version 1.1.3

 - small fixes and improvements

 

1.thumb.jpg.1cb8d74c459c30ede3f2b49436d1c3b4.jpg2.thumb.jpg.b30016a4154170cc0af9ae41d1c34b81.jpg

 

 

 

 

 

notarobot.zip

Edited by polosat

Share this post


Link to post
Share on other sites
On 30/03/2018 at 2:29 PM, tdsoft said:

hi, it automatic detected form or we must modify template?

 

On 30/03/2018 at 2:29 PM, tdsoft said:

hi, it automatic detected form or we must modify template?

you are the best man in the world this helped so much thank you thank you thank you !!!!

Share this post


Link to post
Share on other sites

Very nice thank you. Appreciate your effort.

Can the * be used to blacklist all emails from a specific domain, for example *@mail.ru ?

 

 

Share this post


Link to post
Share on other sites

Hi,

I installed it, but it not work correctly .I filled the keys.

It seems ok, but you can send massage without check "I am not a robbot". Just i enter send button and the message is send.

My version of prestashop is 1.6.1.13.

Maybe i have to do something else?

 

Share this post


Link to post
Share on other sites

Hmm, that's strange. Did you get any warnings during installation? Or maybe you have overrides disabled? (in Back Office > Advanced Parameters > Performance)

Share this post


Link to post
Share on other sites

Hi,

I have another question. 

I tried to change the error message to mine language (Bulgarian). But if I use Cyrillic, the module stop working. If I use Latin letters, it's OK.

I changed the error massage in the notarobot.php.

It's not so important, but if it's possible, it will be better:).

Share this post


Link to post
Share on other sites

I had tried ten times, but I searched it in the wrong place. When I sow your answer, i understood that it's in the error massages  sector.

Thanks man. God bless you :).

Share this post


Link to post
Share on other sites
On 4/3/2018 at 5:44 PM, polosat said:

You can simply enter mail.ru, it'll blacklist all emails from that domain.

 

Thank you. Unfortunately it seems not to work. I have 4 different .ru spam emails I would like to blacklist but they keep getting through.  In fact today was more than double. Anything I am missing?

Edited by Dave L

Share this post


Link to post
Share on other sites

Well... you can try to use one of those email addresses in contact form and see if the module actually works. Maybe you have overrides disabled?
Could you show me your blacklist field content?

Share this post


Link to post
Share on other sites
12 hours ago, polosat said:

Well... you can try to use one of those email addresses in contact form and see if the module actually works. Maybe you have overrides disabled?
Could you show me your blacklist field content?

 

You were totally correct. My Disable Overrides was set to yes. Now it works perfectly. Thank you for a very useful module.

Share this post


Link to post
Share on other sites

Thank you so much for this module. I am having an issue though. Even though I have a domain on the blacklist the message still goes through. On the contact page it says that the e-mail is blocked but it still shows up in the back office.

 

I have disable all overrides set to no

 

I just put in mail.ru and @mail.ru in the black list box. I am running prestashop 1.7.3

 

Thank you again

Share this post


Link to post
Share on other sites

Thank you very much for this.  I've recently been spammed for the past few weeks by some russian bot at mail.ru.

 

I'm a complete newbie to this and have never installed a module before.  This was very simple and worked straight away.  Very grateful, thanks.

 

Chris

Share this post


Link to post
Share on other sites

Hi, thanks for your fabulous module, it works like a charm.

I removed my simple override for captcha and used your module.

But, it is possible to add a translation step to it?

The translation of the "I'm not a robot" message in the capthca.

I found this tutorial: https://stackoverflow.com/questions/28769893/setting-recaptcha-version-2-set-another-language-other-than-english

I planned to integrate some of the suggestion of those page before using your module

Actually with your module (don't know why) the message in the captcha frame is always in italian instead of english and don't change according with my site language.

Thanks in advance for any support.

Share this post


Link to post
Share on other sites

Hi,

Oh, you're right, there should be a language option. I've added it. Thanks for the idea :)

By default the message is displayed in a user's browser language, not site language. Most likely that's why you see Italian.

 

notarobot.zip

Share this post


Link to post
Share on other sites

I just want to say thank you for your free module. Now i do not get any messages from @mail.ru

Have a nice day.

Share this post


Link to post
Share on other sites
19 hours ago, Mustafa Ali Keskin said:

hi

how can i put it on the right side

Hi,

You can add these styles to the "Custom CSS" field:

#nar-gre {
    overflow: hidden;
}
#nar-gre > div {
    float: right;
}

Actually it seems I need to add an alignment option, but it'll be a bit later.

 

18 hours ago, HUHA said:

I just want to say thank you for your free module. Now i do not get any messages from @mail.ru

Have a nice day.

You're welcome, I'm glad it is useful:)

Share this post


Link to post
Share on other sites
On 30/03/2018 at 1:13 PM, polosat said:

Hi everyone!

I want to share my contact form antispam module. It uses reCAPTCHA and a simple blacklist.
The module is fully compatible with PrestaShop 1.5, 1.6 and 1.7.
You just need to fill reCAPTCHA keys and it will work.

Get reCAPTCHA keys here: https://www.google.com/recaptcha/admin

Any feedback is highly appreciated.

 

Version 1.1.0

 - added a choosing language option

 

1.thumb.jpg.1cb8d74c459c30ede3f2b49436d1c3b4.jpg2.thumb.jpg.b30016a4154170cc0af9ae41d1c34b81.jpg

 

 

notarobot.zip

Hello and thank you so so much, you really helped a lot of people out with this module !

 

Keep your genius and kindness up !

 

Thanks again !

Share this post


Link to post
Share on other sites

Hi

I have been trying to deploy this module on a shop, with no success...

With everything configured right, when I'm trying to submit a form, after completing the recaptcha I get the error "Please confirm that you are not a robot".

The "Overrides" option in admin panel is well set, I got the correct recaptcha keys inserted, and for some reason still can't submit without errors...

 

Thanks in advance

 

EDIT: I'm running PS 1.6.1.8

Edited by meloonPT

Share this post


Link to post
Share on other sites
1 minute ago, polosat said:

Hi,

That's strange, I don't know what else can be wrong.

Could you show me your shop?

 

Hi,

 

The store is at https://printhouse.pt/

Right now I am using a different module to use recapcha, but it isn't as good as yours.

 

Thanks

Share this post


Link to post
Share on other sites

Well... I can guess only two options:

1) Check your recaptcha keys, maybe there are extra spaces etc.

2) Maybe there is some conflict with that another recaptcha module. As I understand it should use ContactController override as well.

 

Share this post


Link to post
Share on other sites

It appeared after some time ^^'

I've just tested once, it work fine !

I've tried many things and couldn't make them work (I'm bad at these stuff...)

 

So, Thank You VERY VERY VERY MUCH !

 

Share this post


Link to post
Share on other sites
3 hours ago, polosat said:

Well... I can guess only two options:

1) Check your recaptcha keys, maybe there are extra spaces etc.

2) Maybe there is some conflict with that another recaptcha module. As I understand it should use ContactController override as well.

 

 

Hey,

So, updated prestashop to 1.6.1.18 and it is working fine, no problems!

 

Thanks for the assist!

Share this post


Link to post
Share on other sites
On 13/4/2018 at 2:20 PM, polosat said:

Hi,

You can add these styles to the "Custom CSS" field:


#nar-gre {
    overflow: hidden;
}
#nar-gre > div {
    float: right;
}

Actually it seems I need to add an alignment option, but it'll be a bit later.

 

You're welcome, I'm glad it is useful:)

Thank you for the addon, work for me, i added the custom style suggested but it still to the left

Share this post


Link to post
Share on other sites
On 28.04.2018 at 5:41 PM, Drazh said:

Thank you for the addon, work for me, i added the custom style suggested but it still to the left

Try to clear browser cache and PrestaShop cache, maybe it's the issue.

If it doesn't help, please show me an example live page, I'll check it.

Share this post


Link to post
Share on other sites

It seems the code has been corrupted a bit, maybe it happened during copying. Please copy that CSS code again and make sure that the ">" symbol is not converted to ">"

#nar-gre {
    overflow: hidden;
}
#nar-gre > div {
    float: right;
}

 

Share this post


Link to post
Share on other sites

Hello, i'm new to the PrestaShop thing i installed and configured this module, as it has everything i need and seems awesome. But i don't seem to find a way to use it, i can't find a way to add it with Visual Composer. It doesn't show up on the elements page.

Thank You

Share this post


Link to post
Share on other sites

Hello,

Do you mean Live Edit functionality?

This module automatically appears at the Contact Us page, it can't be added via Live Edit.

Share this post


Link to post
Share on other sites
On 3/30/2018 at 2:13 PM, polosat said:

Hi everyone!

I want to share my contact form antispam module. It uses reCAPTCHA and a simple blacklist.
The module is fully compatible with PrestaShop 1.5, 1.6 and 1.7.
You just need to fill reCAPTCHA keys and it will work.

Get reCAPTCHA keys here: https://www.google.com/recaptcha/admin

Any feedback is highly appreciated.

 

Version 1.1.0

 - added a choosing language option

 

1.thumb.jpg.1cb8d74c459c30ede3f2b49436d1c3b4.jpg2.thumb.jpg.b30016a4154170cc0af9ae41d1c34b81.jpg

 

 

notarobot.zip

Hi, when i want to install module - i got this error: 

The following module (s) could not be installed properly: notarobot:     Can not install override: PostProcess method in ContactController class is already overwritten.

Can help me with this?

Thanks a lot!

Share this post


Link to post
Share on other sites
11 hours ago, Daniela said:

Hi, when i want to install module - i got this error: 

The following module (s) could not be installed properly: notarobot:     Can not install override: PostProcess method in ContactController class is already overwritten.

Can help me with this?

Thanks a lot!

Hi,

Sure, please send me you current /override/controllers/ContactController.php file, I'll combine it with the module's file.

Share this post


Link to post
Share on other sites
11 hours ago, polosat said:

Hi,

Sure, please send me you current /override/controllers/ContactController.php file, I'll combine it with the module's file.

Hi, i attach my file /override/controllers/front/ContactController.php. Thanks a lot for your help!

ContactController.php

Share this post


Link to post
Share on other sites
On 11.05.2018 at 9:11 AM, Daniela said:

Hi, i attach my file /override/controllers/front/ContactController.php. Thanks a lot for your help!

ContactController.php

Hi,

Sorry for the delay...

Here is the updated override. You need to delete your current override file, install the module and then upload the attached override file to your server.

ContactController.php

Share this post


Link to post
Share on other sites
12 hours ago, polosat said:

Hi,

Sorry for the delay...

Here is the updated override. You need to delete your current override file, install the module and then upload the attached override file to your server.

ContactController.php

Hi, I delete the ContactContrller.php from override, but now when i try to install the module i get this : "The following module(s) could not be installed properly:

  • notarobot : 
        Nu se poate instala override-ul: Class ContactControllerOverrideOriginal5afbc024d18e0 does not exist

Thanks a lot for your help!

"

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More