ProxiBlue / reCaptcha

Clean implementation of Google reCaptcha for magento
http://www.proxiblue.com.au/blog/magento-recaptcha/
GNU General Public License v3.0
86 stars 61 forks source link

Query ported from support ticket system #19

Closed ProxiBlue closed 6 years ago

ProxiBlue commented 6 years ago

Hi Lucas,

I'm just looking at installing your ReCaptcha module, https://github.com/ProxiBlue/reCaptcha, thanks for creating it. :)

Just a few thoughts, and an integration query that I hope you don't mind me asking you.

Typo

I noticed the following typo, is this intentional?

array('value' => 'en-GB', 'label' => 'English (US)'),

should it be..

array('value' => 'en-GB', 'label' => 'English (GB)'),

on Lang.php

Reviews

Configuration > Customer Configuration > CAPTCHA > Forms

CAPTCHA for "Create user" and "Forgot password" forms is always enabled if chosen

My suggestion is that you include Reviews with this too. As if you enable ReCaptcha for product reviews, then the Displaying Mode would always want to be 'Always'.

As it stands I have enabled Displaying Mode: Always, as my priority is for Reviews. However, I believe that if I were to enable CAPTCHA on other options, I would not want Displaying Mode to be After number of attempts to login.

Ideally each list option would have it's own display option.

Reviews integration query

I've enabled ReCaptcha on Reviews, however, if the submission is unsuccessful, when the I am not a Robot is not checked, the content is lost on page reload.

Do I assume I have to follow this https://github.com/ProxiBlue/reCaptcha#contact-us-captcha for product reviews? See below..

Unfortunately magento core templates do not accommodate reloading the posted form data. This means that if the captcha was incorrect, the user will be given a new blank form. Obviously not ideal.

As this is the Product Reviews page, I'm unsure whether this is expected. Can you clarify the expected results.

N.B I have my product reviews form on my product page.

Thanks again for creating this extension.

Alexis

ProxiBlue commented 6 years ago

I noticed the following typo, is this intentional?

array('value' => 'en-GB', 'label' => 'English (US)'),

should it be..

array('value' => 'en-GB', 'label' => 'English (GB)'),

on Lang.php

Thanks, I have fixed this.

CAPTCHA for "Create user" and "Forgot password" forms is always enabled if chosen

My suggestion is that you include Reviews with this too. As if you enable ReCaptcha for product reviews, then the Displaying Mode would always want to be 'Always'.

As it stands I have enabled Displaying Mode: Always, as my priority is for Reviews. However, I believe that if I were to enable CAPTCHA on other options, I would not want Displaying Mode to be After number of attempts to login.

Ideally each list option would have it's own display option.

This is not a bad idea, but will not be implemented. I simply don't have the time. If someone wants to do the effort, they are free to do so and submit a PR.

This feature would require a change how magento core system configuration functions. Core magento does not allow you to select a different dropdown option for Displaying Mode, depending on captcha area(s) selected. If that is possible, and I am not aware of such, I am happy to look into it. The goal of this reCaptcha was to be a drop-in replacement, and not make major changes to how admin configuration works at the same time.

Unfortunately, as per how core system config directive work, this is an all or nothing setting.

Do I assume I have to follow this https://github.com/ProxiBlue/reCaptcha#contact-us-captcha for product reviews? See below..

Yes, to retain the form data upon incorrect capctha. If implemented correctly, it should not matter that your review form is part of the product page, as the form that is displayed IS the same form.phtml (which should just be injected by layout directives into the product page) By placing that into the given form.phtml of reviews, the reviews form should retain values anywhere it was injected.