Image verification on Gift Certificates form

Hi there,

One of my clients has issue about the Gift certificates. I think a spam robot attacted the GC create form, and put a lot of GC to the cart.

We made an image verification to the GC page, so the robot cannot access to that function.

The solution:

controller file:


Insert the following code after the:

if ($mode == 'add') { line


if (fn_image_verification('gift_certificate_validate', empty($_REQUEST['verification_answer']) ? '' : $_REQUEST['verification_answer']) == false) {
if (defined('AJAX_REQUEST')) {
} else {
return array(CONTROLLER_STATUS_REDIRECT, "gift_certificates.add");


Template file:


insert this line of code before the


{include file="common_templates/image_verification.tpl" id="gift_certificate_validate"}