Post by espc » Sun Feb 28, 2010 8:59 pm

TESTED ON 1.4.7.
Yeah, finally I got it working...http://espc.altervista.org/index.php?ro ... on/contact
if you want to install recaptcha follow this sample instructions:

First Step

go to http://recaptcha.net/whyrecaptcha.html and sign up for the keys
Image

if you have multiple domains ex. .com .net. org check the box circled in red.

Now you got two keys one for public side and one for private side.
copy and save them on your pc.

go to http://api.recaptcha.net/js/recaptcha_ajax.js
select all text, copy and past it on an new text document on your desktop
rename it to: recaptcha_ajax.js if pc asks "change file extension?" click "yes"
now upload it to catalog/view/javascript


then go http://code.google.com/p/recaptcha/down ... lib-Latest
and download the latest recaptcha library.


Second Step
now we edit this library (recaptchalib.php)
go to line 108 and find and insert your public key

Code: Select all

function recaptcha_get_html ($pubkey, $error = null, $use_ssl = false)
{
	if ($pubkey == null || $pubkey == 'HERE INSERT YOUR PUBLIC KEY') {
		die ("To use reCAPTCHA you must get an API key from <a href='http://recaptcha.net/api/getkey'>http://recaptcha.net/api/getkey</a>");
	}
then line 122 find

Code: Select all

return '<script type="text/javascript" src="'. $server . '/challenge?k=' . $pubkey . $errorpart . '"></script>
replace with

Code: Select all

return '<script type="text/javascript" src="catalog/view/javascript/recaptcha_ajax.js'. $server . '/challenge?k=' . $pubkey . $errorpart . '"></script>
on line 154
find and insert your private key

Code: Select all

function recaptcha_check_answer ($privkey, $remoteip, $challenge, $response, $extra_params = array())
{
	if ($privkey == null || $privkey == 'HERE INSERT YOUR PRIVATE KEY') {
		die ("To use reCAPTCHA you must get an API key from <a href='http://recaptcha.net/api/getkey'>http://recaptcha.net/api/getkey</a>");
	}

	if ($remoteip == null || $remoteip == '') {
		die ("For security reasons, you must pass the remote ip to reCAPTCHA");
	}
we finished with the library, now upload it to /system/library/ (you may delete captcha.php library)

Third Step
Now we are going to edit these files:
-catalog/controller/information/contact.php
-catalog/view/theme/YOURTHEME/template/information/contact.tpl

-catalog/controller/product/product.php
-catalog/view/theme/YOURTHEME/template/product/product.tpl

you better backup them before editing.

we start with: catalog/controller/information/contact.php

on line 65
find

Code: Select all

 		if (isset($this->error['captcha'])) {
			$this->data['error_captcha'] = $this->error['captcha'];
		} else {
			$this->data['error_captcha'] = '';
		}
delete it

then on line 97
find

Code: Select all

		if (isset($this->request->post['captcha'])) {
			$this->data['captcha'] = $this->request->post['captcha'];
		} else {
			$this->data['captcha'] = '';
		}	
delete it

then on line 162
find

Code: Select all

	public function captcha() {
		$this->load->library('captcha');
		
		$captcha = new Captcha();
		
		$this->session->data['captcha'] = $captcha->getCode();
		
		$captcha->showImage();
	}
  }
insert your private key and replace with below

Code: Select all

	public function recaptcha() {

 require_once('/system/library/recaptchalib.php');
 $privatekey = "HERE INSERT YOUR PRIVATE KEY";
 $resp = recaptcha_check_answer ($privatekey,
                               $_SERVER["REMOTE_ADDR"],
                               $_POST["recaptcha_challenge_field"],
                               $_POST["recaptcha_response_field"]);

 if (!$resp->is_valid) {
   // What happens when the CAPTCHA was entered incorrectly
   die ("The reCAPTCHA wasn't entered correctly. Go back and try it again." .
        "(reCAPTCHA said: " . $resp->error . ")");
 } else {
   // Your code here to handle a successful verification
   }
}
then on line 187
find

Code: Select all

    	if (!isset($this->session->data['captcha']) || ($this->session->data['captcha'] != $this->request->post['captcha'])) {
      		$this->error['captcha'] = $this->language->get('error_captcha');
    	}
delete it.

now we edit -catalog/view/theme/YOURTHEME/template/information/contact.tpl

on line 55
find

Code: Select all

              <input type="text" name="captcha" value="<?php echo $captcha; ?>" />
              <?php if ($error_captcha) { ?>
              <span class="error"><?php echo $error_captcha; ?></span>
              <?php } ?>
              <br />
              <img src="index.php?route=information/contact/captcha" /></td>
replace with

Code: Select all

      <div id="recaptcha_div"></div><nowiki><br>
      <input type="button" value="Show reCAPTCHA" onclick="showRecaptcha('recaptcha_div');"></input>
      <br><nowiki></td>

then at the end of file BEFORE

Code: Select all

<?php echo $footer; ?>
insert your public key and add this code

Code: Select all

     <script type="text/javascript" src="catalog/view/javascript/recaptcha_ajax.js"></script>

     <!-- Wrapping the Recaptcha create method in a javascript function -->
     <script type="text/javascript">
        function showRecaptcha(element) {
          Recaptcha.create("HERE INSERT YOUR PUBLIC KEY", element, {
            theme: "red", 
            callback: Recaptcha.focus_response_field});
        }
     </script>

now we edit catalog/controller/product/product.php
on line 443
find

Code: Select all

	public function captcha() {
		$this->load->library('captcha');
		
		$captcha = new Captcha();
		
		$this->session->data['captcha'] = $captcha->getCode();
		
		$captcha->showImage();
	}
  }
insert your private key and then replace with:

Code: Select all

	public function recaptcha() {

 require_once('/system/library/recaptchalib.php');
 $privatekey = "YOUR PRIVATE KEY HERE";
 $resp = recaptcha_check_answer ($privatekey,
                               $_SERVER["REMOTE_ADDR"],
                               $_POST["recaptcha_challenge_field"],
                               $_POST["recaptcha_response_field"]);

 if (!$resp->is_valid) {
   // What happens when the CAPTCHA was entered incorrectly
   die ("The reCAPTCHA wasn't entered correctly. Go back and try it again." .
        "(reCAPTCHA said: " . $resp->error . ")");
 } else {
   // Your code here to handle a successful verification
    }
}
then on line 466
find

Code: Select all

    	if ($this->session->data['captcha'] != $this->request->post['captcha']) {
      		$this->error['message'] = $this->language->get('error_captcha');
    	}
and delete it

now we edit catalog/view/theme/YOURTHEME/template/product/product.tpl

on line 129
find

Code: Select all

        <input type="text" name="captcha" value="" />
        <br />
        <img src="index.php?route=product/product/captcha" id="captcha" /></div>
replace with:

Code: Select all

       <div id="recaptcha_div"></div><nowiki><br>
      <input type="button" value="Show reCAPTCHA" onclick="showRecaptcha('recaptcha_div');"></input>
      <br><nowiki>

        <br />

        </div>
then at the end of file BEFORE

Code: Select all

<?php echo $footer; ?>
insert your public keyand add this code

Code: Select all

     <script type="text/javascript" src="catalog/view/javascript/recaptcha_ajax.js"></script>

     <!-- Wrapping the Recaptcha create method in a javascript function -->
     <script type="text/javascript">
        function showRecaptcha(element) {
          Recaptcha.create("HERE INSERT YOUR PUBLIC KEY", element, {
            theme: "red", 
            callback: Recaptcha.focus_response_field});
        }
     </script>
OPTIONAL:
if you want to customize your recaptcha
just change theme color in this code
(located in:
catalog/view/theme/YOURTHEME/template/information/contact.tpl
catalog/view/theme/YOURTHEME/template/product/ product.tpl)

Code: Select all

     <script type="text/javascript" src="catalog/view/javascript/recaptcha_ajax.js"></script>

     <!-- Wrapping the Recaptcha create method in a javascript function -->
     <script type="text/javascript">
        function showRecaptcha(element) {
          Recaptcha.create("", element, {
            theme: "HERE INSERT YOUR COLOUR",   
            callback: Recaptcha.focus_response_field});
        }
     </script>
here a list of colors: http://wiki.recaptcha.net/index.php/Ove ... k_and_Feel

THAT'S ALL FOLKS!!
GOOD WORK :) ;)
Last edited by espc on Wed Apr 21, 2010 5:52 am, edited 5 times in total.

God, give me courage to do what I can,
humility to admit what I can't,
and wisdom to know the difference.

Opencart mods (search suggestions and so on):
http://forum.opencart.com/viewtopic.php?p=71588#p71588" onclick="window.open(this.href);return false;


User avatar
Active Member

Posts

Joined
Fri Dec 04, 2009 12:40 am

Post by i2Paq » Sun Feb 28, 2010 9:12 pm

Thanks!!

Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________

Our FREE search: Find your answer FAST!.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands

Post by rph » Mon Mar 01, 2010 5:15 am

espc wrote:replace with

Code: Select all

return '<script type="text/javascript" src="catalog/view/theme/javascript/recaptcha_ajax.js'. $server . '/challenge?k=' . $pubkey . $errorpart . '"></script>
I think you might have meant the path to be:

catalog/view/javascript/recaptcha_ajax.js

-Ryan


rph
Expert Member

Posts

Joined
Fri Jan 08, 2010 5:05 am
Location - Lincoln, Nebraska

Post by espc » Mon Mar 01, 2010 6:07 am

oh sorry..corrected..it was a long mod! :)

God, give me courage to do what I can,
humility to admit what I can't,
and wisdom to know the difference.

Opencart mods (search suggestions and so on):
http://forum.opencart.com/viewtopic.php?p=71588#p71588" onclick="window.open(this.href);return false;


User avatar
Active Member

Posts

Joined
Fri Dec 04, 2009 12:40 am

Post by tonyb299 » Mon Mar 01, 2010 4:02 pm

thanks, this will be of use to many i'm sure. ;D

picture mouse mats and mugs


New member

Posts

Joined
Mon Jan 11, 2010 5:51 am
Location - East of England, UK

Post by espc » Wed Apr 21, 2010 5:53 am

tutorial uptated and tested for OC 1.4.7

God, give me courage to do what I can,
humility to admit what I can't,
and wisdom to know the difference.

Opencart mods (search suggestions and so on):
http://forum.opencart.com/viewtopic.php?p=71588#p71588" onclick="window.open(this.href);return false;


User avatar
Active Member

Posts

Joined
Fri Dec 04, 2009 12:40 am

Post by maa » Wed Apr 28, 2010 10:20 pm

Hi espc!!!

Why a "Show reCAPTCHA" button?

I suppose if reCAPTCHA screen was shown, in place of a button to ask it , would be easier to our ecommerce users.


Thanks
MarcosMAA

maa
Newbie

Posts

Joined
Fri Apr 09, 2010 1:02 am

Post by espc » Wed Apr 28, 2010 10:31 pm

hi,
yes I know...if you dont' want it, just get rid of it.

God, give me courage to do what I can,
humility to admit what I can't,
and wisdom to know the difference.

Opencart mods (search suggestions and so on):
http://forum.opencart.com/viewtopic.php?p=71588#p71588" onclick="window.open(this.href);return false;


User avatar
Active Member

Posts

Joined
Fri Dec 04, 2009 12:40 am

Post by maa » Wed Apr 28, 2010 11:53 pm

espc wrote:hi,
yes I know...if you dont' want it, just get rid of it.
Ok, I will try it later. Thanks!

Now I have a problem with code the way you post: recaptcha is not testing!
If I type wrong words, or no words, nothing happens.

Should I write some code here?

Code: Select all

// Your code here to handle a successful verification
at:
public function recaptcha() {

require_once('/system/library/recaptchalib.php');
$privatekey = "YOUR PRIVATE KEY HERE";
$resp = recaptcha_check_answer ($privatekey,
$_SERVER["REMOTE_ADDR"],
$_POST["recaptcha_challenge_field"],
$_POST["recaptcha_response_field"]);

if (!$resp->is_valid) {
// What happens when the CAPTCHA was entered incorrectly
die ("The reCAPTCHA wasn't entered correctly. Go back and try it again." .
"(reCAPTCHA said: " . $resp->error . ")");
} else {
// Your code here to handle a successful verification
}
}


OpenCart 1.4.7
SSL: yes
Linux Server

Thanks,
MarcosMAA

maa
Newbie

Posts

Joined
Fri Apr 09, 2010 1:02 am

Post by espc » Thu Apr 29, 2010 1:51 am

oh man I don't know if recaptcha library works with SSL...
anyway you don't need to insert anything in the code that you posted...
maybe you skip few steps in my procedure...
check each step one by one...and it should work

God, give me courage to do what I can,
humility to admit what I can't,
and wisdom to know the difference.

Opencart mods (search suggestions and so on):
http://forum.opencart.com/viewtopic.php?p=71588#p71588" onclick="window.open(this.href);return false;


User avatar
Active Member

Posts

Joined
Fri Dec 04, 2009 12:40 am

Post by maa » Thu Apr 29, 2010 2:35 am

I am trying your own example:
http://espc.altervista.org/index.php?ro ... on/contact

And I got another error: after typing right, wrong or no words, and press "CONTINUE" button, nothing happens.

Is there any thing wrong with your example?

maa
Newbie

Posts

Joined
Fri Apr 09, 2010 1:02 am

Post by espc » Thu Apr 29, 2010 2:50 am

yes...try it on your store...mine, it's an old script

God, give me courage to do what I can,
humility to admit what I can't,
and wisdom to know the difference.

Opencart mods (search suggestions and so on):
http://forum.opencart.com/viewtopic.php?p=71588#p71588" onclick="window.open(this.href);return false;


User avatar
Active Member

Posts

Joined
Fri Dec 04, 2009 12:40 am

Post by mbaldock2001 » Tue May 25, 2010 9:17 pm

Hi espc,

Many thanks for this contrib. I was looking for reCAPTCHA to use.
I have followed all the steps above and it is running (with the "Show reCaptcha" button).

However, it does not work: There is no validation of the reCaptcha...!!

I have just tested it on your own site and get the same result as on my site. As maa says:
I am trying your own example:
http://espc.altervista.org/index.php?ro ... on/contact

And I got another error: after typing right, wrong or no words, and press "CONTINUE" button, nothing happens.
After typing no words on your site, it showed this message:
Messaggio inviato correttamente!
Users can enter comments and click the 'continue' button without entering ANYTHING into the reCaptcha !!! This completely defeats the purpose of a captcha and opens up the site to bots and spammers...

As my php is limited, is there any chance that you could modify your contrib to :
1. Provide a piece of code to display the reCaptcha without the button ?
2. Ensure that when the users clicks the 'Continue' button, validation/challenge is carried out on the reCaptcha ?

Many thanks. Looking forward to seeing your fix.
M.

OC v1.4.9.1
(dev:)WampServer v2.0: Apache 2.2.11, PHP 5.3.0, MySQL 5.1.36
(prod:) Apache , PHP 2.10.0.2, MySQL 5.1.37


Newbie

Posts

Joined
Sun Mar 14, 2010 3:27 am
Location - Paris, France

Post by espc » Wed May 26, 2010 1:06 am

I'll check it out

God, give me courage to do what I can,
humility to admit what I can't,
and wisdom to know the difference.

Opencart mods (search suggestions and so on):
http://forum.opencart.com/viewtopic.php?p=71588#p71588" onclick="window.open(this.href);return false;


User avatar
Active Member

Posts

Joined
Fri Dec 04, 2009 12:40 am

Post by wonderbread » Fri May 28, 2010 4:36 pm

I've got the same error as the rest of these guys.
From what I can tell, it's not even looking at the function called "recaptcha" and I can't see it being passed anywhere either.

I'm going to have a fiddle with this myself, see if I can get it.

*EDIT*

Alright, I've got it on the contact page but I can't for the life of me get it working on the products page. I'll post the contact code and perhaps someone can help us out on the rest.
Firstly, place the recaptchalib.php into system\library
In catalog\controller\information\contact.php (Line 103-ish) find:

Code: Select all

if (isset($this->request->post['captcha'])) {
    $this->data['captcha'] = $this->request->post['captcha'];
} else {
    $this->data['captcha'] = '';
}
 
Comment it out/delete it (I suggest just commenting it out)
Below it (if you commented it out) or replace it with

Code: Select all

$this->load->library('recaptchalib');
$publicKey = "YOUR_PUB_KEY";
$privateKey = "YOUR_PRIV_KEY";        
$this->data['captcha_show'] = recaptcha_get_html($publicKey,$this->data['error_captcha']);
 
Next, head down to the line 180(roughly) and find:

Code: Select all

public function captcha() {
    $this->load->library('captcha');
    
    $captcha = new Captcha();
    
    $this->session->data['captcha'] = $captcha->getCode();
    
    $captcha->showImage();
}
 
Comment it out or delete it. (Again, I suggest just commenting it out)


Scroll down a few more lines (around line 205) to find:

Code: Select all

if (!isset($this->session->data['captcha']) || ($this->session->data['captcha'] != $this->request->post['captcha'])) {
          $this->error['captcha'] = $this->language->get('error_captcha');
}
 
Comment it out or delete it.

Below it/in its place put:

Code: Select all

if (isset($this->request->post['recaptcha_challenge_field'])) {
    $this->load->library('recaptchalib');
    $publicKey = "YOUR_PUB_KEY";
        $privateKey = "YOUR_PRIV_KEY";
    $resp = recaptcha_check_answer ($privateKey,
                                    $_SERVER["REMOTE_ADDR"],
                                    $this->request->post["recaptcha_challenge_field"],
                                    $this->request->post["recaptcha_response_field"]);
    if (!$resp->is_valid) {
        $this->error['captcha'] = "Captcha was incorrect, try again";
    }
} else {
    $this->error['captcha'] = "No CAPTCHA entered";
}
 
That should do it!

I'm still trying to get the other one working but it's a pain in the ass. Devs? Reckon you could help out.

PS: Sorry it's quite untidy =\ I'll clean it up a bit later if I get the time. (or, you're ofc welcome to clean it up yourself :))

Newbie

Posts

Joined
Fri May 28, 2010 12:07 pm

Post by espc » Mon Jun 14, 2010 1:25 am

wonderbread look what your method does:

Code: Select all

Notice: Undefined index: error_captcha in /web/htdocs/*/*/*/catalog/controller/information/contact.php  on line 75To use reCAPTCHA you must get an API key from http://recaptcha.net/api/getkey

God, give me courage to do what I can,
humility to admit what I can't,
and wisdom to know the difference.

Opencart mods (search suggestions and so on):
http://forum.opencart.com/viewtopic.php?p=71588#p71588" onclick="window.open(this.href);return false;


User avatar
Active Member

Posts

Joined
Fri Dec 04, 2009 12:40 am

Post by treppo » Fri Jul 09, 2010 2:09 am

I'm sorry but your solution is doing nothing, it deactivates the built-in Opencart captcha and inserts a recaptcha field that is never checked for validity.
I think I got the solution:

Go to http://recaptcha.net/whyrecaptcha.html and sign up for the keys
Get http://code.google.com/p/recaptcha/down ... lib-Latest
Place recaptchalib.php in system/library/

Now for the PHP:
In catalog/controller/contact.php
find

Code: Select all

     if (isset($this->request->post['captcha'])) {
         $this->data['captcha'] = $this->request->post['captcha'];
      } else {
         $this->data['captcha'] = '';
      }
and change it to

Code: Select all

		// RECAPTCHA
		if (isset($this->request->post['recaptcha_response_field'])) {
			$this->data['captcha_response'] = $this->request->post['recaptcha_response_field'];
		} else {
			$this->data['captcha_response'] = '';
		}		
		
		if (isset($this->request->post['recaptcha_challenge_field'])) {
			$this->data['captcha_challenge'] = $this->request->post['recaptcha_challenge_field'];
		} else {
			$this->data['captcha_challenge'] = '';
		}		
Then find

Code: Select all

   public function captcha() {
      $this->load->library('captcha');
      
      $captcha = new Captcha();
      
      $this->session->data['captcha'] = $captcha->getCode();
      
      $captcha->showImage();
   }
  }
and replace it with

Code: Select all

	private function recaptcha() {
/* 	recaptchalib.php needs to be in system/library/ */
		$this->load->library('recaptchalib');
		
		// Get a key from https://www.google.com/recaptcha/admin/create
		$publickey = "YOUR PUBLIC KEY";
		$privatekey = "YOUR PRIVATE KEY";
		
		# the response from reCAPTCHA
		$resp = null;
		# the error code from reCAPTCHA, if any
		$error = null;
		
		# was there a reCAPTCHA response?
		if ($this->request->post['recaptcha_response_field']) {
	        $resp = recaptcha_check_answer ($privatekey,
	                                        $_SERVER["REMOTE_ADDR"],
	                                        $this->request->post['recaptcha_challenge_field'],
	                                        $this->request->post['recaptcha_response_field']);
	
	        if ($resp->is_valid) {
	                return TRUE;
	        } else {
	                return FALSE;
	        }
		} else {
			return FALSE;
		}
		return FALSE;
	}
Finally find

Code: Select all

       if (!isset($this->session->data['captcha']) || ($this->session->data['captcha'] != $this->request->post['captcha'])) {
            $this->error['captcha'] = $this->language->get('error_captcha');
       }
and replace it with

Code: Select all

    	if (!$this->recaptcha()) {
			$this->error['captcha'] = $this->language->get('error_captcha');
    	}
Save contact.php
Next go to catalog/view/theme/YOURTHEME/template/information/contact.tpl,
find

Code: Select all

              <input type="text" name="captcha" value="<?php echo $captcha; ?>" autocomplete="off" />
              <?php if ($error_captcha) { ?>
              <span class="error"><?php echo $error_captcha; ?></span>
              <?php } ?>
              <br />
              <img src="index.php?route=information/contact/captcha" /></td>
and replace it with

Code: Select all

	<script type="text/javascript" src="http://www.google.com/recaptcha/api/challenge?k=YOUR PUBLIC KEY"></script>
	<noscript> 
  		<iframe src="http://www.google.com/recaptcha/api/noscript?k=YOUR PUBLIC KEY" height="300" width="500" frameborder="0"></iframe><br/> 
  		<textarea name="recaptcha_challenge_field" rows="3" cols="40"></textarea> 
  		<input type="hidden" name="recaptcha_response_field" value="manual_challenge"/> 
	</noscript>
<?php if ($error_captcha) { ?>
	<span class="error"><?php echo $error_captcha; ?></span>
<?php } ?>
Save.

You do the same with
-catalog/controller/product/product.php
-catalog/view/theme/YOURTHEME/template/product/product.tpl

It's as easy as that, no need to add another JavaScript or to edit the recaptchalib.php and it really validates the entered recaptcha–user-input.
Tested in OpenCart 1.4.8

Newbie

Posts

Joined
Fri Jul 09, 2010 12:17 am

Post by mbaldock2001 » Thu Aug 19, 2010 8:29 pm

Many thanks to treppo for the fix on this. It works fine under 1.4.8/1.4.8b.

I have also added a small amount of code to customise the reCaptcha theme :

Go to catalog/view/theme/YOUR THEME/template/information/contact.tpl,
after

Code: Select all

  <div class="middle">
and BEFORE

Code: Select all

    <div style="width: 100%; margin-bottom: 30px;">
insert

Code: Select all

   <script type="text/javascript">
	<!-- Set RECAPTCHA theme settings below :
		var RecaptchaOptions = {
			theme : 'clean',
		};
	//-->
	</script>
Save the file.

Do the same with
catalog/view/theme/YOURTHEME/template/product/product.tpl

"Theme" can be set to red(the default), white, blackglass or clean.

Check the reCaptcha page for more information on customisation options.

OC v1.4.9.1
(dev:)WampServer v2.0: Apache 2.2.11, PHP 5.3.0, MySQL 5.1.36
(prod:) Apache , PHP 2.10.0.2, MySQL 5.1.37


Newbie

Posts

Joined
Sun Mar 14, 2010 3:27 am
Location - Paris, France

Post by fubofo » Thu Sep 16, 2010 3:15 am

I can't sem to get treppo's fix to work on my products page. Sure it does display fine but I cannot get it to sumbit any information and display a success message (this does work fine on the contact page).

1.4.9 btw

Any suggestions?

EDIT:

I think the section

Code: Select all

         if (isset($this->request->post['captcha'])) {
             $this->data['captcha'] = $this->request->post['captcha'];
          } else {
             $this->data['captcha'] = '';
          }
...does not exist in products.php in version 1.4.9 .
This means I am missing out section
// RECAPTCHA
if (isset($this->request->post['recaptcha_response_field'])) {
$this->data['captcha_response'] = $this->request->post['recaptcha_response_field'];
} else {
$this->data['captcha_response'] = '';
}

if (isset($this->request->post['recaptcha_challenge_field'])) {
$this->data['captcha_challenge'] = $this->request->post['recaptcha_challenge_field'];
} else {
$this->data['captcha_challenge'] = '';
}

Newbie

Posts

Joined
Wed Aug 04, 2010 8:30 pm

Post by mbaldock2001 » Thu Sep 16, 2010 9:43 pm

Hi,

I wondered about this also. works fine on the contact page.

treppo does not use it on his product page (he doesn't have products pages!?), so have left it off myself for the time being.

the coding is somewhat more complex on the product page and I haven't had a lot of time to look into it again...

M

OC v1.4.9.1
(dev:)WampServer v2.0: Apache 2.2.11, PHP 5.3.0, MySQL 5.1.36
(prod:) Apache , PHP 2.10.0.2, MySQL 5.1.37


Newbie

Posts

Joined
Sun Mar 14, 2010 3:27 am
Location - Paris, France
Who is online

Users browsing this forum: No registered users and 15 guests