How To Add Image Verification To Subscribe Block

v4.3.1

I am using the "Newsletter: subscription form" template in a block for customers to enter their email address to subscribe. I am getting lots of "rif-raf" emails. I guess robo generated or something, but they are not legitimate.

Can I incorporate the image verification into this block somehow?

v4.3.1

I am using the "Newsletter: subscription form" template in a block for customers to enter their email address to subscribe. I am getting lots of "rif-raf" emails. I guess robo generated or something, but they are not legitimate.

Can I incorporate the image verification into this block somehow?

By default there is no such feature. Some code modifications are required in this case.

design/themes/THEME/templates/addons/newsletters/blocks/static_templates/subscribe.tpl

add

{include file="common/image_verification.tpl" option="login"}

before


app/addons/newsletters/controllers/frontend/newsletters.php

add

if (fn_image_verification('login', $_REQUEST) == false) {
    return array(CONTROLLER_STATUS_REDIRECT);
}

after

if ($mode == 'add_subscriber') {

(!) Capture for login form should be enabled in the settings. Additional style changes may be required

Thank you!

This works good.

You are welcome!

worked for me! thanks!

design/themes/THEME/templates/addons/newsletters/blocks/static_templates/subscribe.tpl

add

{include file="common/image_verification.tpl" option="login"}

before


app/addons/newsletters/controllers/frontend/newsletters.php

add

if (fn_image_verification('login', $_REQUEST) == false) {
    return array(CONTROLLER_STATUS_REDIRECT);
}

after

if ($mode == 'add_subscriber') {

(!) Capture for login form should be enabled in the settings. Additional style changes may be required

If you would like to add a mandatory image verification to your newsletter subscription form, which it appears you'd like to do, but without having to also add image verification during login...which i preferred. Follow eComLabs instructions, except make the following changes.

1. In both his code snippets, replace the words "login" with the word "polls"

2. In cs-cart admin page go to Settings tab at top, then image verification. Turn OFF use during Login, and turn on Polls.

3. At bottom of this page you'll see two tick boxes where you can decide if you want to turn on/off verification after first correct answer, and also decide if you'd like to turn on/off verification if user is logged in.

TESTED: Works and what I've been using along with an autoresponder to keep such false emails out of my subscriber list. That said, clean your subscriber list up every 2 weeks or before sending a newsletter out.