
Originally Posted by
1atom12
Hi Anne,
Thank you again for the wonderful template. I have recently run into a problem where bots are sending spam (about every two minutes) via the Website Enquiry (contact us) form. I did some digging on the forum and ran across the post below, but I'm wondering if the Mega template uses different files other than the ones mentioned. I made all the changes per the instructions below, but we are still receiving the spam as if I made no changes at all.
Here is the information and changes I made from another post:
started getting a lot of spam recently via my "contact us" form. looked all over this forum and did not find a decent solution, so i started googling around.. Found this site:
nfriedly.com/techblog/2009/11/how-to-build-a-spam-free-contact-forms-without-captchas/
and was able to get their solutions working with zen cart.
here are the changes that i had to make:
file: /store/includes/templates/your_template/templates/tpl_contact_us_default.php
need to add the invisible label and input field to the contact us form.
old code:
PHP Code:
<fieldset id="contactUsForm">
new code:
PHP Code:
<fieldset id="contactUsForm">
<label class="inputLabel" style="display:none;" >Leave this empty:</label>
<input name="url" style="display:none;" />
file: /store/includes/modules/pages/contact_us/header.php
need to check if this invisible url input field in the form has been filled out. Only send the message if the hidden field is blank.
old code:
PHP Code:
// Send message
zen_mail($send_to_name, $send_to_email, EMAIL_SUBJECT, $text_message, $name, $email_address, $html_msg,'contact_us');
new code:
PHP Code:
// Send message
// if the url field is not set or set and is empty
if( !isset($_POST['url']) || ((isset($_POST['url']) && $_POST['url'] == ''))){
zen_mail($send_to_name, $send_to_email, EMAIL_SUBJECT, $text_message, $name, $email_address, $html_msg,'contact_us');
}
Does the captcha you added show on the contact form in the drop down? You can always hide the header contact form by adding:
Code:
.contactus-li{display:none;}
to the stylesheet_mega_menu.css file.
Thanks,
Anne
Thanks,
Anne
Bookmarks