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

Support Thread for Google reCAPTCHA plugin

Views: 176,322

Results 461 to 480 of 694
5 Dec 2019, 1:30 AM
#461
mc12345678 avatar

mc12345678

Totally Zenned

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

Support Thread for Google reCAPTCHA plugin

a02l1zz:

OK, I figured out what was going on. It was an earlier discussion in the thread the put me on to this, as I upgraded from 1.3.9h to 1.5.6c, I had an Create_Account.php file in my /store/includes/modules/Custom folder, which wasn't upgraded and was still 1.3.9h, and as such, was missing the line that needed to be added. I renamed the file, copied the standard file there, and it's now working. I just have to figure out if the differences between the 1.3.9h and the 1.5.6c files in relation to customization's, assuming that there were any in the first place.

I believe I placed the file there as I was making changes as it was 1.3.9h, so it may not even be necessary to have this file in my custom folder any longer, and I just confirmed that this is the case.

Thanks for everyone's help.

Regards

James
To address this/figure it out, obtain a copy of 1.3.9h (available through links on the main page of this website) and compare includes/templates/template_default/templates/tpl_create_account_default.php (or whatever equivalent file) to the one you had in your customs folder. Any changes made there would be the ones to consider incorporating into your current versions equivalent file. Like you said, may not be necessary, but won't really know until that file comparison is done...

10 Dec 2019, 4:54 PM
#462
linuxguy2 avatar

linuxguy2

Zen Follower

Join Date:
Sep 2013
Location:
Texas
Posts:
315
Plugin Contributions:
0

Re: Support Thread for Google reCAPTCHA plugin

mc12345678:

To address this/figure it out, obtain a copy of 1.3.9h (available through links on the main page of this website) and compare includes/templates/template_default/templates/tpl_create_account_default.php (or whatever equivalent file) to the one you had in your customs folder. Any changes made there would be the ones to consider incorporating into your current versions equivalent file. Like you said, may not be necessary, but won't really know until that file comparison is done...

Hi,

zen-cart-v1.5.6a-01042019
Google reCaptcha v3.4

Currently using Google ReCaptcha V2.
Upgrading to V3.
Other than updating the keys are there any other changes required to the ZC installation.

Thank You for your time!!!

30 Jan 2020, 4:21 PM
#463
dharrison avatar

dharrison

Zen Follower

Join Date:
Mar 2009
Location:
Essex, UK
Posts:
448
Plugin Contributions:
0

Re: Support Thread for Google reCAPTCHA plugin

Hi

I have got this working on my upgraded 1.5.6c website and it works on the contact form, but ignored on the registration form. https://shaftdirect.com/index.php?main_page=login

I can't understand why.

Please advise.

25 Feb 2020, 6:58 AM
#464
darkangel avatar

darkangel

Totally Zenned

Join Date:
Oct 2007
Location:
Emporia, Kansas
Posts:
1,729
Plugin Contributions:
0

Re: Support Thread for Google reCAPTCHA plugin

https://fantasiesrealm.com/market/
version:1.3.9h

I have installed this mod into my store. I have also redone this about 4 times. The first time cause I installed the items from the 1.39 folder like instructed. It has been such a long time that I have installed new mods or updated any for this version of cart that I got confused when it did not work, at all. after this last time of removing/reuploading the files again I still can not get it to work right.

I am so confused it just tisn't funny, well kinda sorts is but not.

When I go to the contact form or the registration form I do get the captcha stuff showing up, yay so far so good. Unfortunately that is all, when actually trying to use it I can test it with name and last initial, email and message....click to send and sure enough it goes through...without any images to verify you are not a robot but are human.

I then tried it as before with same email and spam in the message area and I get to check the "I ma not a robot" and it still gives me no images to verify with it actually allows the form to be sent.

I am at my wits end and trust me not many wits left to spare. What should I do, yes I did follow that to upload all files in the main includes folder, the upload only the files for 1.3.9+ and then after so many tries I got very confused later on in the instructions that then said DO NOT upload the files if using version prior to 1.5.1??????

Help me please.

25 Feb 2020, 2:52 PM
#465
lankeeyankee avatar

lankeeyankee

Totally Zenned

Join Date:
Jan 2007
Posts:
1,514
Plugin Contributions:
1

Re: Support Thread for Google reCAPTCHA plugin

I think you are misunderstanding the intent of the module. I sent a message through your site using fake details. This module is not designed to prevent that. It's to prevent bots from sending junk, not a person sending junk. Anyone can get around the captcha and send junk, well anyone with enough brain power to understand the captcha instructions. It's solely to prevent bots from posting.

25 Feb 2020, 9:40 PM
#466
darkangel avatar

darkangel

Totally Zenned

Join Date:
Oct 2007
Location:
Emporia, Kansas
Posts:
1,729
Plugin Contributions:
0

Re: Support Thread for Google reCAPTCHA plugin

OH, well I do not get bot mails, or not knew they were...LOL I thought this would stop it totally. Oh well I will remove it cause it is not detering the emails I am inundated with each month.

2 Apr 2020, 8:45 PM
#467
mjf91331 avatar

mjf91331

New Zenner

Join Date:
Sep 2019
Location:
Los Angeles
Posts:
14
Plugin Contributions:
0

Re: Support Thread for Google reCAPTCHA plugin

I'm trying to get this to work on Numinix's tableau2 template but I'm not sure where to put the code in tpl_contact_us_default.php because the file is completely custom compared to the default one.

I've added it after <?php echo zen_draw_input_field('should_be_empty', '', ' size="40" id="CUAS" style="visibility:hidden; display:none;" autocomplete="off"'); ?>
but the captcha isn't required so the spam is going through like usual.

<?php
/**
 * Page Template
 *
 * Loaded automatically by index.php?main_page=contact_us.<br />
 * Displays contact us page form.
 *
 * @package templateSystem
 * @copyright Copyright 2003-2012 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version GIT: $Id: Author: DrByte  Sun Aug 19 09:47:29 2012 -0400 Modified in v1.5.1 $
 */
?>
<div class="centerColumn col-lf" id="contactUsDefault">
<h1><?php echo HEADING_TITLE;?></h1>
<span class="required-note"><?php echo FORM_REQUIRED_INFORMATION; ?></span>

<?php echo zen_draw_form('contact_us', zen_href_link(FILENAME_CONTACT_US, 'action=send',($_SERVER['HTTPS'] == 'on' ? 'SSL' : 'NONSSL'))); ?>

<?php
  if (isset($_GET['action']) && ($_GET['action'] == 'success')) {
?>
<!-- 
	/*
	 *  Code changed on: May 26, 2014;
	 * 	Fixed issue: Layout for success message;
	*/
 -->
<div id="contact-form-wrapper">
	<p class="messageStackSuccess mt0"><?php echo TEXT_SUCCESS; ?></p>
	<div class="buttonRow"><?php echo zen_back_link() . zen_image_button(BUTTON_IMAGE_BACK, BUTTON_BACK_ALT) . '</a>'; ?></div>
</div><!--EOF #contact-form-wrapper-->

<!-- 
	/*
	 *  End Code changed on: May 26, 2014;
	*/
-->

<?php
  } else {
?>

<?php if ($messageStack->size('contact') > 0) echo $messageStack->output('contact'); ?>

<?php 
	if (DEFINE_CONTACT_US_STATUS >= '1' and DEFINE_CONTACT_US_STATUS <= '2') { 
		echo '<div class="contact-us-intro">';
			require($define_page);
		echo '</div>';
	} 
?>

<div class="row">
	<?php if (CONTACT_US_STORE_NAME_ADDRESS== '1') { ?>
	<div class="contact-details col-sm-12">
		<address class="contact-info"><?php echo nl2br(STORE_NAME_ADDRESS); ?></address>		
	</div><!--EOF #store-details-wrapper-->
	<?php } ?>

	<div class="contact-form col-sm-12 cf">

		<?php
			// show dropdown if set
			if (CONTACT_US_LIST != ''){
		?>
		<div class="row">
			<div class="col-xs-12">
			<
				<label class="inputLabel" for="send-to"><?php echo SEND_TO_TEXT; ?> <?php echo '<span class="alert">' . ENTRY_REQUIRED_SYMBOL . '</span>'; ?></label>
				<?php echo zen_draw_pull_down_menu('send_to',  $send_to_array, 0, 'id="send-to"'); ?>
				
			</div>
		</div>
		<?php
			}
		?>
		
		<div class="row">
			<div class="col-xs-6">
				<label class="inputLabel" for="contactname"><?php echo ENTRY_NAME; ?> <?php echo '<span class="alert">' . ENTRY_REQUIRED_SYMBOL . '</span>'; ?></label>
				<?php echo zen_draw_input_field('contactname', $name, ' size="40" id="contactname"'); ?>
			</div>
			<div class="col-xs-6">
				<label class="inputLabel" for="email-address"><?php echo ENTRY_EMAIL; ?> <?php echo '<span class="alert">' . ENTRY_REQUIRED_SYMBOL . '</span>'; ?></label>
				<?php echo nmx_draw_email_field('email', ($email_address), ' size="40" id="email-address"'); ?>
			</div>
		</div>

		<div class="row">
			<div class="col-xs-12">
			
				<label class="inputLabel" for="enquiry"><?php echo ENTRY_ENQUIRY . ' <span class="alert">' . ENTRY_REQUIRED_SYMBOL . '</span>'; ?></label>
				<?php echo zen_draw_textarea_field('enquiry', '30', '7', $enquiry, 'id="enquiry"'); ?>
				<?php echo zen_draw_input_field('should_be_empty', '', ' size="40" id="CUAS" style="visibility:hidden; display:none;" autocomplete="off"'); ?>
				<br class="clearBoth" />
				<?php echo recaptcha_get_html(false); ?>
				
			</div><!--EOF #contact-col-right-->
		</div>
		
		<div class="buttonRow back"><?php echo zen_image_submit(BUTTON_IMAGE_SEND, BUTTON_SEND_MESSAGE_ALT); ?></div>
		
	</div><!--EOF #contact-form-wrapper-->

</div>


<?php
  }
?>

</form>


</div>
3 Apr 2020, 4:49 PM
#468
mjf91331 avatar

mjf91331

New Zenner

Join Date:
Sep 2019
Location:
Los Angeles
Posts:
14
Plugin Contributions:
0

Re: Support Thread for Google reCAPTCHA plugin

Reading a couple pages pack in this thread I saw someone mentioning their edits to /includes/modules/pages/contact_us/header_php.php on an older version of zen cart. I read to the very bottom of the instructions and saw this change is needed specifically on 1.5.1, even though I'm on 1.5.6 I tried it out as there was nothing left to do and sure enough the captcha became required to use the contact us form. Any ideas why 1.5.1 specific changes needed to be made on my 1.5.6 install?

14 Apr 2020, 10:30 AM
#469
iantor avatar

iantor

New Zenner

Join Date:
Apr 2020
Location:
Toronto
Posts:
1
Plugin Contributions:
0

Re: Support Thread for Google reCAPTCHA plugin

Hello, thank you for posting but I am having trouble getting it to work. I am receiving a message "ERROR for site owner: Invalid site key". I checked the key several times and copied and pasted it directly from https://www.google.com/recaptcha/admin by following the steps provided. Help is greatly appreciated! Thank you.

14 Apr 2020, 1:00 PM
#470
gernot avatar

gernot

Zen Follower

Join Date:
Feb 2017
Location:
Tokyo, Japan
Posts:
334
Plugin Contributions:
0

Re: Support Thread for Google reCAPTCHA plugin

I think you are probably running into the aggressive HTML encoding in Zen Cart Admin screen, happens with various passwords too. Try adding the key directly to the database in the requisite field.

20 Apr 2020, 1:54 AM
#471
nootkan avatar

nootkan

New Zenner

Join Date:
Apr 2006
Location:
Gold River British Columbia Canada
Posts:
9
Plugin Contributions:
0

Re: Support Thread for Google reCAPTCHA plugin

Was wondering if the developer is currently working on an upgrade to this plugin so that we can use it with google recaptcha v3? Or is there another plugin for this version? I haven't been able to locate one yet in my searches. thanks

3 Jun 2020, 9:09 AM
#472
green_books avatar

green_books

New Zenner

Join Date:
Nov 2013
Location:
Hong Kong
Posts:
44
Plugin Contributions:
0

Re: Support Thread for Google reCAPTCHA plugin

Just in case someone also want to use Google reCAPTCHA in their 'Ask a Question' plugin,
below is how I made it works:

There are 3 files that need to be amended:

File 1: includes/classes/observers/class.google_recaptcha.php

Add this around line 24:

$pages_to_check[] =  'NOTIFY_ASK_A_QUESTION_CAPTCHA_CHECK';

Change this

$event_array = array('NOTIFY_CONTACT_US_CAPTCHA_CHECK' => 'contact', 'NOTIFY_CREATE_ACCOUNT_CAPTCHA_CHECK' => 'create_account', 'NOTIFY_REVIEWS_WRITE_CAPTCHA_CHECK' => 'review_text');

to this:

$event_array = array('NOTIFY_CONTACT_US_CAPTCHA_CHECK' => 'contact', 'NOTIFY_CREATE_ACCOUNT_CAPTCHA_CHECK' => 'create_account', 'NOTIFY_REVIEWS_WRITE_CAPTCHA_CHECK' => 'review_text', 'NOTIFY_ASK_A_QUESTION_CAPTCHA_CHECK' => 'contact');

File 2: includes/functions/extra_functions/recaptchalib.php

Change this (around line 70)

$event_array = array('contact_us' => 'contact', 'create_account' => 'create_account', 'reviews_write' => 'review_text');

to this:

$event_array = array('contact_us' => 'contact', 'create_account' => 'create_account', 'reviews_write' => 'review_text', 'ask_a_question' => 'contact');

File 3: includes/templates/YOUR_TEMPLATE/templates/tpl_ask_a_question_default.php

Add this before </fieldset>:

<?php echo recaptcha_get_html(false); ?>

The attached image shows how reCAPTCHA works in the Ask A Question plugin

P.S. I'm using the latest version of both plugins:

  • Google reCAPTCHA CAPTCHA - Version: 3.4
  • Ask A Question - Version:2.2

Good Luck!

3 Jun 2020, 9:18 AM
#473
green_books avatar

green_books

New Zenner

Join Date:
Nov 2013
Location:
Hong Kong
Posts:
44
Plugin Contributions:
0

Re: Support Thread for Google reCAPTCHA plugin

Just in case someone also want to use Google reCAPTCHA in their 'Ask a Question' plugin,
below is how I made it works:

There are 3 files that need to be amended:

File 1: includes/classes/observers/class.google_recaptcha.php

Add this around line 24:

$pages_to_check[] =  'NOTIFY_ASK_A_QUESTION_CAPTCHA_CHECK';

Change this

$event_array = array('NOTIFY_CONTACT_US_CAPTCHA_CHECK' => 'contact', 'NOTIFY_CREATE_ACCOUNT_CAPTCHA_CHECK' => 'create_account', 'NOTIFY_REVIEWS_WRITE_CAPTCHA_CHECK' => 'review_text');

to this:

$event_array = array('NOTIFY_CONTACT_US_CAPTCHA_CHECK' => 'contact', 'NOTIFY_CREATE_ACCOUNT_CAPTCHA_CHECK' => 'create_account', 'NOTIFY_REVIEWS_WRITE_CAPTCHA_CHECK' => 'review_text', 'NOTIFY_ASK_A_QUESTION_CAPTCHA_CHECK' => 'contact');

File 2: includes/functions/extra_functions/recaptchalib.php

Change this (around line 70)

$event_array = array('contact_us' => 'contact', 'create_account' => 'create_account', 'reviews_write' => 'review_text');

to this:

$event_array = array('contact_us' => 'contact', 'create_account' => 'create_account', 'reviews_write' => 'review_text', 'ask_a_question' => 'contact');

File 3: includes/templates/YOUR_TEMPLATE/templates/tpl_ask_a_question_default.php

Add this before </fieldset>:

<?php echo recaptcha_get_html(false); ?>

The screenshot below shows how reCAPTCHA works in the Ask A Question plugin

P.S. I'm using the latest version of both plugins:

  • Google reCAPTCHA CAPTCHA - Version: 3.4
  • Ask A Question - Version:2.2

Good Luck!

21 Jun 2020, 7:51 PM
#474
rensing avatar

rensing

New Zenner

Join Date:
Oct 2012
Location:
St. Catharines, ON Canada
Posts:
91
Plugin Contributions:
0

Re: Support Thread for Google reCAPTCHA plugin

I just downloaded this file and am following the directions in the readme but the file it wants me to add the keys to does not appear to exist in either the downloaded file or in the server side directory.

21 Jun 2020, 8:05 PM
#475
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

rensing:

I just downloaded this file and am following the directions in the readme but the file it wants me to add the keys to does not appear to exist in either the downloaded file or in the server side directory.

Steps for creating the keys are in the instructions.

1 Jul 2020, 12:09 PM
#476
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

I have not had a chance to test this plugin on 1.5.7 yet. I plan do but not sure when that will be yet.

17 Jul 2020, 9:53 AM
#477
calljj avatar

calljj

Zen Follower

Join Date:
Mar 2007
Posts:
253
Plugin Contributions:
2

Re: Support Thread for Google reCAPTCHA plugin

mjf91331:

Reading a couple pages pack in this thread I saw someone mentioning their edits to /includes/modules/pages/contact_us/header_php.php on an older version of zen cart. I read to the very bottom of the instructions and saw this change is needed specifically on 1.5.1, even though I'm on 1.5.6 I tried it out as there was nothing left to do and sure enough the captcha became required to use the contact us form. Any ideas why 1.5.1 specific changes needed to be made on my 1.5.6 install?

I've also just had to do the same on the /includes/modules/TEMPLATE_NAME/create_account.php

Copying the zco notifier line across from the 1.3 files into this file made it work for me, else you could create an account without ticking the box!

J

25 Jul 2020, 10:19 PM
#478
drbyte avatar

drbyte

Sensei

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

Re: Support Thread for Google reCAPTCHA plugin

Calljj:

mjf91331:

Reading a couple pages pack in this thread I saw someone mentioning their edits to /includes/modules/pages/contact_us/header_php.php on an older version of zen cart. I read to the very bottom of the instructions and saw this change is needed specifically on 1.5.1, even though I'm on 1.5.6 I tried it out as there was nothing left to do and sure enough the captcha became required to use the contact us form. Any ideas why 1.5.1 specific changes needed to be made on my 1.5.6 install?

I've also just had to do the same on the /includes/modules/TEMPLATE_NAME/create_account.php

Copying the zco notifier line across from the 1.3 files into this file made it work for me, else you could create an account without ticking the box!

J
These are typical when using a template (including any custom override files) built for an older version of Zen Cart, which didn't have the features that the newer versions of the plugin depends on.

3 Aug 2020, 10:03 PM
#479
davewest avatar

davewest

Totally Zenned

Join Date:
Dec 2007
Location:
Payson, AZ
Posts:
1,075
Plugin Contributions:
7

Re: Support Thread for Google reCAPTCHA plugin

As a side note.. reCaptcha v3 and v2 have been "broken" (robots can "solve" them)! Makes one wonder what robots are really thinking about when they can read images!

ZC157 has a built in anti spam filter that's works really well. If I remember right, this one use an observer that 157 also makes use of. it could be an issue as discussed on the known bug page here. Post #8.. Something to try.. as is I don't see an issue with the current code as long as you are merging with 157 forms and not replacing them.