User Tools

Site Tools


tutorials:zencartmods:back_in_stock_notifications.html

This is an old revision of the document!


back in stock notifications

We use the Back in stock notifications plugin for zencart.

The plugin itself works out of the box, and the installation instructions are easy enough to follow, but there are a few modifications to be made that we think makes it better.

Simple Captcha

We used Securimage, which also works quite well as advertised.

Install Securimage somewhere on your webserver, and make these modifications to the Back in stock notifications plugin.

In includes/modules/pages/back_in_stock_notification_subscribe/header.php Line 56 Add

include("securimage.php");
$securimg = new Securimage();
 
$valid = $securimg->check($_POST['captcha_text']);

Then find Line 74

else if (strtolower($_POST['email']) != strtolower($_POST['cofnospam'])) {
                $form_errors['cofnospam'] =
			BACK_IN_STOCK_NOTIFICATION_FORM_ERROR_EMAIL_CONFIRMATION_DOESNT_MATCH;
        }

and replace with

else if (strtolower($_POST['email']) != strtolower($_POST['cofnospam'])) {
                $form_errors['cofnospam'] =
			BACK_IN_STOCK_NOTIFICATION_FORM_ERROR_EMAIL_CONFIRMATION_DOESNT_MATCH;
        }
        else if (!isset($_POST['captcha_text']) || $valid == false)
        {
                $form_errors['captcha'] = BACK_IN_STOCK_NOTIFICATION_FORM_ERROR_CAPTCHA;
        } 
/home/ladyada/public_html/wiki/data/attic/tutorials/zencartmods/back_in_stock_notifications.html.1311259920.txt.gz · Last modified: 2016/01/28 18:05 (external edit)