Zen Cart Logo
Forums / Addon Admin Tools / Edit Orders v4.0 Support Thread

Edit Orders v4.0 Support Thread

Views: 346,060

Results 1,321 to 1,340 of 1,927
5 Jul 2018, 3:11 AM
#1321
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,067
Plugin Contributions:
56

Edit Orders v4.0 Support Thread

@webchills, did you also try ticking the "Reset totals prior to update" box?

5 Jul 2018, 6:01 AM
#1322
webchills avatar

webchills

Zen Follower

Join Date:
Sep 2005
Location:
Austria
Posts:
99
Plugin Contributions:
1

Re: Edit Orders v4.0 Support Thread

lat9:

@webchills, did you also try ticking the "Reset totals prior to update" box?
Yes, same wrong result

5 Jul 2018, 1:28 PM
#1323
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,067
Plugin Contributions:
56

Re: Edit Orders v4.0 Support Thread

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)?

5 Jul 2018, 1:33 PM
#1324
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,067
Plugin Contributions:
56

Re: Edit Orders v4.0 Support Thread

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.

5 Jul 2018, 2:34 PM
#1325
webchills avatar

webchills

Zen Follower

Join Date:
Sep 2005
Location:
Austria
Posts:
99
Plugin Contributions:
1

Re: Edit Orders v4.0 Support Thread

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.

5 Jul 2018, 7:09 PM
#1326
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,067
Plugin Contributions:
56

Re: Edit Orders v4.0 Support Thread

@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.

14 Aug 2018, 3:55 PM
#1327
ted_grapler avatar

ted_grapler

New Zenner

Join Date:
Nov 2015
Location:
New Jersey USA
Posts:
76
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

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:

[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
14 Aug 2018, 6:56 PM
#1328
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,067
Plugin Contributions:
56

Re: Edit Orders v4.0 Support Thread

@Ted Grapler, edit the file /admin/includes/functions/extra_functions/edit_orders_functions.php. On/about line 1371, find the following code fragment

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']
    );

and make the highlighted change

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' => [B](int)[/B]$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.

14 Aug 2018, 8:11 PM
#1329
ted_grapler avatar

ted_grapler

New Zenner

Join Date:
Nov 2015
Location:
New Jersey USA
Posts:
76
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

Thank you lat9. That fixed the issue.

24 Sep 2018, 1:02 PM
#1330
diptimoy avatar

diptimoy

Zen Follower

Join Date:
Apr 2012
Location:
Bardhaman , Bharat
Posts:
217
Plugin Contributions:
1

Re: Edit Orders v4.0 Support Thread

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!

24 Sep 2018, 2:15 PM
#1331
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,067
Plugin Contributions:
56

Re: Edit Orders v4.0 Support Thread

Version 1.3.9 of what? If you're running Zen Cart v1.3.9{something}, this version of edit orders is not supported.

31 Oct 2018, 1:36 PM
#1332
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,067
Plugin Contributions:
56

Re: Edit Orders v4.0 Support Thread

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.

4 Nov 2018, 11:42 AM
#1333
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,067
Plugin Contributions:
56

Re: Edit Orders v4.0 Support Thread

lat9:

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

8 Nov 2018, 4:03 PM
#1334
drm1963 avatar

drm1963

New Zenner

Join Date:
Feb 2018
Location:
Tennessee
Posts:
48
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

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?

8 Nov 2018, 4:26 PM
#1335
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,067
Plugin Contributions:
56

Re: Edit Orders v4.0 Support Thread

drm1963:

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?
Yes, that is where the current version for Edit Orders is displayed.

8 Dec 2018, 5:31 AM
#1336
lidlchris avatar

lidlchris

Zen Follower

Join Date:
Feb 2013
Posts:
345
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

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

8 Dec 2018, 12:26 PM
#1337
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,067
Plugin Contributions:
56

Re: Edit Orders v4.0 Support Thread

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.

8 Dec 2018, 11:55 PM
#1338
lidlchris avatar

lidlchris

Zen Follower

Join Date:
Feb 2013
Posts:
345
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

lat9:

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

9 Dec 2018, 12:26 PM
#1339
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,067
Plugin Contributions:
56

Re: Edit Orders v4.0 Support Thread

lidlchris:

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.

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');

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.

14 Dec 2018, 1:37 AM
#1340
lidlchris avatar

lidlchris

Zen Follower

Join Date:
Feb 2013
Posts:
345
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

lat9:

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.

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');

> 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.

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
function zen_round($value, $precision) {
    $value =  round($value *pow(10,$precision),0);
    $value = $value/pow(10,$precision);
    return $value;
  }