Re: Non Numeric error in editing orders
Quote:
Originally Posted by
lidlchris
[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();
}