Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

How To Add Image Verification To Subscribe Block Rate Topic   - - - - -

 
  • jimmyod
  • Senior Member
  • Members
  • Join Date: 24-Apr 12
  • 449 posts

Posted 16 August 2016 - 12:22 PM #1

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?



 
  • CS-Cart team
  • CS-Cart support team
  • Moderators
  • Join Date: 04-Apr 11
  • 3809 posts

Posted 17 August 2016 - 05:44 AM #2

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.


Sincerely yours, CS-Cart Support Team

 

User guide       |  Developer documentation  |  Core API documentation


 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19766 posts

Posted 17 August 2016 - 08:26 AM #3

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

 

add 

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

before

</form>

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


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • jimmyod
  • Senior Member
  • Members
  • Join Date: 24-Apr 12
  • 449 posts

Posted 19 August 2016 - 12:14 PM #4

Thank you!

This works good.



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19766 posts

Posted 19 August 2016 - 02:24 PM #5

You are welcome!


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • krola
  • Advanced Member
  • Members
  • Join Date: 18-Jun 11
  • 68 posts

Posted 20 March 2017 - 03:05 PM #6

worked for me! thanks!



 

Posted 31 October 2019 - 05:06 PM #7

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

 

add 

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

before

</form>

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.