Re: Support Thread for Google reCAPTCHA plugin
hi, i have the latest version of this mod installed on 1.5, works well, thanks.
However, first of all i didn't upload tpl_modules_create_account.php because i thought that this might mean then that there would not be a captcha on the account create page, i dont want a captcha there. However, when i tried to create an account, even though there was no captcha there, when i submitted it said incorrect captcha and couldn't create an account, and thus couldn't checkout. So, i just uploaded the file and it worked fine, but there is a captcha there. My first question is how can i sort so dont have a captcha on the account create page, if possible?
When an incorrect captcha is entered how do i change the alert message text? It is currently something like 'incorrect captcha sol' or such like.
Module and help appreciated, thanks.
Matt
Re: Support Thread for Google reCAPTCHA plugin
Quote:
Originally Posted by
mattys
hi, i have the latest version of this mod installed on 1.5, works well, thanks.
However, first of all i didn't upload tpl_modules_create_account.php because i thought that this might mean then that there would not be a captcha on the account create page, i dont want a captcha there. However, when i tried to create an account, even though there was no captcha there, when i submitted it said incorrect captcha and couldn't create an account, and thus couldn't checkout. So, i just uploaded the file and it worked fine, but there is a captcha there. My first question is how can i sort so dont have a captcha on the account create page, if possible?
In the file /includes/classes/observers/class.google_recaptcha.php on line 14
change this:
Code:
$this->attach($this, array('NOTIFY_CONTACT_US_CAPTCHA_CHECK', 'NOTIFY_CREATE_ACCOUNT_CAPTCHA_CHECK', 'NOTIFY_REVIEWS_WRITE_CAPTCHA_CHECK'));
to
Code:
$this->attach($this, array('NOTIFY_CONTACT_US_CAPTCHA_CHECK','NOTIFY_REVIEWS_WRITE_CAPTCHA_CHECK'));
ie delete the 'NOTIFY_CREATE_ACCOUNT_CAPTCHA_CHECK', bit. This stops it 'listening' for the create account hook.
Quote:
Originally Posted by
mattys
When an incorrect captcha is entered how do i change the alert message text? It is currently something like 'incorrect captcha sol' or such like.
That text is supplied by google - if you wanted to replace it with your own then on line 28 of that same file there is:
Code:
$messageStack->add($event_array[$eventID], $resp->error);
replace $resp_error with your own error message. If you want it multi-language you would have to add an entry like
Code:
define('ENTRY_CAPTCHA_CHECK_ERROR','Incorrect Captcha entered - please try again.');
to includes/languages/english/Your_Template/contact_us.php and then instead of line 28 in the class file use
Code:
$messageStack->add($event_array[$eventID], ENTRY_CAPTCHA_CHECK_ERROR);
Quote:
Originally Posted by
mattys
Module and help appreciated, thanks.
Matt
Glad you are finding it useful.
Regards
David
Re: Support Thread for Google reCAPTCHA plugin
Thank you for your contribution. I have zc 1.3.9h and installed this mod according to instructions. Everything works fine. My only trouble is I can not find where to put the customization code for google recaptcha.
The instructions in the read me file are
" these can be specified by including the following code in the html before the code added in steps 5 and 6 (anywhere will do, at the begining on line 15 works for both files)" but there step 5 is about uploading files and step 6 does not exist.
Thanks
Nick
Re: Support Thread for Google reCAPTCHA plugin
Hi Nick
The custom code should go in the includes/templates/Your_Template/templates/tpl_contact_us_default.php (and the create account, write review templates). The instruction should refer to step 3 (that bit of the readme was written for the previous version and I forgot to update it - sorry).
I'll update the instructions.
Regards
David
Re: Support Thread for Google reCAPTCHA plugin
That was super fast answer! thank you.
Nick
Re: Support Thread for Google reCAPTCHA plugin
Hi, thank you for the contrib.
I managed to get the contact us to work; but not the create account, even when the entry is wrong, the registration still goes through.
I have checked the tpl_modules_create_account.php file, the only thing is different from the reCaptcha copy is the referral mod.
Here: http://www.simpleartsplanet.com/create-account
Re: Support Thread for Google reCAPTCHA plugin
Quote:
Originally Posted by
saplanet
Hi, thank you for the contrib.
I managed to get the contact us to work; but not the create account, even when the entry is wrong, the registration still goes through.
I have checked the tpl_modules_create_account.php file, the only thing is different from the reCaptcha copy is the referral mod.
Here:
http://www.simpleartsplanet.com/create-account
I managed to get it to work. It's this instruction:
4c: In /includes/modules/YOUR_TEMPLATE/create_account.php, at around line 248 you should see the line:
if ($error == true) {
immediately before that add in the following code:
$zco_notifier->notify('NOTIFY_CREATE_ACCOUNT_CAPTCHA_CHECK');
Although running on zc1.5.1 engine, my cart was upgraded from 1.39h. Added that code, and everything is working! :laugh:
Re: Support Thread for Google reCAPTCHA plugin
Quote:
Originally Posted by
saplanet
I managed to get it to work. It's this instruction:
4c: In /includes/modules/YOUR_TEMPLATE/create_account.php, at around line 248 you should see the line:
if ($error == true) {
immediately before that add in the following code:
$zco_notifier->notify('NOTIFY_CREATE_ACCOUNT_CAPTCHA_CHECK');
Although running on zc1.5.1 engine, my cart was upgraded from 1.39h. Added that code, and everything is working! :laugh:
Sounds like your /includes/modules/YOUR_TEMPLATE/create_account.php was based on the old 1.39h version, so needed the 1.3x instructions.
Glad it's working now.
Regards
David
Re: Support Thread for Google reCAPTCHA plugin
I use Zen Cart 1.3.8.
I installed Google reCaptcha and I followed the instructions.
I used your form (from "pre-v1.5.1).
I read:
Code:
$ zco_notifier-> notify ('NOTIFY_CREATE_ACCOUNT_CAPTCHA_CHECK');
and after
Code:
if ($ error == true) {
This also happens through Contact Us form
What's wrong?
Regards
Mister D
Re: Support Thread for Google reCAPTCHA plugin
Quote:
Originally Posted by
Nightfly66
I use Zen Cart 1.3.8.
I installed Google reCaptcha and I followed the instructions.
I used your form
(from "pre-v1.5.1).
I read:
Code:
$ zco_notifier-> notify ('NOTIFY_CREATE_ACCOUNT_CAPTCHA_CHECK');
and after
Code:
if ($ error == true) {
This also happens through Contact Us form
What's wrong?
Regards
Mister D
Hi Mister
Not quite sure what error you are getting
But if you used the pre-1.5 create_account.php included in the zip there should be no edits to the file needed.
Regards
David