Results 1 to 10 of 11

Hybrid View

  1. #1
    Join Date
    Feb 2013
    Posts
    345
    Plugin Contributions
    0

    Default edit_orders.php - Non Numeric error in editing orders

    [Note: remember to include site URL, ZC version, list of plugins, PHP version, etc ... read the Posting Tips shown above for information to include in your post here. And, remove this comment before actually posting!]


    zen 1.5.5f - php 7.1

    anyone ever seen this error (fake admin address):
    [02-Dec-2018 00:34:13 UTC] Request URI: /adminxxxxxx/edit_orders.php?page=1&oID=243424&action=update_order, IP address: 160.3.207.42
    #1 zen_round() called at [/home/honor/public_html/includes/classes/currencies.php:94]
    #2 currencies->value() called at [/home/honor/public_html/adminxxxxxx/includes/classes/editOrders.php:436]
    #3 editOrders->eoRoundCurrencyValue() called at [/home/honor/public_html/adminxxxxxx/includes/classes/editOrders.php:441]
    #4 editOrders->eoFormatCurrencyValue() called at [/home/honor/public_html/adminxxxxxx/edit_orders.php:475]

    [02-Dec-2018 00:34:13 UTC] PHP Warning: A non-numeric value encountered in /home/honor/public_html/adminxxxxxx/includes/functions/general.php on line 1783

  2. #2
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Non Numeric error in editing orders

    What modifications are applied to that file as line 1783 does not have anything "numeric" to apply: https://github.com/zencart/zencart/b...eral.php#L1783

    Otherwise as far as seeing an error something like that, sure, occurs more often when strict error reporting is enabled and some data is not "cleansed" sufficiently.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,684
    Plugin Contributions
    123

    Default Re: Non Numeric error in editing orders

    Edit Orders is a mod. Please post to their support thread:
    https://www.zen-cart.com/showthread....Support-Thread
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  4. #4
    Join Date
    Feb 2013
    Posts
    345
    Plugin Contributions
    0

    Default Re: Non Numeric error in editing orders

    Quote Originally Posted by swguy View Post
    Edit Orders is a mod. Please post to their support thread:
    https://www.zen-cart.com/showthread....Support-Thread
    how could you tell that it is coming from that mod???

  5. #5
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,684
    Plugin Contributions
    123

    Default Re: Non Numeric error in editing orders

    Quote Originally Posted by lidlchris View Post
    how could you tell that it is coming from that mod???
    Request URI tells you the file being used. edit_orders.php is not part of Zen Cart; it's a mod.

    Quote Originally Posted by lidlchris View Post
    where is this set?? "strict error reporting is enabled"
    I'm not sure if MC# meant "PHP error reporting" or "MySQL Error reporting". I still don't know what's on the failing LOC you reported.

    If DB:
    admin/includes/configure.php (and catalog side includes/configure.php). After

    define('DB_DATABASE', 'your-db-name');

    add
    define('DB_MYSQL_MODE', 'NO_ENGINE_SUBSTITUTION');

    This will disable strict error reporting in MySQL.

    If PHP: it's set in admin/includes/extra_configures/enable_error_logging.php
    Last edited by swguy; 8 Dec 2018 at 06:56 AM.
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  6. #6
    Join Date
    Feb 2013
    Posts
    345
    Plugin Contributions
    0

    Default Re: Non Numeric error in editing orders

    I'm not sure if MC# meant "PHP error reporting" or "MySQL Error reporting". I still don't know what's on the failing LOC you reported.

    If DB:
    admin/includes/configure.php (and catalog side includes/configure.php). After

    define('DB_DATABASE', 'your-db-name');

    add
    define('DB_MYSQL_MODE', 'NO_ENGINE_SUBSTITUTION');

    This will disable strict error reporting in MySQL.

    If PHP: it's set in admin/includes/extra_configures/enable_error_logging.php

    i really don't know what this means?? i can't add anything to the cart on this site now..

  7. #7
    Join Date
    Feb 2013
    Posts
    345
    Plugin Contributions
    0

    Default Re: Non Numeric error in editing orders

    Quote Originally Posted by mc12345678 View Post
    What modifications are applied to that file as line 1783 does not have anything "numeric" to apply: https://github.com/zencart/zencart/b...eral.php#L1783

    Otherwise as far as seeing an error something like that, sure, occurs more often when strict error reporting is enabled and some data is not "cleansed" sufficiently.
    where is this set?? "strict error reporting is enabled"

  8. #8
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,478
    Plugin Contributions
    88

    Default Re: Non Numeric error in editing orders

    Quote Originally Posted by lidlchris View Post
    [Note: remember to include site URL, ZC version, list of plugins, PHP version, etc ... read the Posting Tips shown above for information to include in your post here. And, remove this comment before actually posting!]


    zen 1.5.5f - php 7.1

    anyone ever seen this error (fake admin address):
    [02-Dec-2018 00:34:13 UTC] Request URI: /adminxxxxxx/edit_orders.php?page=1&oID=243424&action=update_order, IP address: 160.3.207.42
    #1 zen_round() called at [/home/honor/public_html/includes/classes/currencies.php:94]
    #2 currencies->value() called at [/home/honor/public_html/adminxxxxxx/includes/classes/editOrders.php:436]
    #3 editOrders->eoRoundCurrencyValue() called at [/home/honor/public_html/adminxxxxxx/includes/classes/editOrders.php:441]
    #4 editOrders->eoFormatCurrencyValue() called at [/home/honor/public_html/adminxxxxxx/edit_orders.php:475]

    [02-Dec-2018 00:34:13 UTC] PHP Warning: A non-numeric value encountered in /home/honor/public_html/adminxxxxxx/includes/functions/general.php on line 1783
    The issue here, from an Edit Orders standpoint, is that the required updates to /includes/classes/order.php aren't in place:
    Code:
      function query($order_id) {
        global $db;
    
        $order_id = zen_db_prepare_input($order_id);
        $this->queryReturnFlag = NULL;
        $this->notify('NOTIFY_ORDER_BEFORE_QUERY', array(), $order_id);
        if ($this->queryReturnFlag === TRUE) return;
    
        $order_query = "select customers_id, customers_name, customers_company,
                             customers_street_address, customers_suburb, customers_city,
                             customers_postcode, customers_state, customers_country,
                             customers_telephone, customers_email_address, customers_address_format_id,
                             delivery_name, delivery_company, delivery_street_address, delivery_suburb,
                             delivery_city, delivery_postcode, delivery_state, delivery_country,
                             delivery_address_format_id, billing_name, billing_company,
                             billing_street_address, billing_suburb, billing_city, billing_postcode,
                             billing_state, billing_country, billing_address_format_id,
                             payment_method, payment_module_code, shipping_method, shipping_module_code,
                             coupon_code, cc_type, cc_owner, cc_number, cc_expires, currency, currency_value,
                             date_purchased, orders_status, last_modified, order_total, order_tax, ip_address
                            from " . TABLE_ORDERS . "
                            where orders_id = '" . (int)$order_id . "'";
    
        $order = $db->Execute($order_query);
    
    //-bof-edit_orders-lat9  *** 1 of 2 ***
        $totals_query = "select title, text, class, value
                             from " . TABLE_ORDERS_TOTAL . "
                             where orders_id = '" . (int)$order_id . "'
                             order by sort_order";
    //-eof-edit_orders-lat9  *** 1 of 2 ***
    
        $totals = $db->Execute($totals_query);
    
        while (!$totals->EOF) {
    
    
          if ($totals->fields['class'] == 'ot_coupon') {
            $coupon_link_query = "SELECT coupon_id
                    from " . TABLE_COUPONS . "
                    where coupon_code ='" . $order->fields['coupon_code'] . "'";
            $coupon_link = $db->Execute($coupon_link_query);
            $zc_coupon_link = '<a href="javascript:couponpopupWindow(\'' . zen_href_link(FILENAME_POPUP_COUPON_HELP, 'cID=' . $coupon_link->fields['coupon_id']) . '\')">';
          }
          $this->totals[] = array('title' => ($totals->fields['class'] == 'ot_coupon' ? $zc_coupon_link . $totals->fields['title'] . '</a>' : $totals->fields['title']),
                                  'text' => $totals->fields['text'],
    //-bof-edit_orders-lat9  *** 2 of 2 ***
                                  'class' => $totals->fields['class'],
                                  'value' => $totals->fields['value']);
    //-eof-edit_orders-lat9  *** 2 of 2 ***
          $totals->MoveNext();
        }

 

 

Similar Threads

  1. Replies: 1
    Last Post: 15 Dec 2018, 10:54 PM
  2. Replies: 2
    Last Post: 18 Nov 2018, 04:06 AM
  3. Replies: 38
    Last Post: 1 Nov 2018, 09:28 PM
  4. Replies: 0
    Last Post: 18 Feb 2018, 06:26 PM
  5. v155 A non-numeric value ?
    By Ang_l in forum Upgrading to 1.5.x
    Replies: 7
    Last Post: 5 Feb 2018, 05:26 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