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.
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
Last edited by Ted Grapler; 14 Aug 2018 at 05:01 PM.
@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
Bookmarks