Which changes to shipping.php?
(no DIR_FS_CATALOG is not empty)
Printable View
Which changes to shipping.php?
(no DIR_FS_CATALOG is not empty)
Oh, I see. There are changes to shipping.php in v1.5.5
My mistake. I had expected backwards compatibility. But should not have. And it does have a warning if you read down the list of previous versions.
My bad.
No problems.
Regarding the backwards compatibility, it's something I strive for but the core-file changes needed for Edit Orders affect modules that seem to change on each new Zen Cart release ... so I'm working to push the required notifiers into the "core" and rely on those notifications being present for various plugins' operation! The shipping.php class for EO is a case-in-point.
A cautionary note for stores that are still using Zen Cart 1.5.4 has been added to the top of the EO Plugin download page (https://www.zen-cart.com/downloads.php?do=file&id=1513) ... thanks @swguy!
I've come across a couple of issues that can occur during an order's update if changes were made to a product (or its attributes) after-order:
1) A product in the order is currently disabled, its stock-quantity+order-quantity is a positive value and the store's configuration uses:
- Stock->Subtract Stock, set to 'true'.
- Stock->Show products when out of stock, set to '0'
Updating the order will cause the disabled product to be re-enabled. This issue has been around since at least v4.0.4.
2) A product in the order was deleted/removed from the shop after the order was placed.Updating the order "might" result in the product's name being erased from the order. Not clear when this issue was introduced; v4.0.4 processes correctly.
3) An attributed product exists in the order, but a purchased attribute is no longer available on the shop (i.e. that attribute has been deleted from the product).Viewing that order will show a different attribute selected, since the purchased one doesn't exist anymore, and updating the order will change the attribute from the one purchased without updating pricing. This issue has also been around since at least v4.0.4.
My plan is to create a script (an init_include) that, upon loading EO, checks for the above conditions and notifies via header-message (in English only) of the condition. The admin can choose to continue the order's edit (removing any products identified will be OK, but the action on update will not be "pretty").
The ultimate solution (detecting and acting upon the conditions in-code) are going to be tied to the Edit Orders restructuring (see EO GitHub issue #59 for additional information).
I'll post back here once the script is available; it should be usable on all Zen Cart installations.
Attached is a small zip-file that contains the two modules to be installed in YOUR_ADMIN directory to provide those messages:
- admin/includes/auto_loaders/config.eo_cautions.php
- admin/includes/init_includes/edit_orders_cautions.php
Attachment 17819
I'll report back to this support-thread when the updated version of Edit Orders is available that correctly deals with these conditions.
Edit Orders Version 4.1.4
Zencart Version 1.5.1
Hi i have a problem.
when i click update button i meet blank page. however, update button is working on most orders.
so i checked edit_orders.php file. and i saw "if ($status < 1) break;".
most order's status are larger than 1 but orders status having blank page are 0.
can someone explain why some orders have 0 status?
and how to solve not to see blank page?
thanks...
Zen Cart 1.5.1 (released in 2012) is going to be more difficult to debug, but when you receive a blank-page there "should" be a file created in your store's /logs directory named myDEBUG-adm-*.log that identify what the PHP issue is.
Remember that the -adm- debug-logs contain your store's secret-admin name, so if you post the contents of that file, be sure to xxx-out that name.
Other than some underlying PHP-related issue, I have no explanation for your orders that have an undefined (i.e. 0) value for their status-code ... but that's for a separate forum posting to determine.
Hi thanks for your answer...
below is the myDEBUG-adm-1528817021-296426.log's content
PHP Warning: Cannot modify header information - headers already sent by (output started at /home/tucsoncitycenter/public_html/xxx/edit_orders.php:69) in /home/tucsoncitycenter/public_html/xxx/includes/functions/general.php on line 23
and below is the general.php's 23 line
// Redirect to another page or site
function zen_redirect($url) {
global $logger;
// clean up URL before executing it
while (strstr($url, '&&')) $url = str_replace('&&', '&', $url);
while (strstr($url, '&&')) $url = str_replace('&&', '&', $url);
// header locates should not have the & in the address it breaks things
while (strstr($url, '&')) $url = str_replace('&', '&', $url);
header('Location: ' . $url); // line 23
session_write_close();
if (STORE_PAGE_PARSE_TIME == 'true') {
if (!is_object($logger)) $logger = new logger;
$logger->timer_stop();
}
exit;
}
and below is the DEBUG-update_order-1528817154-119718.log in logs/edit_orders
============================================================
= Edit Orders (4.1.4) Action Log
============================================================
Order ID: 1128
Action Requested: update_order
Enabled Order Totals: ot_subtotal;ot_shipping;ot_tax;ot_gv;ot_total
can you guess what the problem is on my website?
and if i give you my website's info...can you check for me?
thanks have a good one.
@sungmo, it's been about 2 years since I looked at EO 4.1.4. Would you post the top 100 lines of /your_admin/edit_orders.php (using "CODE" tags) and identify which line is #69.
line 69 is after if ($status < 1) break;
thanks...
<?php
//
// +----------------------------------------------------------------------+
// |zen-cart Open Source E-commerce |
// +----------------------------------------------------------------------+
// | Copyright (c) 2003 The zen-cart developers |
// | |
// | http://www.zen-cart.com/index.php |
// +----------------------------------------------------------------------+
// | This source file is subject to version 2.0 of the GPL license, |
// | that is bundled with this package in the file LICENSE, and is |
// | available through the world-wide-web at the following url: |
// | http://www.zen-cart.com/license/2_0.txt. |
// | If you did not receive a copy of the zen-cart license and are unable |
// | to obtain it through the world-wide-web, please send a note to |
// | [email protected] so we can mail you a copy immediately. |
// +----------------------------------------------------------------------+
global $db;
require('includes/application_top.php');
// Check for commonly broken attribute related items
eo_checks_and_warnings();
// Start the currencies code
include_once(DIR_WS_INCLUDES . 'init_includes/init_currencies.php');
// Use the normal order class instead of the admin one
include(DIR_FS_CATALOG . DIR_WS_CLASSES . 'order.php');
$oID = zen_db_prepare_input($_GET['oID']);
$step = zen_db_prepare_input($_POST['step']);
$add_product_categories_id = zen_db_prepare_input($_POST['add_product_categories_id']);
$add_product_products_id = zen_db_prepare_input($_POST['add_product_products_id']);
$add_product_quantity = zen_db_prepare_input($_POST['add_product_quantity']);
$orders_statuses = array();
$orders_status_array = array();
$orders_status_query = $db->Execute("select orders_status_id, orders_status_name
from " . TABLE_ORDERS_STATUS . "
where language_id = '" . (int)$_SESSION['languages_id'] . "' order by orders_status_id");
while (!$orders_status_query->EOF) {
$orders_statuses[] = array('id' => $orders_status_query->fields['orders_status_id'],
'text' => $orders_status_query->fields['orders_status_name'] . ' [' . $orders_status_query->fields['orders_status_id'] . ']');
$orders_status_array[$orders_status_query->fields['orders_status_id']] = $orders_status_query->fields['orders_status_name'];
$orders_status_query->MoveNext();
}
$action = (isset($_GET['action']) ? $_GET['action'] : 'edit');
if (zen_not_null($action)) {
if(EO_DEBUG_ACTION_LEVEL > 0) eo_log(
'============================================================' . PHP_EOL .
'= Edit Orders (' . EO_VERSION . ') Action Log' . PHP_EOL .
'============================================================' . PHP_EOL .
'Order ID: ' . $oID . PHP_EOL .
'Action Requested: ' . $action . PHP_EOL .
'Enabled Order Totals: ' . str_replace('.php', '', MODULE_ORDER_TOTAL_INSTALLED) . PHP_EOL
);
switch ($action) {
// Update Order
case 'update_order':
$comments = zen_db_prepare_input($_POST['comments']);
$status = (int)zen_db_prepare_input($_POST['status']);
if ($status < 1) break;
$order_updated = false;
$sql_data_array = array(
'customers_name' => zen_db_prepare_input($_POST['update_customer_name']),
'customers_company' => zen_db_prepare_input($_POST['update_customer_company']),
'customers_street_address' => zen_db_prepare_input($_POST['update_customer_street_address']),
'customers_suburb' => zen_db_prepare_input($_POST['update_customer_suburb']),
'customers_city' => zen_db_prepare_input($_POST['update_customer_city']),
'customers_state' => zen_db_prepare_input($_POST['update_customer_state']),
'customers_postcode' => zen_db_prepare_input($_POST['update_customer_postcode']),
'customers_country' => zen_db_prepare_input($_POST['update_customer_country']),
'customers_telephone' => zen_db_prepare_input($_POST['update_customer_telephone']),
'customers_email_address' => zen_db_prepare_input($_POST['update_customer_email_address']),
'last_modified' => 'now()',
'billing_name' => zen_db_prepare_input($_POST['update_billing_name']),
'billing_company' => zen_db_prepare_input($_POST['update_billing_company']),
'billing_street_address' => zen_db_prepare_input($_POST['update_billing_street_address']),
'billing_suburb' => zen_db_prepare_input($_POST['update_billing_suburb']),
'billing_city' => zen_db_prepare_input($_POST['update_billing_city']),
'billing_state' => zen_db_prepare_input($_POST['update_billing_state']),
'billing_postcode' => zen_db_prepare_input($_POST['update_billing_postcode']),
'billing_country' => zen_db_prepare_input($_POST['update_billing_country']),
'delivery_name' => zen_db_prepare_input($_POST['update_delivery_name']),
'delivery_company' => zen_db_prepare_input($_POST['update_delivery_company']),
'delivery_street_address' => zen_db_prepare_input($_POST['update_delivery_street_address']),
'delivery_suburb' => zen_db_prepare_input($_POST['update_delivery_suburb']),
'delivery_city' => zen_db_prepare_input($_POST['update_delivery_city']),
'delivery_state' => zen_db_prepare_input($_POST['update_delivery_state']),
'delivery_postcode' => zen_db_prepare_input($_POST['update_delivery_postcode']),
'delivery_country' => zen_db_prepare_input($_POST['update_delivery_country']),
'payment_method' => zen_db_prepare_input($_POST['update_info_payment_method']),
'cc_type' => zen_db_prepare_input($_POST['update_info_cc_type']),
'cc_owner' => zen_db_prepare_input($_POST['update_info_cc_owner']),
'cc_expires' => zen_db_prepare_input($_POST['update_info_cc_expires'])
);
For future reference, those "CODE" tags are inserted when you click the big # in the toolbar when you're writing a post. To include code (or large blocks of text), click that # button and then insert your code or text between the CODE and /CODE tags.
When you initially display an order for editing, there's a block at the bottom of the page that you use to change an order's status or add a message to the user. The 'status' field is the dropdown list of order-status values, used when you're changing the status of an order.
When you click that dropdown, what values are shown as possible?
Hmm, that doesn't make sense. That $status value that is being detected as 0 is the result of that dropdown form-element.
In Edit Orders 4.3.4 strange things are happening for stores which are displaying prices with tax and charge tax on the shipping fee.
To reproduce configure a vanilla 1.5.5f store like this (99% of b2c stores in Germany are configured like this):
Store Country: Germany
Zone: Berlin
Display Prices with tax: true
Display Prices with tax in Admin: true
Basis of Product Tax: Shipping
Basis of Shipping Tax: Shipping
Currency: Euro (Decimal Places: 2)
Tax Rate: 19%
Shipping Module: flat (set a price of 4.16 with tax class taxable goods so the result with tax will be 4.95 Euro)
Test product: set a price of 29.9000 gross
Order the product, the result will be:
Sub-Total: €29.90
Flat Rate (Best Way): €5.89
19%: €5.57
Total: €35.79
Edit the order with Edit Orders 4.3.4, do not change anything, just click the update button
The result will be:
Sub-Total: €29.90
Flat Rate (Best Way): €5.89
19%: €5.71
Total: €35.79
Note that the tax amount has magically increased.
EO log:
Code:2018-07-01 18:46:41, Edit Orders entered (4.3.4) action (edit)
Enabled Order Totals: ot_subtotal.php;ot_shipping.php;ot_coupon.php;ot_group_pricing.php;ot_tax.php;ot_loworderfee.php;ot_gv.php;ot_total.php
getOrderInfo, on entry: Called by /var/www/xxx/edit_orders.php on line #705
Subtotal: (not set), Shipping: (not set), Shipping Tax: (not set), Tax: 5.57, Total: 34.86, Tax Groups: {"19.0000":"1"}
$_SESSION['shipping']: (not set)
Order Totals
ot_subtotal. Text: €29.90, Value: 29.9047
ot_shipping. Text: €4.95, Value: 4.9504
ot_tax. Text: €5.57, Value: 5.5651
ot_total. Text: €34.86, Value: 34.8551
Checking order for virtual status. Order contains 1 unique products, 0 of those are virtual
getProductTaxes(19%)
{"products_tax_class_id":"1"}{"qty":1,"id":"1","name":"Test","model":"","tax":"19.0000","price":"25.1261","final_price":"25.1300","onetime_charges":"0.0000","products_priced_by_attribute":"0","product_is_free":"0","products_discount_type":"0","products_discount_type_from":"0"}
getProductTaxes, returning 4.77.
Checking order for virtual status. Order contains 1 unique products, 0 of those are virtual
calculateOrderShippingTax returning 0.94.
removeTaxFromShippingCost(order, flat), 1, Shipping, 1.19, 4.95, 4.16, 0.79
getOrderInfo, on exit:
{"code":"flat","title":"Flat Rate","description":"Flat Rate","icon":"","enabled":true,"sort_order":"0","tax_class":"1","tax_basis":"Shipping"}
Subtotal: 29.9, Shipping: 4.16, Shipping Tax: 0, Tax: 4.78, Total: 34.86, Tax Groups: {"19%":4.77}
$_SESSION['shipping']: {"title":"Flat Rate (Best Way)","id":"flat_","cost":4.95}
Order Totals
ot_subtotal. Text: €29.90, Value: 29.9047
ot_shipping. Text: €4.95, Value: 4.9504
ot_tax. Text: €5.57, Value: 5.5651
ot_total. Text: €34.86, Value: 34.8551
Checking order for virtual status. Order contains 1 unique products, 0 of those are virtual
============================================================
= Creating display of Order Product #1
============================================================
Product Details:
{"qty":1,"id":"1","name":"Test","model":"","tax":"19.0000","price":"25.1261","final_price":"25.1300","onetime_charges":"0.0000","products_priced_by_attribute":"0","product_is_free":"0","products_discount_type":"0","products_discount_type_from":"0"}
2018-07-01 18:46:59, Edit Orders entered (4.3.4) action (update_order)
Enabled Order Totals: ot_subtotal.php;ot_shipping.php;ot_coupon.php;ot_group_pricing.php;ot_tax.php;ot_loworderfee.php;ot_gv.php;ot_total.php
getOrderInfo, on entry: Called by /var/www/xxx/manager/edit_orders.php on line #305
Subtotal: (not set), Shipping: (not set), Shipping Tax: (not set), Tax: 0.00, Total: 34.86, Tax Groups: {"19.0000":"1"}
$_SESSION['shipping']: (not set)
Order Totals
ot_subtotal. Text: €29.90, Value: 29.9047
ot_shipping. Text: €4.95, Value: 4.9504
ot_tax. Text: €5.57, Value: 5.5651
ot_total. Text: €34.86, Value: 34.8551
Checking order for virtual status. Order contains 1 unique products, 0 of those are virtual
getProductTaxes(19%)
{"products_tax_class_id":"1"}{"qty":1,"id":"1","name":"Test","model":"","tax":"19.0000","price":"25.1261","final_price":"25.1300","onetime_charges":"0.0000","products_priced_by_attribute":"0","product_is_free":"0","products_discount_type":"0","products_discount_type_from":"0"}
getProductTaxes, returning 4.77.
Checking order for virtual status. Order contains 1 unique products, 0 of those are virtual
calculateOrderShippingTax returning 0.94.
removeTaxFromShippingCost(order, flat), 1, Shipping, 1.19, 4.95, 4.16, 0.79
getOrderInfo, on exit:
{"code":"flat","title":"Flat Rate","description":"Flat Rate","icon":"","enabled":true,"sort_order":"0","tax_class":"1","tax_basis":"Shipping"}
Subtotal: 29.9, Shipping: 4.16, Shipping Tax: 0, Tax: -0.79, Total: 34.86, Tax Groups: {"19%":4.77}
$_SESSION['shipping']: {"title":"Flat Rate (Best Way)","id":"flat_","cost":4.95}
Order Totals
ot_subtotal. Text: €29.90, Value: 29.9047
ot_shipping. Text: €4.95, Value: 4.9504
ot_tax. Text: €5.57, Value: 5.5651
ot_total. Text: €34.86, Value: 34.8551
Order Subtotal: 29.9
Order Totals
ot_subtotal. Text: €29.90, Value: 29.9047
ot_shipping. Text: €4.95, Value: 4.9504
ot_tax. Text: €5.57, Value: 5.5651
ot_total. Text: €34.86, Value: 34.8551
Order Tax (total): -0.79
Order Tax Groups:
{"19%":4.77}
Requested Products:
array (
1 =>
array (
'qty' => '1',
'name' => 'Test',
'model' => '',
'tax' => '19',
'final_price' => '25.13',
),
)
Products in Original Order:
array (
0 =>
array (
'qty' => 1,
'id' => '1',
'name' => 'Test',
'model' => '',
'tax' => '19.0000',
'price' => '25.1261',
'final_price' => '25.1300',
'onetime_charges' => '0.0000',
'products_priced_by_attribute' => '0',
'product_is_free' => '0',
'products_discount_type' => '0',
'products_discount_type_from' => '0',
),
)
Order Product ID: 1 Row ID: 0
Product in Request:
{"qty":1,"name":"Test","model":"","tax":"19","final_price":"25.13"}
Old Product:
{"qty":1,"id":"1","name":"Test","model":"","tax":"19.0000","price":"25.1261","final_price":"25.1300","onetime_charges":"0.0000","products_priced_by_attribute":"0","product_is_free":"0","products_discount_type":"0","products_discount_type_from":"0"}
Old Order Subtotal: 29.9
Old Order Totals: ot_subtotal. Text: €29.90, Value: 29.9047
ot_shipping. Text: €4.95, Value: 4.9504
ot_tax. Text: €5.57, Value: 5.5651
ot_total. Text: €34.86, Value: 34.8551
Old Tax (total): -0.79
Old Tax Groups:
{"19%":4.77}
eo_update_order_subtotal (), taxes on entry. Called by /var/www/xxx/edit_orders.php on line #370
Subtotal: 29.9, Shipping: 4.16, Shipping Tax: 0, Tax: -0.79, Total: 34.86, Tax Groups: {"19%":4.77}
$_SESSION['shipping']: {"title":"Flat Rate (Best Way)","id":"flat_","cost":4.95}
Order Totals
ot_subtotal. Text: €29.90, Value: 29.9047
ot_shipping. Text: €4.95, Value: 4.9504
ot_tax. Text: €5.57, Value: 5.5651
ot_total. Text: €34.86, Value: 34.8551
getProductTaxes(19%)
{"products_tax_class_id":"1"}{"qty":1,"id":"1","name":"Test","model":"","tax":"19.0000","price":"25.1261","final_price":"25.1300","onetime_charges":"0.0000","products_priced_by_attribute":"0","product_is_free":"0","products_discount_type":"0","products_discount_type_from":"0"}
getProductTaxes, returning 4.77.
eo_update_order_subtotal, taxes on exit.
Subtotal: 0, Shipping: 4.16, Shipping Tax: 0, Tax: -5.56, Total: 4.16, Tax Groups: {"19%":0}
$_SESSION['shipping']: {"title":"Flat Rate (Best Way)","id":"flat_","cost":4.95}
Order Totals
ot_subtotal. Text: €0.00, Value: 0
ot_shipping. Text: €4.95, Value: 4.9504
ot_tax. Text: €-5.56, Value: -5.56
ot_total. Text: €4.16, Value: 4.16
Removed Product Order Subtotal: 0
Removed Product Order Totals: ot_subtotal. Text: €0.00, Value: 0
ot_shipping. Text: €4.95, Value: 4.9504
ot_tax. Text: €-5.56, Value: -5.56
ot_total. Text: €4.16, Value: 4.16
Removed Product Tax (total): -5.56
Removed Product Tax Groups:
{"19%":0}
eo_update_order_subtotal (1), taxes on entry. Called by /var/www/xxx/manager/edit_orders.php on line #429
Subtotal: 0, Shipping: 4.16, Shipping Tax: 0, Tax: -5.56, Total: 4.16, Tax Groups: {"19%":0}
$_SESSION['shipping']: {"title":"Flat Rate (Best Way)","id":"flat_","cost":4.95}
Order Totals
ot_subtotal. Text: €0.00, Value: 0
ot_shipping. Text: €4.95, Value: 4.9504
ot_tax. Text: €-5.56, Value: -5.56
ot_total. Text: €4.16, Value: 4.16
getProductTaxes(19%)
false{"id":1,"qty":1,"tax":"19","name":"Test","model":"","price":"25.1261","products_discount_type":"0","products_discount_type_from":"0","products_priced_by_attribute":"0","product_is_free":"0","products_virtual":"0","product_is_always_free_shipping":"0","tax_description":"19%","onetime_charges":0,"final_price":"25.13"}
getProductTaxes, returning 4.77.
eo_update_order_subtotal, taxes on exit.
Subtotal: 29.9, Shipping: 4.16, Shipping Tax: 0, Tax: -0.79, Total: 34.06, Tax Groups: {"19%":4.77}
$_SESSION['shipping']: {"title":"Flat Rate (Best Way)","id":"flat_","cost":4.95}
Order Totals
ot_subtotal. Text: €29.90, Value: 29.9
ot_shipping. Text: €4.95, Value: 4.9504
ot_tax. Text: €-0.79, Value: -0.79
ot_total. Text: €34.06, Value: 34.06
Pricing, as entered, was used.
Added Product:
{"id":1,"qty":1,"tax":"19","name":"Test","model":"","price":"25.1261","products_discount_type":"0","products_discount_type_from":"0","products_priced_by_attribute":"0","product_is_free":"0","products_virtual":"0","product_is_always_free_shipping":"0","tax_description":"19%","onetime_charges":0,"final_price":"25.13"}
Added Product Order Subtotal: 29.9
Added Product Order Totals: ot_subtotal. Text: €29.90, Value: 29.9
ot_shipping. Text: €4.95, Value: 4.9504
ot_tax. Text: €-0.79, Value: -0.79
ot_total. Text: €34.06, Value: 34.06
Added Product Tax (total): -0.79
Added Product Tax Groups:
{"19%":4.77}
Updated Products in Order:
array (
0 =>
array (
'id' => 1,
'qty' => 1.0,
'tax' => '19',
'name' => 'Test',
'model' => '',
'price' => '25.1261',
'products_discount_type' => '0',
'products_discount_type_from' => '0',
'products_priced_by_attribute' => '0',
'product_is_free' => '0',
'products_virtual' => '0',
'product_is_always_free_shipping' => '0',
'tax_description' => '19%',
'onetime_charges' => 0,
'final_price' => '25.13',
'stock_reduce' => 1.0,
),
)
Updated Products Order Totals: ot_subtotal. Text: €29.90, Value: 29.9
ot_shipping. Text: €4.95, Value: 4.9504
ot_tax. Text: €-0.79, Value: -0.79
ot_total. Text: €34.06, Value: 34.06
Updated Products Tax (total): 4.77
Updated Products Tax Groups:
{"19%":4.77}
============================================================
= Processing Requested Updates to Order Totals
============================================================
Requested Order Totals:
array (
0 =>
array (
'code' => 'ot_shipping',
'shipping_module' => 'flat',
'title' => 'Flat Rate (Best Way):',
'value' => '4.9504',
),
1 =>
array (
'code' => 'ot_coupon',
'title' => '',
'value' => '',
'shipping_module' => 'flat',
),
)
Starting Order Totals: ot_subtotal. Text: €29.90, Value: 29.9
ot_shipping. Text: €4.95, Value: 4.9504
ot_tax. Text: €-0.79, Value: -0.79
ot_total. Text: €34.06, Value: 34.06
Starting Tax (total): 4.77
Starting Tax Groups:
{"19%":4.77}
eo_update_database_order_total: and_clause: (), found (0), array (
'code' => 'ot_shipping',
'shipping_module' => 'flat',
'title' => 'Flat Rate (Best Way):',
'value' => 4.9504000000000001,
'text' => '€4.95',
'sort_order' => NULL,
)
eo_update_database_order_total: and_clause: (), found (1), array (
'code' => 'ot_coupon',
'title' => '',
'value' => 0.0,
'shipping_module' => 'flat',
'text' => '€0.00',
'sort_order' => NULL,
)
eo_update_database_order_totals, taxes/totals on entry. Called by /var/www/xxx/edit_orders.php on line #585
Subtotal: 29.9, Shipping: 4.9504, Shipping Tax: 0, Tax: 4.77, Total: 34.06, Tax Groups: {"19%":4.77}
$_SESSION['shipping']: {"title":"Flat Rate (Best Way)","id":"flat_","cost":4.95}
Order Totals
ot_subtotal. Text: €29.90, Value: 29.9
ot_shipping. Text: €4.95, Value: 4.9504
ot_tax. Text: €-0.79, Value: -0.79
ot_total. Text: €34.06, Value: 34.06
ot_coupon. Text: €0.00, Value: 0
Checking order for virtual status. Order contains 1 unique products, 0 of those are virtual
Checking taxes for ot_coupon: Tax class (MODULE_ORDER_TOTAL_COUPON_TAX_CLASS:0), 0
eo_update_database_order_totals, after adjustments: order_total: 35.790976, order_tax: 5.710576
eo_update_database_order_totals, after process: order_total: 35.790976, order_tax: 5.710576
[{"code":"ot_subtotal","title":"Sub-Total:","text":"€29.90","value":29.9,"sort_order":"100"},{"code":"ot_shipping","title":"Flat Rate (Best Way)::","text":"€5.89","value":5.890976,"sort_order":"200"},{"code":"ot_tax","title":"19%:","text":"€5.71","value":5.710576,"sort_order":"300"},{"code":"ot_total","title":"Total:","text":"€35.79","value":35.790976,"sort_order":"999"}]
[{"title":"Sub-Total:","text":"€29.90","class":"ot_subtotal","value":29.9},{"title":"Flat Rate (Best Way):","text":"€4.95","class":"ot_shipping","value":4.9504},{"title":"19%:","text":"€-0.79","class":"ot_tax","value":-0.79},{"title":"Total:","text":"€34.06","class":"ot_total","value":34.06},{"class":"ot_coupon","title":"","value":0,"text":"€0.00","sort_order":null}]
eo_update_database_order_total: and_clause: (), found (0), array (
'code' => 'ot_subtotal',
'title' => 'Sub-Total:',
'text' => '€29.90',
'value' => 29.899999999999999,
'sort_order' => '100',
)
eo_update_database_order_total: and_clause: (), found (0), array (
'code' => 'ot_shipping',
'title' => 'Flat Rate (Best Way)::',
'text' => '€5.89',
'value' => 5.8909760000000002,
'sort_order' => '200',
)
eo_update_database_order_total: and_clause: (), found (0), array (
'code' => 'ot_tax',
'title' => '19%:',
'text' => '€5.71',
'value' => 5.7105759999999997,
'sort_order' => '300',
)
eo_update_database_order_total: and_clause: (), found (0), array (
'code' => 'ot_total',
'title' => 'Total:',
'text' => '€35.79',
'value' => 35.790976000000001,
'sort_order' => '999',
)
Removing order-total, and-clause: `class` = ''
Removing order-total, and-clause: title = 'Flat Rate (Best Way):' OR `class` = ''
Removing order-total, and-clause: `class` = ''
Removing order-total, and-clause: `class` = ''
Removing order-total, and-clause: title = '' OR `class` = ''
eo_update_database_order_totals, taxes on exit.
Subtotal: 29.9, Shipping: 5.890976, Shipping Tax: 0.940576, Tax: 5.710576, Total: 35.790976, Tax Groups: {"19%":5.710576}
$_SESSION['shipping']: {"title":"Flat Rate (Best Way)","id":"flat_","cost":4.95}
Order Totals
ot_subtotal. Text: €29.90, Value: 29.9
ot_shipping. Text: €4.95, Value: 4.9504
ot_tax. Text: €-0.79, Value: -0.79
ot_total. Text: €34.06, Value: 34.06
ot_coupon. Text: €0.00, Value: 0
Order Totals
ot_subtotal. Text: €29.90, Value: 29.9
ot_shipping. Text: €4.95, Value: 4.9504
ot_tax. Text: €-0.79, Value: -0.79
ot_total. Text: €34.06, Value: 34.06
ot_coupon. Text: €0.00, Value: 0
Updated Tax (total): 5.710576
Updated Tax Groups:
{"19%":5.710576}
============================================================
= Done Processing Requested Updates to the Order
============================================================
Final Subtotal: 29.9
Final Totals: ot_subtotal. Text: €29.90, Value: 29.9
ot_shipping. Text: €4.95, Value: 4.9504
ot_tax. Text: €-0.79, Value: -0.79
ot_total. Text: €34.06, Value: 34.06
ot_coupon. Text: €0.00, Value: 0
Final Tax (total): 5.710576
Final Tax Groups:
{"19%":5.710576}
2018-07-01 18:47:00, Edit Orders entered (4.3.4) action (edit)
Enabled Order Totals: ot_subtotal.php;ot_shipping.php;ot_coupon.php;ot_group_pricing.php;ot_tax.php;ot_loworderfee.php;ot_gv.php;ot_total.php
getOrderInfo, on entry: Called by /var/www/xxx/edit_orders.php on line #705
Subtotal: (not set), Shipping: (not set), Shipping Tax: (not set), Tax: 5.71, Total: 35.79, Tax Groups: {"19.0000":"1"}
$_SESSION['shipping']: {"title":"Flat Rate (Best Way)","id":"flat_","cost":4.95}
Order Totals
ot_subtotal. Text: €29.90, Value: 29.9000
ot_shipping. Text: €5.89, Value: 5.8910
ot_tax. Text: €5.71, Value: 5.7106
ot_total. Text: €35.79, Value: 35.7910
Checking order for virtual status. Order contains 1 unique products, 0 of those are virtual
getProductTaxes(19%)
{"products_tax_class_id":"1"}{"qty":1,"id":"1","name":"Test","model":"","tax":"19.0000","price":"25.1261","final_price":"25.1300","onetime_charges":"0.0000","products_priced_by_attribute":"0","product_is_free":"0","products_discount_type":"0","products_discount_type_from":"0"}
getProductTaxes, returning 4.77.
Checking order for virtual status. Order contains 1 unique products, 0 of those are virtual
calculateOrderShippingTax returning 1.12.
removeTaxFromShippingCost(order, flat), 1, Shipping, 1.19, 5.89, 4.95, 0.94
getOrderInfo, on exit:
{"code":"flat","title":"Flat Rate","description":"Flat Rate","icon":"","enabled":true,"sort_order":"0","tax_class":"1","tax_basis":"Shipping"}
Subtotal: 29.9, Shipping: 4.95, Shipping Tax: 0, Tax: 4.77, Total: 35.79, Tax Groups: {"19%":4.77}
$_SESSION['shipping']: {"title":"Flat Rate (Best Way):","id":"flat_","cost":5.89}
Order Totals
ot_subtotal. Text: €29.90, Value: 29.9000
ot_shipping. Text: €5.89, Value: 5.8910
ot_tax. Text: €5.71, Value: 5.7106
ot_total. Text: €35.79, Value: 35.7910
Checking order for virtual status. Order contains 1 unique products, 0 of those are virtual
============================================================
= Creating display of Order Product #2
============================================================
Product Details:
{"qty":1,"id":"1","name":"Test","model":"","tax":"19.0000","price":"25.1261","final_price":"25.1300","onetime_charges":"0.0000","products_priced_by_attribute":"0","product_is_free":"0","products_discount_type":"0","products_discount_type_from":"0"}
@webchills, did you try clicking on the "Update" button twice? EO has issues at times with tax-related calculations.
I appreciate the detailed steps to reproduce the issue and will attempt that later today.
@webchills, did you also try ticking the "Reset totals prior to update" box?
Hmm, when I use your setup instructions and place an order containing that product, instead of
Sub-Total: €29.90
Flat Rate (Best Way): €5.89
19%: €5.57
Total: €35.79
... I get
Sub-Total: €29.90
Flat Rate (Best Way): €4.95
19%: €5.57
Total: €34.86
Any idea what's different (other than the result)?
Note that regardless the storefront calculations, EO doesn't recalculate correctly as @webchills described. At this point, I've got the issue modeled and will continue investigations.
Sorry was a typo, the shipping fee is of course 4.95 gross in frontend.
I guess, things would be much easier to handle if Zen Cart would store the tax rate of the shipping fee and the tax amount of the shipping fee in separate fields in the orders_total table which is not the case right now.
For Edit Orders I would suggest that the tax amount should be editable as well to be able to correct such miscalculations. Should be calculated correctly though.
@webchills, I agree on both counts. I've created a GitHub issue to change EO (for the next, major, release) to enable the editing of the "ot_tax" value.
Am a linux novice. Have v1.5.5f on a test setup and trying to install Edit Orders v4.3.4. Used KDiff3 to merge files per instructions.
The install seems to go fine but when I go to an order and click on Update it gives me page with only "Warning: An Error occurred, please refresh the page and try again." This happens whether or not I make any changes to order.
Any suggestions very much appreciated.
Operating system Ubuntu Linux 16.04.3
Perl version 5.022001
Apache version 2.4.18
PHP versions 7.0.30
MySQL version 5.7.23-0ubuntu0.16.04.1
Here is error log file:
Code:[13-Aug-2018 09:58:58 America/New_York] Request URI: /ADMIN/edit_orders.php?selected_box=customers&status=2&page=1&oID=3&action=update_order, IP address: 1xx.xxx.xxx.xxx
#1 trigger_error() called at [/includes/classes/db/mysql/query_factory.php:171]
#2 queryFactory->show_error() called at [/includes/classes/db/mysql/query_factory.php:143]
#3 queryFactory->set_error() called at [/includes/classes/db/mysql/query_factory.php:270]
#4 queryFactory->Execute() called at /ADMIN/includes/functions/database.php:53]
#5 zen_db_perform() called at /ADMIN/includes/functions/extra_functions/edit_orders_functions.php:1394]
#6 eo_update_database_order_total() called at [/ADMIN/edit_orders.php:581]
[13-Aug-2018 09:58:58 America/New_York] PHP Fatal error: 1366:Incorrect integer value: '' for column 'sort_order' at row 2 :: update orders_total set title = 'Flat Rate (Best Way):', text = '$5.00', value = '5', sort_order = '' where class='ot_shipping' AND orders_id=3 ==> (as called by) /ADMIN/includes/functions/database.php on line 53 <== in /includes/classes/db/mysql/query_factory.php on line 171
@Ted Grapler, edit the file /admin/includes/functions/extra_functions/edit_orders_functions.php. On/about line 1371, find the following code fragment
and make the highlighted changeCode:function eo_update_database_order_total($oID, $order_total) {
global $db, $eo;
$updated = false;
$sql_data_array = array(
'title' => $order_total['title'],
'text' => $order_total['text'],
'value' => (is_numeric($order_total['value'])) ? $order_total['value'] : 0,
'sort_order' => $order_total['sort_order']
);
Note also that you should also check your Modules->Order Totals to ensure that the "Sort Order" for the ot_shipping total is a valid numeric value.Code:function eo_update_database_order_total($oID, $order_total) {
global $db, $eo;
$updated = false;
$sql_data_array = array(
'title' => $order_total['title'],
'text' => $order_total['text'],
'value' => (is_numeric($order_total['value'])) ? $order_total['value'] : 0,
'sort_order' => (int)$order_total['sort_order']
);
Thank you lat9. That fixed the issue.
version 1.3.9 whenver i try to edit an order by chaning say table rate , in orders page the price inclusive and eclusive gets same and all price get changed. Any help!
Version 1.3.9 of what? If you're running Zen Cart v1.3.9{something}, this version of edit orders is not supported.
I've just submitted v4.3.5 of EO to the Zen Cart plugins for review and will post back here once it's approved.
This release contains changes associated with the following GitHub issues:
#87: New settings not added on initial installation.
#86: Sanitize order totals' sort-orders to ensure numeric values.
Now available for download from the Zen Cart plugins: https://www.zen-cart.com/downloads.php?do=file&id=1513
Log in to your Admin
Go to configuration and then down to Edit Orders
This is where you would go to look to see what version you currently have installed in the Zen Cart?
Was told to post this error from my logs file here - any idea what is causing this:
zen 1.5.5f - php 7.1 - version 4.3.3 of 'edit-orders'
[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
coding is attached in image. Attachment 18161
Did you apply the modifications required by EO to your store's /includes/classes/order.php and /YOUR_ADMIN/includes/classes/order.php?
The EO call that the debug-log is complaining about occurs during EO's update processing when it's recreating the order's totals, converting their (presumed) numeric value to a currency-based string display.
The as-shipped storefront order-class doesn't include the numeric portion of an order-total's value when it recreates an order; that's what the storefront changes required by EO do.
Turn on the Edit Orders debug via its configuration setting, update that order again and send me a copy of the log (it'll be big) to my direct email address, which I'll PM to you.
I couldn't find where to turn on the Edit Orders debug. The only settings i have under configuration/edit orders are these: Attachment 18162
Hmm, somehow the 'base' Edit Orders' configuration settings got "lost". Copy the following (EO's uninstall SQL script) into your admin's Tools->Install SQL Patches and run it.
That will remove EO's configuration values and, since you're not removing any of the EO initialization files, the full default EO configuration will be created.Code:DELETE FROM configuration WHERE configuration_key LIKE 'EO_%';
DELETE FROM configuration_group WHERE configuration_group_title = 'Edit Orders' LIMIT 1;
DELETE FROM admin_pages WHERE page_key IN ('editOrders', 'configEditOrders');
ok, i did this and when i went into my admin section it showed 'edit orders installed' message. So then i went to edit an order and this is what i got (fake admin address):
[14-Dec-2018 01:34:50 UTC] Request URI: /fakeadmin/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/fakeadmin/includes/classes/editOrders.php:436]
#3 editOrders->eoRoundCurrencyValue() called at [/home/honor/public_html/fakeadmin/includes/classes/editOrders.php:441]
#4 editOrders->eoFormatCurrencyValue() called at [/home/honor/public_html/fakeadmin/edit_orders.php:475]
[14-Dec-2018 01:34:50 UTC] PHP Warning: A non-numeric value encountered in /home/honor/public_html/fakeadmin/includes/functions/general.php on line 1783
Here is the coding at that line:
HTML Code:function zen_round($value, $precision) {
$value = round($value *pow(10,$precision),0);
$value = $value/pow(10,$precision);
return $value;
}
Hello,
I have a problem. I just installed EO on zen cart 1.5.5f. I'm having an issue: when i try to change the price in edit orders it always resorts back to the stores listed price. (not the salemaker price) or any price other than list price. I try to change the number from $119 to $79.99 and click update. It reverts back every time. Thanks in advance.
You don't say what version of EO that you're using, but the most recent version (4.3.5) provides a set of "Price Calculation Method" settings in its configuration settings.
For what you want to do, either
set Configuration->Edit Orders->Product Price Calculation — Method to Manual
or
set Configuration->Edit Orders->Product Price Calculation — Method to Choose and set the default choice Configuration->Edit Orders->Product Price Calculation — Default to Manual.
is there a 'purchase order' shipping option to the 'edit orders' plugin??
Hello, just wondering if there will be an update soon that is compatible with the latest ZC version 1.5.6a?
Can anyone please help me......
i want to replace % To + in tax field
Attachment 18299
You don't say which version of Edit Orders you're using, but by the screenshot it's a pretty old one.
You'll (unfortunately) need to edit your /admin/edit_orders.php, locating %</td> and changing that to +</td>. I'll migrate that symbol to the edit_orders.php language file for the next release.
Identified in this GitHub issue: https://github.com/lat9/edit_orders/issues/96
Thanks you so much for Reply .. i changed but in monthly sale ..under reports iTs still showing % value ...
i want same value that i put using edit order..
its automatically convert with % in monthly sale page .. but i dont want it .. :( please help..
Attachment 18300
Thanks you so much for Reply .. i changed but in monthly sale ..under reports iTs still showing % value ...
i want same value that i put using edit order..
its automatically convert with % in monthly sale page .. but i dont want it .. please help..
Attachment 18301
I have wierd problem wit EO on ZC1.5.6.
I can't update product price nor product total, but its possible to edit shipping costs as well custommer info and add new products to the order but they dont affect order total.
There is no error LOG.
Any Ideas?
zc156a
I have observed the same. Edit product price not saved but in mine adding a new product increases the total cost. It also recalculates the postage and increments it by the tax amount for each update.
This did not occur with zc155a.
Here is the exact line wich is not possible to eddit:
PHP Code:
<td class="dataTableContent" align="right" valign="top"><input class="amount" name="update_products[<?php echo $orders_products_id; ?>][final_price]" size="5" value="<?php echo number_format($order->products[$i]['final_price'], 2, '.', ''); ?>" /></td>
Hello yes it is 4.3.5, i found that if change Product Price Calculation — Method from AUTO to MANUAL its possible to update price but then after updating the product details is missing from order (name/model)
I will try to install everything again because I had to mess up with the code and probably I'm the cause of that.
All the best.
Thank you I will try further investigation on that matter too.
Kind regards.
Final solution:
I had edit_orders.php cached in dreamwevaer wich resulted in problems with my previous install after replacing all files with the original EO and swithcing to MANUAL everything is working as expected.
Sory for the fuss I have made!
An update, after some preliminary inspection of EO's zip-file distribution:
If you are performing a fresh install of EO 4.3.5 on Zen Cart 1.5.6+, be sure to use the as-supplied zc156+ version of /includes/classes/order.php -- i.e. do not copy the version distributed by EO! The zc156+ version of that class-file contains the changes required by EO and using the EO-supplied version could result in unpredictable processing for zc156+.:(
I'll be checking more later this week.
Note: The same applies to the /admin/orders.php distributed by Edit Orders. The notifications required are "baked into" zc156, so use the zc156-supplied file in preference to the one shipped by EO.
Im using EO 4.3.5 as well with zc156a.
When I get a chance I'll do a clean install on a Vanilla 156a while taking note of Lat9's comments.
EO 4.3.5 with ZC 156a and zc original orders file I still get the same results.
Changing the unit price makes no difference - the change is ignored and not saved. The postage is recalculated each time and incremented by the already included tax amount (ie 10% of value added each time). The Tax amount and the Total values are recalculated.
If product qty is changed it recalculates ok; if tax % is changed it recalculates ok; if additional product is added it recalculates ok: change the postage cost it recalculates but increments the price by 10% on each calculation.
When the postage is recalculated a colon is appended to the end of the postage description each time
Attachment 18348
All other text fields ie address, email, telephone number change ok.
Are you sure you've changed the Edit Orders configuration to allow Manual price updates?
Since you're in AU, you're (I'm just guessing) displaying prices with tax and shipping is taxed. I've got some changes in-process to better handle that processing. In the meantime, try entering the shipping-cost as the value minus the added %10 GST.
That extra colon is also a known issue (https://github.com/lat9/edit_orders/issues/91) which will be included in the next version as well.
I've updated EO from 4.3.4 to 4.3.5 in zc 1.5.5f on my development system and on the live site. The install success message was displayed when the admin was entered for both systems. But the edit orders settings in admin/configuration are different on the live site when compared to the development site. The development site is correct, I believe. The live site is missing settings and has others settings that the development system does not have.
The list of settings on the development system are:
- Edit Orders Version
- Reset Totals on update - Default
- Use a Mock Shopping Cart
- Strip Tags from the Shipping Module Name
- Debug Action Level
- Product Price Calculation - Method
- Product Price Calculation - Default
Settings on the Live site are:
- Reset Totals on Update - Default
- Product Price Calculation - Method
- Product Price Calculation - Default
- Shipping Tax
- Edit Orders Version
I've compared all EO files between the two systems and they are identical. The installed order_total modules are identical. I suspect the configuration database is incorrect for the live site. How can I force an EO install to fix this problem? Or should I mess with the configuration database table?
Thank you,
Dave
Additional information about the post above. I discovered last night that EO was not working correctly on the live site under EO 4.3.4, but was working correctly on the development system. I thought upgrading would fix the problem, but as it turns out, it didn't. So whatever caused the problem on the live site occurred before the update to 4.3.5, and the update didn't fix it. BTW, while I have several ZC versions on the development system, these posts all refer to the same exact version on the dev system as on the live site.
For the live site, you can safely fun EO's uninstall_eo.sql commands (see below) ... without removing any files. After removing the configuration-related elements from the database, just refresh the page and the current database-based configuration elements will be re-applied.
Also noting that the "Shipping Tax" setting was removed in EO 4.1.1.Code:DELETE FROM configuration WHERE configuration_key LIKE 'EO_%';
DELETE FROM configuration_group WHERE configuration_group_title = 'Edit Orders' LIMIT 1;
DELETE FROM admin_pages WHERE page_key IN ('editOrders', 'configEditOrders');
Lat9,
Thanks! Everything is fine now.
Dave
Hello!
I have just installed Version 4.3.4 of Edit Orders on Version 1.5.6a of ZenCart, PHP 7.2.17. Everything seems to be working as expected. I just had a couple questions.
1.) This is purely cosmetic, but is it normal that the "EDIT" button does not match? It had prior to installing Edit Orders. Did I mess something up somewhere?
2.) What is the main icon with the exclamation point? Is it normal that it is on EVERY order? Seems like the green "E" takes me to details and this new icon takes me to the edit screen? Is this correct?
Any insight would be appreciated! Thanks!
Attachment 18419
Yes, it's normal that the edit button doesn't match the Zen Cart 1.5.6 updated layout (that'll be updated in a future version of EO). The exclamation-in-circle icon is standard zen-cart rendering and simply chooses that order for processing, when clicked.
Thanks, lat9!
I appreciate your quick response. Just wanted to make sure I didn't mess anything up somewhere that would come back to bit me late.
Why is it that when I update the order status, no matter what status I change it to the price totals change to a lower price or zero? And how do I stop this happening?
Attachment 18437
Attachment 18438
@Nick1973, what version of Edit Orders and what version of Zen Cart?
I'm still working through the EO/zc156 integration (obviously) but should have something in a couple of weeks.
Does the issue arise only if you use EO to update the order's status? If so, just use the regular orders handling to perform that function.
I've got a close-to-release version (v4.4.0-beta5) of Edit Orders now staged on GitHub: https://github.com/lat9/edit_orders/...g/v4.4.0-beta5
Please note that this is a beta version, not yet intended for live site integration! I'd appreciate any/all 3rd-party validation that the community can provide, with issues found reported via GitHub, please.
Here's the list of issues currently staged for update by that release: https://github.com/lat9/edit_orders/...stone%3Av4.4.0
Hi,
I need urgent help. When I edit a customer order, it gives me the following message for any sold out (or disabled products).
Caution: The product (…………….) is currently disabled. Updating the order will re-enable that product.
Sometimes I have products that are *disabled* but I still have "product quantity" because they are either on backorder or it needs to be disabled for various reason.
Now if I edit an order which has "disabled or soldout products", it is re-enabling" them in the shop. Why is this? If I have disabled it, then it's for a reason, I don't understand why it doesn't stay disabled (even if I temporarily have products listed in it)
What is happening now is that I am getting orders for products the are suppose to be disabled temporarily. I am assuming this has something to do with the EO Plugin because it only happens if I edit an order that has disabled products.
If the product quantity is on zero, then it remains disabled, so this is not an issue. I now have products all over the shop that are en-abled (after an order edit) which should remain disabled.
We upgraded recently from v1.3.9 to v1.5.6
Plugin Edit Orders v4.3.5
Thanks in advance for help……….. happy to provide more information if needed
@Dustie, that's a side-effect of EO's current product-related processing. When an order is updated, each product is "removed" from the order (and 're-stocked') and then re-added to the order. That unwanted re-enabling of the product(s) is needed -- otherwise, the product could not be re-added to the order (since it's disabled).
I'll note this side-effect in the EO issue associated with the change to EO's processing of the update. Please note, though, that the associated change will take some time. The good news is at least EO let you know what it was doing!
Hi,
thanks for your reply.
I had to think about your reply because I didn't quite understand what you meant, but now I realise it is the opposite problem to what we had with the V1.3.9. In the old Version, if I edited and deleted a item from an order and it was returned to a disable product that was "out of stock", it didn't automatically re-enable to show that the product was on stock again. I also had to make a note of the products and go back and re-enable them.
Now it's the opposite, it's re-enabling products that should not be showing. For me personally this issue is worse because if I "miss" the re-activating of a product, we have to refund money for products that are temporarily out of stock.
Majority of our edits are done on calculated postage, so it still doesn't make sense that it re-enables items that I didn't make any changes too.
If I understood correctly you will be working on this issue was well? Yes, it's good that at least EO is telling us what it's doing…
This is really causing us alot of stock problems and so I am wondering, would the older version work on v1.5.6 until the issue is resolved?
Updated the beta version to v4.4.0-beta10 (https://github.com/lat9/edit_orders/.../v4.4.0-beta10). This beta-release, which I now consider a release-candidate, corrects various tax-handling issues and adds notifications to enable other plugins to interoperate without changing the base files.
My plan is to release v4.4.0 later this week! Thanks to all the people that have provided additional testing and feedback!
Can't seem to anyone with the same problem as I do.
I can normally edit an order (quantity, add new product, comment, status, etc.) with no problem. Recently a HUGE order came in with over 400 items and can't be edited. Clicking update gives me a blank page that has the all the admin header, nav and footer and nothing else. I can add an item and it updates but not edit existing items.
debug_edit _orders_xxx.log ends with just this:
2019-05-31 15:03:13, Edit Orders entered (4.3.4) action (update_order)
Enabled Order Totals: ot_subtotal.php;ot_misc_cost.php;ot_group_pricing.php;ot_tax.php;ot_shipping.php ;ot_total.php
[/CODE]Code:2019-05-31 08:58:11, Edit Orders entered (4.3.4) action (edit)
Enabled Order Totals: ot_subtotal.php;ot_misc_cost.php;ot_group_pricing.php;ot_tax.php;ot_shipping.php;ot_total.php
getOrderInfo, on entry: Called by /…/…/…/…/edit_orders.php on line #705
Subtotal: (not set), Shipping: (not set), Shipping Tax: (not set), Tax: XXXX.XX, Total: XXXXX.XX, Tax Groups: {"15.0000":"1"}
$_SESSION['shipping']: (not set)
Order Totals
ot_subtotal. Text: $XX,XXX.XX, Value: XXXXX.XXXX
ot_tax. Text: $X,XXX.XX, Value: XXXX.XXXX
ot_shipping. Text: $0.00, Value: 0.0000
ot_total. Text: $XX,XXX.XX, Value: XXXXX.XXXX
Checking whether the product's attribute is a download, option_id = 14, value_id = 196: (1)
…..… LONG LIST……..
Checking order for virtual status. Order contains 453 unique products, 0 of those are virtual
getProductTaxes(15.0% HST)
{"products_tax_class_id":"1"}{"qty":2,"id":"653","name”:”Product Name”,”model”:”XXX-XX”,”tax":"15.0000","price”:”XX.XXXX”,”final_price”:”XX.XXXX”,”onetime_charges":"0.0000","products_priced_by_attribute":"1","product_is_free":"0","products_discount_type":"0","products_discount_type_from":"0","attributes":[{"option":"Color","value":"Amber","option_id":"1","value_id":"16","prefix":"+","price":"0.0000"}]}
getProductTaxes, returning 8.1.
…..… LONG LIST……..
Checking whether the product's attribute is a download, option_id = 14, value_id = 196: (1)
…..… LONG LIST……..
Checking order for virtual status. Order contains 453 unique products, 0 of those are virtual
calculateOrderShippingTax returning 0.
getOrderInfo, on exit:
{"code":"delivertocustomer","title":"Delivery","description":"Deliver to Customer","icon":"","enabled":true,"sort_order":"0","tax_class":"0","tax_basis":"Shipping"}
Subtotal: XXXXX.X, Shipping: 0, Shipping Tax: 0, Tax: XXXX.XX, Total: XXXXX.XX, Tax Groups: {"15.0% HST”:XXXX.XX}
$_SESSION['shipping']: {"title":"Delivery (Shipping costs will be calculated for final invoice)","id":"delivertocustomer_","cost":0}
Order Totals
ot_subtotal. Text: $XX,XXX.XX, Value: XXXXX.XXXX
ot_tax. Text: $X,XXX.XX, Value: XXXX.XXXX
ot_shipping. Text: $0.00, Value: 0.0000
ot_total. Text: $XX,XXX.XX, Value: XXXXX.XXXX
Checking whether the product's attribute is a download, option_id = 14, value_id = 196: (1)
…..… LONG LIST……..
Checking order for virtual status. Order contains 453 unique products, 0 of those are virtual
============================================================
= Creating display of Order Product #2311
============================================================
Product Details:
{"qty":2,"id":"653","name”:”Product Name”,”model”:”XXX-XX,”tax":"15.0000","price”:”XX.XXXX”,”final_price”:”XX.XXXX”,”onetime_charges":"0.0000","products_priced_by_attribute":"1","product_is_free":"0","products_discount_type":"0","products_discount_type_from":"0","attributes":[{"option":"Color","value":"Amber","option_id":"1","value_id":"16","prefix":"+","price":"0.0000"}]}
Options ID #1
Product Attribute:
["2682"]
Options Info:
{"options":{"2219":"Assorted","2218":"Amber","2214":"Black","2216":"Blue","2215":"Green","2217":"Pink"},"name":"Color","type":"6","length":"32","size":"32","rows":"0"}
…..… LONG LIST……..
2019-05-31 08:58:54, Edit Orders entered (4.3.4) action (update_order)
Enabled Order Totals: ot_subtotal.php;ot_misc_cost.php;ot_group_pricing.php;ot_tax.php;ot_shipping.php;ot_total.php
In a successful edit case, it would have the regular product and details populated after that. Help?!
ZC 1.5.5f
EO 4.3.4
Group Pricing (per Item) 155
Stock by Attributes" (version 1.5.3)
Admin New Order 1.4
Add Customers From Admin 2.0.9
Not sure if I am the right person to reply, or if my reply is correct, but I had the same problem editing existing items. To edit items you need to go to -configuration / Edit Orders and then change both *Product Price Calculation — Method and Default to MANUAL!
Hope this helps and otherwise hopefully someone else can help :)
@jvdd, there was most likely an associated /logs/myDEBUG-adm-*.log file on/around the time of that EO log. My guess is that the processing is running out of memory, but a log will 'say' for sure.
Remember, if you're posting an admin log that it will contain your store's secret admin directory name, so be sure to xxx-out any path information before posting.
I've just submitted v4.4.0 of Edit Orders to the Zen Cart Plugins for review; I'll post back when it's available for download.
This major release contains changes and corrections for the following GitHub issues:
#61: Order total doesn't add up when coupon applied.
#79: Incorrect total for products with attributes, when initially added; requires 'update' to correct.
#88: Remove double-definition of language constant.
#89: Add notifiers to enable external tax-handling.
#90: Correct various PHP warnings and notices.
#91: An extra ':' is added to the end of the shipping title.
#93: Correct tax-handling for 'ot_misc_cost' and 'ot_onetime_discount' order totals.
#94: Modify array formatting for EO logs.
#95: Correct rounding issues.
#97: Correct 'ot_misc_cost' rounding issues.
#98: No longer distribute core file changes; they're built into Zen Cart 1.5.6b and later.
#99: Can't update an order with automatic pricing, using specials' pricing.
#101: Use zc156 button styling when installed on a zc156 base.
#102: Enable integration with "Attribute Image Swapper".
#103: Modify shipping tax-related processing.
#104: Always use the 'mock' cart.
#105: Add a status-history note to the order each time the order is updated or a product is added.
#106: Coupon-related corrections.
#108: Additional notification, allowing customization of display-only order totals.
#109: Additional configuration settings (see the readme for more information).
#110: Additional notification, allowing the inclusion of additional javascript/jQuery scripts.
#112: Additional notification, enabling additional columns to the order's status-history table.
#113: Don't reset shipping calculations when totals are reset.
#114: Sanitize input values and maximum field lengths.
#116: Even more notifications added, to enable additional customizations without changing the base file.
#117: Include an 'Updated By' column in the status-history table, if that field is present in the database.
#119: Correct missing constant for 'ot_onetime_discount'
#120: Supply missing 'ot_coupon' constant for zc156b beta installations.
Compatible with zc155 and zc156 installations.
Now available for download: https://www.zen-cart.com/downloads.php?do=file&id=1513
@Dustie
I don't even see what you are referring to in the configuration settings?!!
Only see the following:
Edit Orders Version (4.3.4)
Reset Totals on Update — Default (on)
Use a mock shopping cart? (false)
Strip tags from the shipping module name? (true)
Debug Action Level (1)
Should I also see 'Product Price Calculation'?
Sorry, I apologize for not mentioning a couple of logs before the EO issue mentioned. They have been resolved and therefore archived and reset. I don't believe they are related.
andCode:[30-May-2019 12:10:46 America/Toronto] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 72 bytes) in /.../.../.../.../developers_tool_kit.php on line 164
Code:[30-May-2019 16:51:16 America/Toronto] Request URI: /index.php?main_page=checkout_confirmation, IP address: XX.XX.XX.XXX
#1 currencies->display_price() called at [/.../.../.../includes/templates/.../templates/tpl_checkout_confirmation_default.php:201]
#2 require(/.../.../.../includes/templates/.../templates/tpl_checkout_confirmation_default.php) called at [/.../.../.../includes/templates/.../common/tpl_main_page.php:183]
#3 require(/.../.../.../includes/templates/.../common/tpl_main_page.php) called at /.../.../.../index.php:97]
[30-May-2019 16:51:16 America/Toronto] PHP Warning: Missing argument 2 for currencies::display_price(), called in /.../.../.../includes/templates/.../templates/tpl_checkout_confirmation_default.php on line 201 and defined in /.../.../.../includes/classes/currencies.php on line 123
@jvdd, neither of those logs is EO related. The first is from the "Developers' Tool Kit" and the other is from the storefront checkout_confirmation page.