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

Support Thread for Google reCAPTCHA plugin

Views: 176,318

Results 81 to 100 of 694
04 Jun 2013, 11:49
#81
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Support Thread for Google reCAPTCHA plugin

David Allen:

Hi mc
Looks like you have found a good solution to the problem of having different SSL and nonSSL domain names and hence different Google keys. For point 2 - the exact code that you suggest has already been implemented in the 1.51 version (great minds think alike :) )
Regards
David

Todayi was thinking about the solution(s) I posted and of course I didn't consider in which version of Zen Cart that the variable $request_type first appeared, so for those using older versions of Zen Cart I can not claim that my solutions (described or provided) will work.

I'll have to check out the new version of reCaptcha, although in review of the previous posts (Dr. Byte's I think) it seems like I'll have to incorporate the appropriate "event" notifier code in version 1.5 (or update to 1.5.1) to trigger the action(s).

I'm still considering implementing the method I described in my writeup and when I do, I'll post it. Referring to an alternate method of handling the keys associated with SSL and NONSSL to try to simplify "installation".

12 Jun 2013, 09:46
#82
david_allen avatar

david_allen

Zen Follower

Join Date:
Feb 2008
Location:
Amersham, Buckinghamshire, United Kingdom
Posts:
141
Plugin Contributions:
1

Re: Support Thread for Google reCAPTCHA plugin

Someone sent me a private message asking for help with this mod. I'm answering it here so that others may benefit :)
Original Question:

Hi David,

I am using "Report Cheaper Price" Module from Zen Cart,

And I see your module "Google reCAPTCHA", and I want to integration your module can working with "Report Cheaper Price"

Can you help me on this?

Thank you very much of your time and help.

Looking at the mod you mention the integration should be quite easy. It is essentially the same process as integrating my mod into any of the pages in a pre-1.51 cart.

You need to add the code to display the reCAPTCHA to /includes/templates/YOUR_TEMPLATE/templates/tpl_report_a_price_default.php (see step 3 in the instructions) I suggest adding at around line 93.
If you see step 4a in the installation instructions and instead apply that to /includes/modules/pages/report_a_price/header_php.php at around line 44. You'll need to add the ```
and $error == false

That should be it.
Regards
15 Jun 2013, 15:05
#83
jeking avatar

jeking

Totally Zenned

Join Date:
Oct 2005
Location:
Chicago, IL USA
Posts:
1,592
Plugin Contributions:
0

Re: Support Thread for Google reCAPTCHA plugin

How would I disable this for the Write Reviews page and the Create Account page?

15 Jun 2013, 15:27
#84
jeking avatar

jeking

Totally Zenned

Join Date:
Oct 2005
Location:
Chicago, IL USA
Posts:
1,592
Plugin Contributions:
0

Re: Support Thread for Google reCAPTCHA plugin

Found my answer in Post #63.

20 Jun 2013, 20:11
#85
su35 avatar

su35

Zen Follower

Join Date:
Oct 2011
Posts:
168
Plugin Contributions:
0

Re: Support Thread for Google reCAPTCHA plugin

Hi David

Thanks for this great mod. After installing on my version 1.5.1 site which uses FEC, I found it doesn't work on my account create page. I have the Fast and Easy Checkout plugin, which has it own fec_create_account.php file, installed. If just add "$zco_notifier->notify('NOTIFY_CREATE_ACCOUNT_CAPTCHA_CHECK');" into the fec_create_account.php, there is no error message appeared when the input is wrong. Could you help?

11 Jul 2013, 20:42
#86
gfrex avatar

gfrex

New Zenner

Join Date:
Jul 2013
Posts:
3
Plugin Contributions:
0

Re: Support Thread for Google reCAPTCHA plugin

I'm having some issues getting the captcha to work on the Contact Us page. It shows up fine, but if you fill out the form and leave the captcha blank, or type the wrong words, it still submits the form. No errors at all. It DOES show the captcha error if you forget to fill out part of the form, though.

Both the create account and new review pages work perfectly with the captcha. I tried manually adding the lines and I tried uploading all the files. Neither way worked.

Using this on Zen Cart v1.3.9.

11 Jul 2013, 22:29
#87
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Support Thread for Google reCAPTCHA plugin

Probably missing things from your 139 site that the plugin depends on.

12 Jul 2013, 18:42
#88
gfrex avatar

gfrex

New Zenner

Join Date:
Jul 2013
Posts:
3
Plugin Contributions:
0

Re: Support Thread for Google reCAPTCHA plugin

DrByte:

Probably missing things from your 139 site that the plugin depends on.Yea. This seems to be the case. I just did a clean install of 139 on another server and that fixed everything. Now I'm working on comparing the two sites to see whats different.

13 Jul 2013, 01:25
#89
gfrex avatar

gfrex

New Zenner

Join Date:
Jul 2013
Posts:
3
Plugin Contributions:
0

Re: Support Thread for Google reCAPTCHA plugin

Just solved the issue with the captcha not validating on the contact page.

I had a backup of the header.php file (without the captcha) in the contact us folder under pages. I named the backup 'header.php-bak.php' and it seems like Zen Cart was loading that file instead of the one with the captcha script! Renaming the backup file to 'backup-header.php.php' solved the issue. (Of course deleting or moving the backup file to another location fixes it as well.l)

13 Jul 2013, 01:36
#90
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Support Thread for Google reCAPTCHA plugin

Right. Any files matching the pattern "header_php*.php" will be auto-loaded.

Similar to ALL files ending in ".php".

So, in the future, instead of renaming "fred.php" to "fred-bak.php", rename it from "fred.php" to "fred.bak" or "fred.php.bak".
Basically, change the ".php" suffix instead of the prefix before it.

19 Sep 2013, 12:47
#91
hrinfo avatar

hrinfo

New Zenner

Join Date:
May 2008
Posts:
98
Plugin Contributions:
0

Re: Support Thread for Google reCAPTCHA plugin

Hi guys

I have managed to setup a contact form as a sidebox. i wold love to have captcha on it is spammed like nothing. I have tested the Google recaptcha and works perfectly but it is way to big for a sidebox. I need it to be around 200px and if anyone has any idea if that is possible and how will be great.

Regards

Tassos

19 Sep 2013, 13:43
#92
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Support Thread for Google reCAPTCHA plugin

hrinfo:

Hi guys

I have managed to setup a contact form as a sidebox. i wold love to have captcha on it is spammed like nothing. I have tested the Google recaptcha and works perfectly but it is way to big for a sidebox. I need it to be around 200px and if anyone has any idea if that is possible and how will be great.

Regards

Tassos

Not to belittle recaptcha, what about using a hidden field, that if content is present then not to submit your form? (Similar to what is done in ZC 1.5.1 on the contact us form?)

To answer the question, I thought there was some CSS associated with recaptcha, so you would have to shrink it, but realize the smaller you make it, the harder it is for a user to read and then submit the expected info which leads back to my previous portion of my answer.

21 Oct 2013, 15:21
#93
giftmeister avatar

giftmeister

Zen Follower

Join Date:
Jan 2009
Location:
Montreal, Canada
Posts:
230
Plugin Contributions:
0

Re: Support Thread for Google reCAPTCHA plugin

Thanks for the mod, David.

I'm on 1.51, smart enough to follow the simple instructions...and it doesn't work. The recaptcha box displays, but entering the wrong text or entering nothing has no effect as the page still advances.

It's needed only for the account creation page so, after double-checking everything, I tried what was written earlier about the line "$this->attach($this, array..." and deleted the unneeded parts for Contact and Review and it still didn't work. My ZC was installed as 1.51, no upgrade, so another post with a similar issue does not apply. I tried the box in different places in tpl_modules_create_account and it was the same result each time.

There are no other mods for signing up, I'm using the standard process and with all products virtual so no shipping address asked for. Any ideas?

21 Oct 2013, 16:12
#94
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Support Thread for Google reCAPTCHA plugin

giftmeister:

Thanks for the mod, David.

I'm on 1.51, smart enough to follow the simple instructions...and it doesn't work. The recaptcha box displays, but entering the wrong text or entering nothing has no effect as the page still advances.

It's needed only for the account creation page so, after double-checking everything, I tried what was written earlier about the line "$this->attach($this, array..." and deleted the unneeded parts for Contact and Review and it still didn't work. My ZC was installed as 1.51, no upgrade, so another post with a similar issue does not apply. I tried the box in different places in tpl_modules_create_account and it was the same result each time.

There are no other mods for signing up, I'm using the standard process and with all products virtual so no shipping address asked for. Any ideas?

Sure all the files were uploaded correctly? (Not to say that you didn't try to upload them, but that the process of uploading didn't go as expected.)

Also do you have any files that were renamed to "hide" them, but they are still being loaded because they end in php?

Uploaded to correct template, etc?

21 Oct 2013, 19:24
#95
david_allen avatar

david_allen

Zen Follower

Join Date:
Feb 2008
Location:
Amersham, Buckinghamshire, United Kingdom
Posts:
141
Plugin Contributions:
1

Re: Support Thread for Google reCAPTCHA plugin

giftmeister:

Thanks for the mod, David.

I'm on 1.51, smart enough to follow the simple instructions...and it doesn't work. The recaptcha box displays, but entering the wrong text or entering nothing has no effect as the page still advances.

It's needed only for the account creation page so, after double-checking everything, I tried what was written earlier about the line "$this->attach($this, array..." and deleted the unneeded parts for Contact and Review and it still didn't work. My ZC was installed as 1.51, no upgrade, so another post with a similar issue does not apply. I tried the box in different places in tpl_modules_create_account and it was the same result each time.

There are no other mods for signing up, I'm using the standard process and with all products virtual so no shipping address asked for. Any ideas?

Hi giftmeister, Not sure what has gone wrong. As you found out moving the box within the create account form shouldn't affect it. Removing the extra entries in the $this->attach.... should stop it being needed on those other pages. Can you check that it looks like

$this->attach($this, array('NOTIFY_CREATE_ACCOUNT_CAPTCHA_CHECK'));
``` to just have it on the create account page.

Regards
David
21 Oct 2013, 20:40
#96
giftmeister avatar

giftmeister

Zen Follower

Join Date:
Jan 2009
Location:
Montreal, Canada
Posts:
230
Plugin Contributions:
0

Re: Support Thread for Google reCAPTCHA plugin

mc and David, I triple-checked all the obvious things.

The ZC installation is in a directory- xyz.com/abc - but that doesn't seem to be an issue to Google and I wasn't even able to enter the directory on the Google recaptcha page (no slashes allowed).

Then I just thought that it might be due to Java being disabled in my browsers, but I re-enabled it in IE and the page (refreshed, started over) still advanced without entering anything in the captcha box.

21 Oct 2013, 20:51
#97
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Support Thread for Google reCAPTCHA plugin

giftmeister:

mc and David, I triple-checked all the obvious things.

The ZC installation is in a directory- xyz.com/abc - but that doesn't seem to be an issue to Google and I wasn't even able to enter the directory on the Google recaptcha page (no slashes allowed).

Then I just thought that it might be due to Java being disabled in my browsers, but I re-enabled it in IE and the page (refreshed, started over) still advanced without entering anything in the captcha box.

So, there is either something amiss with the installation or conflicting with another file/mod it would seem. I haven't looked at the newer installation instructions, but as I understand it is now possible to install google recaptcha without making modifications to any ZC 1.5.1 core files as a trigger was added in that could be used to provide the recaptcha. That said, an older version of the plugin provided direction to go into one (or more similar files) to add code to perform a check if the recaptcha was entered properly. If you look at those directions and then that file, you can see perhaps what is going wrong. There is a check that is needed: if the data is bad, then it stops flow and gives an error, if it is good, then it keeps on processing.

22 Oct 2013, 13:02
#98
giftmeister avatar

giftmeister

Zen Follower

Join Date:
Jan 2009
Location:
Montreal, Canada
Posts:
230
Plugin Contributions:
0

Re: Support Thread for Google reCAPTCHA plugin

it is now possible to install google recaptcha without making modifications to any ZC 1.5.1 core files

One line of code is added to the core page(s) where the Recap is needed. I have just one other mod- Export Shipping Info- and it doesn't affect the page where I need the Recap, tpl_modules_create_account.

Does this require Java on a visitor's computer or is it simply Javascript? Many people don't have the former.

Thanks, mc and David. I'll try one more time...hope it works because this mod is the simplest of all the Captcha mods here.

22 Oct 2013, 13:33
#99
giftmeister avatar

giftmeister

Zen Follower

Join Date:
Jan 2009
Location:
Montreal, Canada
Posts:
230
Plugin Contributions:
0

Re: Support Thread for Google reCAPTCHA plugin

Jeez, I figured it out- there's a mod I stopped using and didn't fully remove, Extra Fields On Customer Sign-Up. What I forgot were changes in includes/templates/create_account.php. Re-uploaded the original file and Recap works!

Sorry for the hassle and thanks for your time.

22 Oct 2013, 13:35
#100
david_allen avatar

david_allen

Zen Follower

Join Date:
Feb 2008
Location:
Amersham, Buckinghamshire, United Kingdom
Posts:
141
Plugin Contributions:
1

Re: Support Thread for Google reCAPTCHA plugin

It relies on javascript not java

For 1.51 no core files have to be changed, just the template files (eg tpl_modules_create_account) for the pages you want the reCAPTCHA to appear on.

One question, did you upgrade to 1.51 or was it a clean install? If the former I would check that you have the correct version of the file /includes/modules/YOUR_TEMPLATE/create_account.php as it sounds from your description as if this could be the problem
Regards
David