Page 1 of 1

⛔ Help protect again contact form spam, and how to change route=information/contact to something else?

Posted: Thu Aug 08, 2019 1:29 pm
by supak111
I was wondering if its possible to change the default contact form route? And if doing so would help with bots programed to find opencart contact forms and spam them? PS I don't feel like installing recapcha on this particle oc2 site

Can anyone tell me how to change route=information/contact to say route=information/reachus?

Re: ⛔ Help protect again contact form spam, and how to change route=information/contact to something else?

Posted: Thu Aug 08, 2019 2:57 pm
by pprmkr
Edit catalog/controller/information/contact.php

Change:

Code: Select all

class ControllerInformationContact extends Controller {
Into:

Code: Select all

class ControllerInformationReachus extends Controller {
Change:

Code: Select all

$this->response->redirect($this->url->link('information/contact/success'));
Into:

Code: Select all

$this->response->redirect($this->url->link('information/reachus/success'));
Change:

Code: Select all

'href' => $this->url->link('information/contact')
Into:

Code: Select all

'href' => $this->url->link('information/reachus')
Change:

Code: Select all

$data['action'] = $this->url->link('information/contact', '', true);
Into:

Code: Select all

$data['action'] = $this->url->link('information/reachus', '', true);
Change:

Code: Select all

'href' => $this->url->link('information/contact')
Into:

Code: Select all

'href' => $this->url->link('information/reachus')
Save file as: catalog/information/controller/reachus.php
Delete catalog/information/controller/contact.php

Edit catalog/controller/common/footer.php
Change:

Code: Select all

$data['contact'] = $this->url->link('information/contact');
Into:

Code: Select all

$data['contact'] = $this->url->link('information/reachus');

Re: ⛔ Help protect again contact form spam, and how to change route=information/contact to something else?

Posted: Thu Aug 08, 2019 4:18 pm
by supak111
Do you believe chaining the route of the contact form would help with spam bots?

Re: ⛔ Help protect again contact form spam, and how to change route=information/contact to something else?

Posted: Thu Aug 08, 2019 5:10 pm
by pprmkr
All those probing ?route=information/contact will get error/not found.

Re: ⛔ Help protect again contact form spam, and how to change route=information/contact to something else?

Posted: Thu Aug 08, 2019 5:53 pm
by johnp
I use this extension plus Crawlprotect and have no spam or hack problems:

https://www.opencart.com/index.php?rout ... earch=spam

Re: ⛔ Help protect again contact form spam, and how to change route=information/contact to something else?

Posted: Wed Jul 21, 2021 4:51 pm
by reda
After trying multiple solutions, all not working like : google captcha, opencart captcha, some other opencart extensions (CSRF), neither could help, I was still receiving spams contact form and registration. So I developed a combination of extensions and now I completely satisfied: No more spams!

https://www.opencart.com/index.php?rout ... n_id=42395
https://www.opencart.com/index.php?rout ... n_id=34713

Cheers