Zen Cart Logo
Forums / All Other Contributions/Addons / Support Thread for Google reCAPTCHA plugin

Support Thread for Google reCAPTCHA plugin

Views: 176,311

Results 561 to 580 of 694
28 Jun 2022, 14:05
#561
jack017 avatar

jack017

New Zenner

Join Date:
Nov 2017
Posts:
18
Plugin Contributions:
0

Support Thread for Google reCAPTCHA plugin

torvista:

Note to admin, Plugin should have the Github link
https://github.com/torvista/Zen_Cart-Google_reCAPTCHA

The new plug-in download address you sent has many more files than the 1.51 version of the plug-in
I have a few questions:
1, Where to fill in the secret key, I can't find it.
2, I just want to show the captcha on the contact us page, customer registration, comments don't need captcha. How to close it?
3,Are there any files in the zencart version 1.51 that need to be paid attention to?

28 Jun 2022, 14:29
#562
njcyx avatar

njcyx

Zen Follower

Join Date:
Apr 2019
Posts:
362
Plugin Contributions:
0

Re: Support Thread for Google reCAPTCHA plugin

jack017:

The new plug-in download address you sent has many more files than the 1.51 version of the plug-in
I have a few questions:
1, Where to fill in the secret key, I can't find it.
2, I just want to show the captcha on the contact us page, customer registration, comments don't need captcha. How to close it?
3,Are there any files in the zencart version 1.51 that need to be paid attention to?

Please read "README-Google-reCAPTCHA.txt" in the plug-in zip file you downloaded for the installation. You will get your answers.

  1. /includes/functions/extra_functions/recaptchalib.php Line 9 and 10.

  2. Manually add the <?php echo recaptcha_get_html(); ?> to your own template files so this plug-in will be shown up.

Ask a question: tpl_ask_a_question_default.php

Contact us: tpl_contact_us_default.php

Create a new account: tpl_modules_create_account.php

This plug-in doesn't support "Ask a question" by default. But here is a fix. See my previous post.

https://www.zen-cart.com/showthread.php?198357-Support-Thread-for-Google-reCAPTCHA-plugin&p=1379177#post1379177

29 Jun 2022, 14:05
#564
njcyx avatar

njcyx

Zen Follower

Join Date:
Apr 2019
Posts:
362
Plugin Contributions:
0

Re: Support Thread for Google reCAPTCHA plugin

Hi @torvista, thanks for your post. I'm not aware that there is a new version on Github. I'm still using the version 3.4 downloaded from zen cart site.

@jack017, please disregard my post. It is based on version 3.4. Please try the version 3.6 from the Github link above (if you are using zen cart 1.57d).

29 Jun 2022, 18:15
#565
njcyx avatar

njcyx

Zen Follower

Join Date:
Apr 2019
Posts:
362
Plugin Contributions:
0

Re: Support Thread for Google reCAPTCHA plugin

Hi @torvista, I just installed the github version (v3.6) plug-in in my testing site. It works fine, but it seems to me that it is slower to be shown up on the page than the previous version (v3.4).

By my test, it takes about 1s to load for v3.4 and about 2s to load for v3.6. My server is zen cart v1.57d with php 7.4. Is there anyway I can set this plug-in to be loaded faster?

07 Oct 2022, 16:18
#566
celextel108 avatar

celextel108

New Zenner

Join Date:
Sep 2022
Location:
Chennai
Posts:
37
Plugin Contributions:
0

Re: Support Thread for Google reCAPTCHA plugin

[QUOTE=torvista;1389156]Site admin, please add my github repo
https://github.com/torvista/Zen_Cart-Google_reCAPTCHA

We are using Zen Cart® v1.5.7d under PHP 8.0.22 Version.

Just installed your latest version from github.com.

Contact us page is showing Google reCAPTCHA field blank.

Page source is showing the following [sitekey changed] :

	
        <fieldset>
	<script src="https://www.recaptcha.net/recaptcha/api.js?hl=en" async="" defer=""></script>
	<div class="g-recaptcha" data-sitekey="XXXXX" style="margin:5px"></div>
	</fieldset>

Submitting Contact Us page is showing following error message:
> Please click the "I'm not a robot" reCaptcha box to prove you are human!

We are not seeing any other error logs.

Please guide me as to what to do in this regard.

Thanks,

Lakshmanan

08 Oct 2022, 12:32
#567
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,866
Plugin Contributions:
7

Re: Support Thread for Google reCAPTCHA plugin

Is that api.js loading? Use Developer Tools->Network with JS filter to check.

08 Oct 2022, 13:18
#568
celextel108 avatar

celextel108

New Zenner

Join Date:
Sep 2022
Location:
Chennai
Posts:
37
Plugin Contributions:
0

Re: Support Thread for Google reCAPTCHA plugin

torvista:

Is that api.js loading? Use Developer Tools->Network with JS filter to check.

Thanks @torvista for your response.

Content-Security-Policy in our website is not allowing reCAPTCHA to show up in our website.

reCAPTCHA is showing up without the Content-Security-Policy Meta Tag with the following Page Source [sitekey changed]:

<fieldset>
<script src="https://www.recaptcha.net/recaptcha/api.js?hl=en" async="" defer=""></script>
<div class="g-recaptcha" data-sitekey="6Led-h19" style="margin:5px"><div style="width: 304px; height: 78px;"><div><iframe title="reCAPTCHA" src="https://www.recaptcha.net/recaptcha/api2/anchor?ar=1&k=6Led-h19&co=aHR0cHM6Ly93d3cuY2VsZXh0ZWwuYml6OjQ0Mw..&hl=en&v=vP4jQKq0YJFzU6e21-BGy3GP&size=normal&cb=gdu5ptc1j68c" role="presentation" name="a-90eefeo4gtr8" scrolling="no" sandbox="allow-forms allow-popups allow-same-origin allow-scripts allow-top-navigation allow-modals allow-popups-to-escape-sandbox allow-storage-access-by-user-activation" width="304" height="78" frameborder="0"></iframe></div><textarea id="g-recaptcha-response" name="g-recaptcha-response" class="g-recaptcha-response" style="width: 250px; height: 40px; border: 1px solid rgb(193, 193, 193); margin: 10px 25px; padding: 0px; resize: none; display: none;"></textarea></div><iframe style="display: none;"></iframe></div>
</fieldset>

reCAPTCHA is not showing up even after modifying the Meta Tag as follows:

<meta http-equiv="Content-Security-Policy" content="default-src 'self'; style-src 'self' 'unsafe-inline'; script-src 'self' https://www.paypalobjects.com https://ajax.googleapis.com/ https://www.recaptcha.net/ 'unsafe-inline'; img-src 'self' https://www.paypalobjects.com/ https://fpdbs.paypal.com/ https://fpdbs.sandbox.paypal.com/; child-src 'self' https://www.recaptcha.net/ https://www.google.com; object-src 'self' https://docs.google.com; base-uri 'self'; form-action 'self' https://www.paypal.com/ https://uri.paypal.com/ https://www.sandbox.paypal.com/;">

Please suggest us if anything else has to be added for the reCAPTCHA to work with the Content-Security-Policy Meta Tag.

Thanks,

Lakshmanan

08 Oct 2022, 14:02
#569
celextel108 avatar

celextel108

New Zenner

Join Date:
Sep 2022
Location:
Chennai
Posts:
37
Plugin Contributions:
0

Re: Support Thread for Google reCAPTCHA plugin

reCAPTCHA is showing up after modifying the Content-Security-Policy Meta Tag as follows:

<meta http-equiv="Content-Security-Policy" content="default-src 'self'; style-src 'self' 'unsafe-inline' 'nonce-{NONCE}'; script-src 'self' https: 'nonce-{NONCE}' https://www.paypalobjects.com https://ajax.googleapis.com/ https://www.recaptcha.net/ 'unsafe-inline'; img-src 'self' https://www.paypalobjects.com/ https://fpdbs.paypal.com/ https://fpdbs.sandbox.paypal.com/; child-src 'self' https://www.recaptcha.net/ https://www.google.com; object-src 'self' https://docs.google.com; base-uri 'self'; form-action 'self' https://www.paypal.com/ https://uri.paypal.com/ https://www.sandbox.paypal.com/;">

We have added 'nonce-{NONCE}' after we went through the Frequently Asked Questions at the following URL:
https://developers.google.com/recaptcha/docs/faq

I'm using Content-Security-Policy (CSP) on my website. How can I configure it to work with reCAPTCHA?
We recommend using the nonce-based approach documented with CSP3. Make sure to include your nonce in the reCAPTCHA api.js script tag, and we'll handle the rest.
Note: reCAPTCHA also works with 'strict-dynamic' on browsers that support it.
Alternatively, please add the following values to the directives:
script-src https://www.google.com/recaptcha/, https://www.gstatic.com/recaptcha/
frame-src https://www.google.com/recaptcha/, https://recaptcha.google.com/recaptcha/

Thanks @torvista for providing this useful Zen Cart Google reCAPTCHA Plugin.

Lakshmanan

23 Nov 2022, 20:22
#570
sw1138lr avatar

sw1138lr

New Zenner

Join Date:
Jun 2012
Posts:
94
Plugin Contributions:
0

Re: Support Thread for Google reCAPTCHA plugin

We installed the ReCaptcha into the "Contact Us" page but now the "Create an Account" page is asking the customer to check the "I'm not a Robot" but there is no box displayed on the page so they can't create an account.

How do I add the "I'm not a Robot" to the "Create an Account" page?

23 Nov 2022, 20:40
#571
sw1138lr avatar

sw1138lr

New Zenner

Join Date:
Jun 2012
Posts:
94
Plugin Contributions:
0

Re: Support Thread for Google reCAPTCHA plugin

Were to you add "<?php echo recaptcha_get_html(); ?>" to the tpl_modules_create_account.php file? Specifically which line of code should it be in between.

25 Nov 2022, 13:19
#572
bumba000 avatar

bumba000

Totally Zenned

Join Date:
Feb 2007
Location:
Pennsylvania
Posts:
856
Plugin Contributions:
0

Re: Support Thread for Google reCAPTCHA plugin

Hello All. We're running a 1.5.6c on PHP 7.3.33. Just downloaded and installed latest version. Added google keys. Everything appears to be working, but the contact form can be sent successfully without clicking the captcha box first. Please advise..

Thank you,
John

27 Nov 2022, 14:17
#573
bumba000 avatar

bumba000

Totally Zenned

Join Date:
Feb 2007
Location:
Pennsylvania
Posts:
856
Plugin Contributions:
0

Re: Support Thread for Google reCAPTCHA plugin

I still haven't been able to figure out why this isn't working. I did find in the blass.google_recaptcha.php file on line 15 a private array named private $pages_to_checkcheck = array(); I do believe it's supposed to be private $pages_to_check = array();. Also on line 42 of the same file I find $event_array = array('NOTIFY_CONTACT_US_CAPTCHA_CHECK' => 'contact', I'm thinking this is supposed to be $event_array = array('NOTIFY_CONTACT_US_CAPTCHA_CHECK' => 'contact_us',.

Either way it still isn't working. There are no error logs being generated by any of this.

Thanks again,
John

28 Nov 2022, 08:38
#574
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,866
Plugin Contributions:
7

Re: Support Thread for Google reCAPTCHA plugin

Just downloaded and installed latest version.
From Github?

28 Nov 2022, 16:26
#575
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,866
Plugin Contributions:
7

Re: Support Thread for Google reCAPTCHA plugin

I've just noticed the plugin page has no link to the Github repository I maintain:
https://github.com/torvista/Zen_Cart-Google_reCAPTCHA

30 Nov 2022, 20:02
#577
bumba000 avatar

bumba000

Totally Zenned

Join Date:
Feb 2007
Location:
Pennsylvania
Posts:
856
Plugin Contributions:
0

Re: Support Thread for Google reCAPTCHA plugin

Anyone? Any ideas?

30 Nov 2022, 20:24
#578
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,760
Plugin Contributions:
9

Re: Support Thread for Google reCAPTCHA plugin

bumba000:

Anyone? Any ideas?

Maybe try the github version that torvista told you about?

30 Nov 2022, 20:49
#579
bumba000 avatar

bumba000

Totally Zenned

Join Date:
Feb 2007
Location:
Pennsylvania
Posts:
856
Plugin Contributions:
0

Re: Support Thread for Google reCAPTCHA plugin

dbltoe:

Maybe try the github version that torvista told you about?

I tend to not trust very much so I prefer to download from zc. The version that I downloaded was added to zencart just an hour or so before I downloaded it. I figured they'd be monitoring this support thread...

Thanks,
John

30 Nov 2022, 23:26
#580
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,682
Plugin Contributions:
56

Re: Support Thread for Google reCAPTCHA plugin

On 1.5.8/bootstrap clicking send without checking the box doesn't send as expected - so it works fine. Not sure about 1.5.6.