Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2008
    Posts
    186
    Plugin Contributions
    0

    Default Undefined Constant - gift certificate checkout

    V156c
    php 7.2x
    mysql 5.7

    Received this warning when a customer tried to use a gift certificate. Customer could not tell me how it happened, and I have been unable to reproduce this with a specific checkout sequence.

    Code:
    [21-Oct-2019 19:29:13 America/New_York] Request URI: /index.php?main_page=checkout_confirmation, IP address: xxxxx
    #1  ot_gv->collect_posts() called at [/usr/www/users/xxx/includes/classes/order_total.php:162]
    #2  order_total->collect_posts() called at [/usr/www/users/xxx/includes/modules/pages/checkout_confirmation/header_php.php:71]
    #3  require(/usr/www/users/xxx/includes/modules/pages/checkout_confirmation/header_php.php) called at [/usr/www/users/xxx/index.php:36]
    --> PHP Warning: Use of undefined constant error - assumed 'error' (this will throw an Error in a future version of PHP) in /usr/www/users/xxx/includes/modules/order_total/ot_gv.php on line 236.

  2. #2
    Join Date
    Jan 2004
    Posts
    65,317
    Blog Entries
    7
    Plugin Contributions
    228

    Default Re: Undefined Constant - gift certificate checkout

    You can fix it by changing those final error parameters to actually be a string, by wrapping it in quotes
    like this: https://github.com/zencart/zencart/c...8d638bc886de35
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Nov 2008
    Posts
    186
    Plugin Contributions
    0

    Default Re: Undefined Constant - gift certificate checkout

    Thank you for the quick reply. I will make the string wrapping changes.

    I also see that there's change to a line in the function apply_credit() , should I also make that change also or is that something for v157 only?

    Code:
     -  global $db, $order, $messageStack;
     +  global $db, $order;

 

 

Similar Threads

  1. v156 Undefined constant MODULE_PAYMENT_AUTHORIZENET_AIM_CURRENCY
    By PanZC2020 in forum Bug Reports
    Replies: 1
    Last Post: 27 Feb 2019, 09:01 PM
  2. v150 Only show gift certificate option on payment page if customer has a gift certificate
    By ShopVille in forum Templates, Stylesheets, Page Layout
    Replies: 25
    Last Post: 21 Jul 2014, 08:03 PM
  3. Gift certificate - undefined value
    By Akasashasha in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 3
    Last Post: 19 Jun 2009, 08:36 AM
  4. Want to use a printed gift certificate (with code) in the gift certificate process?
    By HelenSama in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 9
    Last Post: 15 Apr 2008, 02:04 PM
  5. Undefined Notice: Use of undefined constant
    By TheOracle in forum Bug Reports
    Replies: 0
    Last Post: 6 May 2007, 06:33 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