Post by andywoodrow » Tue Oct 17, 2017 4:31 am

Hi,

I've created a new contact form (copying the main 3 files from contact);

Code: Select all

catalog/controller/information/contact.php
catalog/language/english/information/contact.php
catalog/view/theme/basecart/template/information/contact.tpl
to:

Code: Select all

catalog/controller/information/visitors-book.php
catalog/language/english/information/visitors-book.php
catalog/view/theme/basecart/template/information/visitors-book.tpl
I can then access the contact form fine from the url:

http://www.mydomain.com/index.php?route ... itors-book

and the form is erroring' and sending fine ...

The trouble is I can't see to see the captcha. It's enabled and working on the contact form and it's 'ticked' under the admin > system > settings > option. and the code has the same as the contact version. I did try and add google captcha manually, but this is giving me a 500 on a specific page ( GTM (not sure if this is related or not)).

Anyone point me in the right direction please?

Thanks,
Andy

New member

Posts

Joined
Mon Nov 02, 2015 5:48 pm

Post by IP_CAM » Thu Oct 19, 2017 6:49 am

did you change in:
catalog/controller/information/visitors-book.php
this:

Code: Select all

class ControllerInformationContact extends Controller {
to this:

Code: Select all

class ControllerInformationVisitors-book extends Controller {
Ernie

Ernie's OpenCart v.1.5.6.5 LIGHT + OpenShop Admin v.1.75 Test Sites
http://www.ebikes.li - http://www.evelo.li - http://www.openshop.li
Image


User avatar
Guru Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by andywoodrow » Fri Oct 20, 2017 6:49 am

Hi, yep, I had already changed to:

Code: Select all

class ControllerInformationVisitorsBook extends Controller {
but with no luck on the captcha, the form itself errors / sends OK, just the captcha.

New member

Posts

Joined
Mon Nov 02, 2015 5:48 pm

Post by andywoodrow » Fri Oct 20, 2017 7:35 am

FIXED!

In both /admin/controller/setting/setting.php and sys/admin/controller/setting/setting.php there are the entries to 'enable' Recaptcha from the System > Settings > Options by adding a new entry:

Code: Select all

		$data['captcha_pages'][] = array(
			'text'  => $this->language->get('text_visitors-book'),
			'value' => 'visitors-book'
		);
under

Code: Select all

		$data['captcha_pages'][] = array(
			'text'  => $this->language->get('text_contact'),
			'value' => 'contact'
		);
Then adding a new text_visitors-book in the language settings: /admin/language/english/setting/setting.php

Code: Select all

$_['text_visitors-book']               = 'Visitors Book';
under

Code: Select all

$_['text_contact']                     = 'Contact';
:-)

New member

Posts

Joined
Mon Nov 02, 2015 5:48 pm
Who is online

Users browsing this forum: No registered users and 5 guests