I've started this thread to provide support for my Google reCAPTCHA plugin. http://www.zen-cart.com/downloads.php?do=file&id=1455
Any questions or problems let me know below
Regards
David
Printable View
I've started this thread to provide support for my Google reCAPTCHA plugin. http://www.zen-cart.com/downloads.php?do=file&id=1455
Any questions or problems let me know below
Regards
David
I found that the template folder requires an extra templates folder after the custom template path. It all works fine now after doing that :smile:
Many thanks for this module
@HeathenMagic - you are correct, thanks for the feedback. I will submit an updated version to correct that.
Regards
David
Thank you for this mod/plug-in!
Getting an HTTPS error on the create_account page (prompting the user if they want to view only content that is secure). Any idea how to remedy this issue?
Thank you.
@willieWontGo
Thanks for trying the plugin. I hadn't tested it on HTTPS so hadn't encountered that problem.
The solution is simple - in the Contact-us template file change the line (step 4 in instalation, step 6 for create account)
to thisCode:<?php echo recaptcha_get_html($publickey, $resp->error); ?>
The extra 'true' tells it to use SSL and should solve the problem.Code:<?php echo recaptcha_get_html($publickey, $resp->error, true); ?>
In the next version I'll get it to pick up the HTTPS automatically
Regards
David
Thank you, David.
All fixed, all set.
I appreciate your contribution.
Any suggestions for adding captchas to ask a questions mod. I have put the code in the header.php of pages/ask a question. And also added it to templates/ask a question.default. I changed the code to reflect ask a question 1 time in header.php and 4 instantances in template default. But it does not work. I can see a thin box below the message box but captcha does not show and cannot not send an email through to myself. I am not sure where to go from here. I am installing on 1.5. The contact us captcha works fine.
I've not used the ask a question mod, but I've just d/loaded it and had a quick look.
I think that in the header.php you need to add in code in a similar way to the contact-us header.php (as per step 3 in the reCAPATCHA instructions, inserted at about line 42 in the ask a question header file)
So
Then in the template file add in theCode:// add in reCaptcha check
$resp = recaptcha_check_answer ($privatekey,
$_SERVER["REMOTE_ADDR"],
$_POST["recaptcha_challenge_field"],
$_POST["recaptcha_response_field"]);
if (!$resp->is_valid) {
// set the error code so that we can display it
$messageStack->add('contact', $resp->error);
$error = true;
}
then change the line below from
if ($zc_validate_email and !empty($enquiry) and !empty($name)) {
to
if ($zc_validate_email and !empty($enquiry) and !empty($name) and $error == false) {
line at about line 80 in tpl_ask_a_question_defaultCode:<?php echo recaptcha_get_html($publickey, $resp->error); ?>
Hi,
I'm using ZenCart 1.3.9h and have successfully installed your mod on the Contact Us page.
If I enter the incorrect Captcha code and press <enter>, then the validation fails (as it should).
However if I enter the incorrect Captcha code and click on <send> then the message is sent successfully.
Any ideas what the problem may be? :frusty:
Many thanks for your mod and your help!
Ronel
Hi Ronel
Did you manually add the code to /modules/pages/contact-us/header.php?
If so, I suspect you didn't change the line below from
toCode:if ($zc_validate_email and !empty($enquiry) and !empty($name)) {
Hope this helps. If not post the code from the file here and I'll see what I can see.Code:if ($zc_validate_email and !empty($enquiry) and !empty($name) and $error == false) {
Regards
David