Post by timkirtley » Sat Jun 12, 2010 12:03 am

Simple question (hopefully)..

..Theres a lot of posts about adding captcha to certain forms, but actually would like to remove the captcha verfication from the product review section. Does anyone know which files need to be edited to do this?

New member

Posts

Joined
Fri Jun 04, 2010 7:01 am

Post by Xsecrets » Sat Jun 12, 2010 12:18 am

you would have to edit the product.tpl and controller I believe, but why in the world would you want to remove it? Do you just like spam on your sites?

OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter


Guru Member

Posts

Joined
Sun Oct 25, 2009 3:51 am
Location - FL US

Post by timkirtley » Sat Jun 12, 2010 12:30 am

mmm, I know.. and if spam becomes a big issue then I'll have to rethink.. Its just I like to think that not every single form on the internet needs to have captcha.. wishful thinking I suppose. Maybe if the captcha wasn't so ugly..

New member

Posts

Joined
Fri Jun 04, 2010 7:01 am

Post by JAY6390 » Sat Jun 12, 2010 4:52 am

I have to say I agree with Xsecrets that you shouldn't remove it, however it's pretty easy to remove
1. remove this code in /catalog/controller/product/product.php in the validate() method

Code: Select all

        if (!isset($this->session->data['captcha']) || ($this->session->data['captcha'] !=
            $this->request->post['captcha'])) {
            $this->error['message'] = $this->language->get('error_captcha');
        } 
2. in your template folder in product/product.tpl remove the following code

Code: Select all

        &nbsp; <span><?php echo $entry_good; ?></span><br />
        <br />
        <b><?php echo $entry_captcha; ?></b><br />
        <input type="text" name="captcha" value="" autocomplete="off" />
<br />
<img src="index.php?route=product/product/captcha" id="captcha" />
That should do it :)

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by timkirtley » Mon Jun 14, 2010 4:22 pm

Thanks, that looks like it'll do it.

As I said before, I do admit its a bit of a gamble I guess taking the captcha off, but I want to make submitting a review as simple as possible. And obviously comments go to moderation first so spam wont appear on the site, just fill up the shop admins inbox.... But I must admit, I've created quite a few contact forms on various sites and never had to put a captcha on one before...

Anyway, I'll comment out all the fields just in case I need to make a hasty u-turn later on. Cheers for help though.

New member

Posts

Joined
Fri Jun 04, 2010 7:01 am

Post by JAY6390 » Mon Jun 14, 2010 7:35 pm

Cool no problem

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by hassanalishah » Fri Dec 18, 2015 12:11 pm

JAY6390 wrote:I have to say I agree with Xsecrets that you shouldn't remove it, however it's pretty easy to remove
1. remove this code in /catalog/controller/product/product.php in the validate() method

Code: Select all

        if (!isset($this->session->data['captcha']) || ($this->session->data['captcha'] !=
            $this->request->post['captcha'])) {
            $this->error['message'] = $this->language->get('error_captcha');
        }
2. in your template folder in product/product.tpl remove the following code

Code: Select all

        &nbsp; <span><?php echo $entry_good; ?></span><br />
        <br />
        <b><?php echo $entry_captcha; ?></b><br />
        <input type="text" name="captcha" value="" autocomplete="off" />
<br />
<img src="index.php?route=product/product/captcha" id="captcha" />
That should do it :)
I followed the same procedure and got this error:


Parse error: syntax error, unexpected '_name' (T_STRING), expecting variable (T_VARIABLE) or '$' in /home/qdepot55/public_html/vqmod/vqcache/vq2-catalog_view_theme_journal2_template_product_product.tpl on line 544

Now even i replaced the original files but the error still remains. Please suggest what should i do now?

New member

Posts

Joined
Wed Sep 17, 2014 1:45 pm
Who is online

Users browsing this forum: No registered users and 7 guests