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

Edit Orders v4.0 Support Thread

Views: 346,084

Results 1,901 to 1,920 of 1,927
18 Oct 2025, 3:47 AM
#1901
djbooya avatar

djbooya

New Zenner

Join Date:
May 2017
Location:
endor
Posts:
1
Plugin Contributions:
0

Edit Orders v4.0 Support Thread

I am having an odd issue.

Version Installed: v5.0.2

My install is an upgraded Zen cart from 158a to 210:

Server OS: Linux 6.12.0-55.38.1.el10_0.x86_64
Server Date: 10/17/2025 20:35:14  
Server Up Time: 20:35:14 up 6 days, 9:43, 2 users, load average: 0.06, 0.02, 0.00
HTTP Server: Apache
PHP Version: 8.4.13 (Zend: 4.4.13)
PHP File Uploads: On
Upload Max Size: 64M
PHP Memory Limit: 128M
POST Max Size: 64M
Database Engine: MySQL 8.4.6
Database Host: 127.0.0.1 (127.0.0.1)
Database Date: 10/17/2025 20:35:14
Database Data Size: 839,011 kB
Database Index Size: 21,357 kB
MySQL Slow Query Log Status: Off
MySQL Slow Query Log File: /var/lib/mysql/dev-slow.log
MySQL Mode: ONLY_FULL_GROUP_BY, STRICT_TRANS_TABLES, NO_ZERO_IN_DATE, NO_ZERO_DATE, ERROR_FOR_DIVISION_BY_ZERO, NO_ENGINE_SUBSTITUTION
Database Patch Level: 2.1.0
v2.1.0   [2025-10-09 21:05:33]   (Version Update 2.0.0->2.1.0)
v2.0.0   [2025-10-09 21:05:13]   (Version Update 1.5.8->2.0.0)

When I click on "Edit" from the Orders page I get re-directed back to the Admin home page. URL looks like this:

https://store.com/shop/admin/index.php?cmd=edit_orders&page=1&action=edit&oID=17849

I saw the part of code that does a re-direct if oID is invalid.., but 17849 in my case is a valid order ID. I don't see any logs getting dumped out from ZenCart..

$oID = (int)($_GET['oID'] ?? '0');
if ($oID === 0) {
    zen_redirect(zen_href_link(FILENAME_ORDERS));
}

How best to debug what is happening?

18 Oct 2025, 11:56 AM
#1902
lat9 avatar

lat9

Administrator

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

Re: Edit Orders v4.0 Support Thread

@djbooya, can you view the order using the built-in order-details page? There are a couple of spots within Edit Orders where a malformed order will be redirected back to the standard orders' processing.

... and, are you in the admin as a SuperUser?

16 Dec 2025, 6:53 PM
#1903
chadlly2003 avatar

chadlly2003

Totally Zenned

Join Date:
Jan 2015
Posts:
745
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

i am playing around with this module. Zencart 2.1 php 8.2. I cant seem to edit the products or prices. Is the ready for 2.1? Did i miss a step.

16 Dec 2025, 8:36 PM
#1904
oldngrey avatar

oldngrey

Zen Follower

Join Date:
Apr 2008
Location:
Qld, Australia
Posts:
417
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

chadlly2003:

i am playing around with this module. Zencart 2.1 php 8.2. I cant seem to edit the products or prices. Is the ready for 2.1? Did i miss a step.
On the Editing Order #nnnn page there is a note on the right hand side below the addresses
Order-Update Information
Note: Product prices are automatically calculated and cannot be edited.

16 Dec 2025, 8:41 PM
#1905
lat9 avatar

lat9

Administrator

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

Re: Edit Orders v4.0 Support Thread

OldNGrey:

On the Editing Order #nnnn page there is a note on the right hand side below the addresses
Right, that price-editing is controlled by an Edit Orders' configuration setting. I'll suggest that @chadlly2003 review the EO docs and configuration settings.

17 Dec 2025, 2:21 AM
#1906
chadlly2003 avatar

chadlly2003

Totally Zenned

Join Date:
Jan 2015
Posts:
745
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

lat9:

Right, that price-editing is controlled by an Edit Orders' configuration setting. I'll suggest that @chadlly2003 review the EO docs and configuration settings.

For example I click add product on the edit order page and nothing happens. What setting has to be changed in order for that to work?

Attachment 21092

17 Dec 2025, 5:25 PM
#1907
lat9 avatar

lat9

Administrator

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

Re: Edit Orders v4.0 Support Thread

chadlly2003:

For example I click add product on the edit order page and nothing happens. What setting has to be changed in order for that to work?

Attachment 21092
Check your browser's console logs; my guess is that there's a jQuery/javascript error that's preventing the modal to be displayed.

19 Dec 2025, 12:01 AM
#1908
chadlly2003 avatar

chadlly2003

Totally Zenned

Join Date:
Jan 2015
Posts:
745
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

okay i just installed on a clean version of zencart and yes its it works. Should have done that in the first place. I did notice when i try to add a product via search I am encounter the java script error.

19 Dec 2025, 12:57 PM
#1909
lat9 avatar

lat9

Administrator

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

Re: Edit Orders v4.0 Support Thread

chadlly2003:

okay i just installed on a clean version of zencart and yes its it works. Should have done that in the first place. I did notice when i try to add a product via search I am encounter the java script error.
"The javascript error" covers a lot of ground. How about posting the **specific **error that's noted in the browser console?

19 Dec 2025, 5:24 PM
#1910
chadlly2003 avatar

chadlly2003

Totally Zenned

Join Date:
Jan 2015
Posts:
745
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

lat9:

"The javascript error" covers a lot of ground. How about posting the **specific **error that's noted in the browser console?

Yes sorry i did not post the error i did not dig too deep into this i was just playing around. I will post the javascript error when i get home. I will try and solve it as well. To be continued

20 Dec 2025, 2:17 AM
#1911
chadlly2003 avatar

chadlly2003

Totally Zenned

Join Date:
Jan 2015
Posts:
745
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

chadlly2003:

Yes sorry i did not post the error i did not dig too deep into this i was just playing around. I will post the javascript error when i get home. I will try and solve it as well. To be continued

okay reinstalled no issues to report. I was using php 8.4 that what was causing javascript issue.

This is a good little add on i never knew about. I will be using this plugin on future sites:)

20 Dec 2025, 1:27 PM
#1912
lat9 avatar

lat9

Administrator

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

Re: Edit Orders v4.0 Support Thread

chadlly2003:

okay reinstalled no issues to report. I was using php 8.4 that what was causing javascript issue.

This is a good little add on i never knew about. I will be using this plugin on future sites:)
I'll note that PHP 8.4 should have absolutely no bearing on a javascript issue. What was the issue?

22 Dec 2025, 2:25 AM
#1913
chadlly2003 avatar

chadlly2003

Totally Zenned

Join Date:
Jan 2015
Posts:
745
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

lat9:

I'll note that PHP 8.4 should have absolutely no bearing on a javascript issue. What was the issue?

My settings
zencart 2.1
php version 8.4

I grabbed the latest version 5.0.3
On this version I am not having any issues.

Though when adding a product under Choose by Product Name/Model Search
the button is not showing correctly
Attachment 21109

Also get the same results on the orders page regarding buttons. I am not sure what is causing this could be my template settings. I can dig a little deeper if you need me to. but very cool plugin

7 Jul 2026, 9:22 AM
#1915
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,690
Plugin Contributions:
56

Re: Edit Orders v4.0 Support Thread

Getting an issue with 5.0.3 when run with Zen Cart 2.1.0.

[07-Jul-2026 05:16:19 America/New_York] PHP Fatal error: Uncaught TypeError: EditOrdersAdminObserver::notify_order_query_add_product(): Argument #5 ($ordered_product) must be of type array, null given, called in /Users/scott/Sites/client/includes/classes/traits/NotifierManager.php on line 106 and defined in /Users/scott/Sites/client/zc_plugins/EditOrders/v5.0.3/admin/includes/classes/observers/EditOrdersAdminObserver.php:298
Stack trace:
#0 /Users/scott/Sites/client/includes/classes/traits/NotifierManager.php(106): EditOrdersAdminObserver->notify_order_query_add_product(Object(order), 'NOTIFY_ORDER_QU...', Array, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL)
#1 /Users/scott/Sites/client/includes/classes/order.php(364): base->notify('NOTIFY_ORDER_QU...', Array, 0)
#2 /Users/scott/Sites/client/includes/classes/order.php(152): order->query(53215)
#3 /Users/scott/Sites/client/zc_plugins/EditOrders/v5.0.3/admin/edit_orders.php(43): order->__construct(53215)
#4 /Users/scott/Sites/client/admin/index.php(28): require('/Users/scott/Si...')
#5 {main}
thrown in /Users/scott/Sites/client/zc_plugins/EditOrders/v5.0.3/admin/includes/classes/observers/EditOrdersAdminObserver.php on line 298

Making the final parameter of notify_order_query_add_product optional

?array &$ordered_product

seems to fix this but I was uncertain if that was the right way to go.

7 Jul 2026, 1:29 PM
#1916
lat9 avatar

lat9

Administrator

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

Re: Edit Orders v4.0 Support Thread

Right, that last parameter (which isn't used by the observer) was added in zc220. The correction I've pushed to EO's GitHub is to simply remove that $ordered_product parameter.

7 Jul 2026, 2:55 PM
#1917
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,690
Plugin Contributions:
56

Re: Edit Orders v4.0 Support Thread

Would it be possible for edit orders to recompute the shipping after an order change? Or is this just too complicated?

7 Jul 2026, 5:27 PM
#1918
lat9 avatar

lat9

Administrator

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

Re: Edit Orders v4.0 Support Thread

swguy:

Would it be possible for edit orders to recompute the shipping after an order change? Or is this just too complicated?
As you surmised, that's just too complicated. It's bad enough getting order-total modules involved in the recalculation; shipping modules just present another layer of complexity upon an already complex plugin.

7 Jul 2026, 6:54 PM
#1919
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,690
Plugin Contributions:
56

Re: Edit Orders v4.0 Support Thread

Fair enough. These things can be simulated using the Shipping Estimator anyway. Thanks for the quick response.

8 Jul 2026, 8:21 PM
#1920
marcopolo avatar

marcopolo

Totally Zenned

Join Date:
May 2008
Location:
United States
Posts:
516
Plugin Contributions:
2

Re: Edit Orders v4.0 Support Thread

On EO 5.0.3 the "Add" dropdown when editing an order only offers "Onetime Discount," not "Discount Coupon,".

getUnusedOrderTotalModules() only lists modules with the eoInfo property, which stock ot_coupon doesn't have, so it's filtered out. The add-modal case 'ot_coupon': and validation code in processOrderUpdate() are still intact, just never reached.

Intentional, or an oversight? Adding an ot_coupon branch to that loop brings it back.

\zc_plugins\EditOrders\v5.0.3\admin\includes\classes\EditOrders.php

old code:

            if (isset($GLOBALS[$class]->eoInfo)) {
                $GLOBALS[$class]->eoInfo['installed'] = false;
                if ($GLOBALS[$class]->enabled === true) {
                    $unused_totals[] = [
                        'id' => $class,
                        'text' => $GLOBALS[$class]->title,
                    ];
                }
            }
        }

new code:

if (isset($GLOBALS[$class]->eoInfo)) {
                $GLOBALS[$class]->eoInfo['installed'] = false;
                if ($GLOBALS[$class]->enabled === true) {
                    $unused_totals[] = [
                        'id' => $class,
                        'text' => $GLOBALS[$class]->title,
                    ];
                }
            // ot_coupon has no eoInfo shim and no ->enabled here, so use its STATUS constant
            } elseif ($class === 'ot_coupon' && isset($GLOBALS['ot_coupon'])
                      && defined('MODULE_ORDER_TOTAL_COUPON_STATUS')
                      && MODULE_ORDER_TOTAL_COUPON_STATUS === 'true') {
                $unused_totals[] = [
                    'id' => 'ot_coupon',
                    'text' => $GLOBALS['ot_coupon']->title,
                ];
            }
        }