Post by Cue4cheap » Sat Mar 16, 2024 4:06 am

Hello,
OC 2.3.0.2
I WAS using this extension: https://www.opencart.com/index.php?rout ... n_id=28057
But since it has no captcha I was getting lots of crap emails. (It is amazing I reenabled it 12 hours ago and in those 12 hours I received 5 spam emails).
All I am looking for is a way to have someone on a product page be able to click a link, direct them to the contact page with the product name added into the enquiry field so they can ask a question about the product. At least the contact form has a captcha.
I searched through the extensions and the forum and didn't find anything so if anyone has a suggestion I'd be thankful..
Thank you,
Mike

cue4cheap not cheap quality


Expert Member

Posts

Joined
Fri Sep 20, 2013 4:45 am

Post by SohBH » Sat Mar 16, 2024 2:21 pm

Maybe we could add like a hidden field to the form.
This hidden field could help us detect spam bot, those bots don't usually click the mouse.
Then check if it's filled out or not.
If it's empty or something weird is in there, trigger an error message.

View all extensions | Request custom work | Pricing | Contact Me


User avatar
Active Member

Posts

Joined
Mon Nov 02, 2020 12:01 am
Location - Malaysia

Post by OSWorX » Sat Mar 16, 2024 5:00 pm

Cue4cheap wrote:
Sat Mar 16, 2024 4:06 am
Hello,
OC 2.3.0.2
I WAS using this extension: https://www.opencart.com/index.php?rout ... n_id=28057
But since it has no captcha I was getting lots of crap emails. (It is amazing I reenabled it 12 hours ago and in those 12 hours I received 5 spam emails).
All I am looking for is a way to have someone on a product page be able to click a link, direct them to the contact page with the product name added into the enquiry field so they can ask a question about the product. At least the contact form has a captcha.
I searched through the extensions and the forum and didn't find anything so if anyone has a suggestion I'd be thankful..
Thank you,
Mike
Funny, why not buying the Pro version of this extension?
Beside this, adding a Honeypot to both is the easiest task for every simple developer.

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Administrator

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by Johnathan » Sat Mar 16, 2024 9:41 pm

Well, Form Builder Pro can do this, but it might be overkill for just that one need. If you do want to get it, feel free to contact me at www.getclearthinking.com/contact and I can help you set it up.

Otherwise, if you just need the product name, you could add it into a query string variable of a contact page URL, and then use that to preload the name into the field. Here's the edit you'd need to do in the contact page controller:

Code: Select all

IN:
/catalog/controller/information/contact.php

REPLACE:
$data['enquiry'] = '';

WITH:
if (!empty($this->request->get['product'])) {
    $data['enquiry'] = 'Question about ' . $this->request->get['product'] . ': ';
} else {
    $data['enquiry'] = '';
}

Then, you'd add a link on the product page that looks like this:

Code: Select all

https://www.yoursite.com/index.php?route=information/contact&product=The Product Name

If you wanted to put it on all product pages, then you'd add a link somewhere in the product/product.twig file like this:

Code: Select all

https://www.yoursite.com/index.php?route=information/contact&product={{ product.name }}

Hope that helps

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by straightlight » Sat Mar 16, 2024 11:05 pm

Or, by using the customer search table to pull the product ID whereas the current customer ID is currently logged in to avoid the SPAMs. OC 4 releases also uses tokens on the frontend to ensure reliability prior to form postings.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by Cue4cheap » Mon Mar 18, 2024 6:27 am

Johnathan wrote:
Sat Mar 16, 2024 9:41 pm
Well, Form Builder Pro can do this, but it might be overkill for just that one need. If you do want to get it, feel free to contact me at www.getclearthinking.com/contact and I can help you set it up.
-----
Hope that helps
That was exactly what I was looking for. Simple and to the point. They click and get directed to the contact page with product info filled into the form.

Thank you very much,
Mike

cue4cheap not cheap quality


Expert Member

Posts

Joined
Fri Sep 20, 2013 4:45 am
Who is online

Users browsing this forum: No registered users and 8 guests