Re: Support Thread for Google reCAPTCHA plugin
Quote:
Originally Posted by
torvista
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?
Re: Support Thread for Google reCAPTCHA plugin
Quote:
Originally Posted by
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....77#post1379177
Re: Support Thread for Google reCAPTCHA plugin
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).
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?
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] :
HTML Code:
<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:
Quote:
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
Re: Support Thread for Google reCAPTCHA plugin
Is that api.js loading? Use Developer Tools->Network with JS filter to check.
Re: Support Thread for Google reCAPTCHA plugin
Quote:
Originally Posted by
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]:
HTML Code:
<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:
HTML Code:
<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
Re: Support Thread for Google reCAPTCHA plugin
reCAPTCHA is showing up after modifying the Content-Security-Policy Meta Tag as follows:
HTML Code:
<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
Thanks @torvista for providing this useful Zen Cart Google reCAPTCHA Plugin.
Lakshmanan
Re: Support Thread for Google reCAPTCHA
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?