Jump to content

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

Image verification on Gift Certificates form Rate Topic   * * * * * 1 votes


Posted 28 January 2013 - 12:31 PM #1

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') {

        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

<div class="buttons-container">

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