Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2009
    Posts
    31
    Plugin Contributions
    0

    Default Discount Code - Invalid Code Message Not Appearing - FEC

    I have Zen Cart 1.3.8a installed and recently installed Fast and Easy Checkout (FEC) 1.6.2. I am testing the Discount Coupon function. When a correct discount code is entered, the discount is applied. I noticed, however, that when an incorrect coupon code is entered, no error message is returned. How can I add a message - something along the lines of "You have entered an invalid code, please try again."?

    my site is www.pennylanepapersgiftbags.com

    Appreciate the help!
    Last edited by Kim; 11 Jan 2010 at 09:57 PM.

  2. #2
    Join Date
    Aug 2009
    Posts
    31
    Plugin Contributions
    0

    Default Re: Discount Code - Invalid Code Message Not Appearing - FEC

    Got this question answered on the Numinix site:

    This will be included in the next release:

    Open includes/classes/observers/class.fec.php and replace the entire update() function with:



    function update(&$class, $eventID, $paramsArray) {
    global $messageStack;
    if (FEC_STATUS == 'true') {
    $error = false;
    if ($_GET['main_page'] == FILENAME_CHECKOUT_PAYMENT and sizeof($messageStack->messages) > 0) {
    $error = true;
    for ($i=0, $n=sizeof($messageStack->messages); $i<$n; $i++) {
    if ($messageStack->messages[$i]['class'] == 'checkout_payment') {
    $checkout_payment_output[] = $messageStack->messages[$i];
    }
    if ($messageStack->messages[$i]['class'] == 'redemptions') {
    $redemptions_output[] = $messageStack->messages[$i];
    }
    }
    $messageStack->reset();
    if (sizeof($checkout_payment_output) > 0) {
    for ($i=0, $n=sizeof($checkout_payment_output); $i<$n; $i++) {
    $messageStack->add_session('checkout_payment', strip_tags($checkout_payment_output[$i]['text']), 'error');
    }
    }
    if (sizeof($redemptions_output) > 0) {
    for ($i=0, $n=sizeof($redemptions_output); $i<$n; $i++) {
    $messageStack->add_session('redemptions', strip_tags($redemptions_output[$i]['text']), 'caution');
    }
    }
    }
    if ($_GET['credit_class_error']) {
    $error = true;
    $messageStack->add_session('checkout_payment', htmlspecialchars(urldecode($_GET['credit_class_error'])), 'error');
    }
    if ($error) {
    zen_redirect(zen_href_link(FILENAME_CHECKOUT, "&action=null", 'SSL'));
    } else {
    zen_redirect(zen_href_link(FILENAME_CHECKOUT, '', 'SSL'));
    }
    }
    }

 

 

Similar Threads

  1. v153 Invalid Coupon code error does not show to customer
    By grillandpatio in forum General Questions
    Replies: 3
    Last Post: 26 Feb 2015, 10:30 PM
  2. Discount Code Not working
    By auzz13 in forum General Questions
    Replies: 1
    Last Post: 31 Mar 2014, 11:43 PM
  3. Discount code invalid with Google Checkout
    By fairylite in forum Addon Payment Modules
    Replies: 0
    Last Post: 18 Aug 2008, 10:13 PM
  4. Sent out several Gift Certificates in a batch, and they get "Invalid code" message??
    By Aussiebod in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 0
    Last Post: 27 Feb 2008, 08:07 PM
  5. Error Message GC Code Invalid
    By kmickus in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 5
    Last Post: 24 Dec 2007, 07:13 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR