v5.0.3 of Edit Orders is now available for download: https://www.zen-cart.com/downloads.php?do=file&id=2400
This release provides updates for the 15 issues referenced by this GitHub link: https://github.com/lat9/edit_orders/...stone%3Av5.0.3
v5.0.3 of Edit Orders is now available for download: https://www.zen-cart.com/downloads.php?do=file&id=2400
This release provides updates for the 15 issues referenced by this GitHub link: https://github.com/lat9/edit_orders/...stone%3Av5.0.3
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.
That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.
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.
Would it be possible for edit orders to recompute the shipping after an order change? Or is this just too complicated?
That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.
Fair enough. These things can be simulated using the Shipping Estimator anyway. Thanks for the quick response.
That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.
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:
new code:PHP Code:if (isset($GLOBALS[$class]->eoInfo)) {
$GLOBALS[$class]->eoInfo['installed'] = false;
if ($GLOBALS[$class]->enabled === true) {
$unused_totals[] = [
'id' => $class,
'text' => $GLOBALS[$class]->title,
];
}
}
}
PHP 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,
];
}
}
marcopolo
Zen Cart 2.2.2 | PHP 8.5.8 | MariaDB 10.11.14
Thanks for the report, I've created a GitHub issue to track the change: https://github.com/lat9/edit_orders/issues/350
After reviewing the code for the ot_coupon.php, it's just not compatible with EO's admin environment. It makes many redirects if/when anomalies are found with the coupon-code to the storefront checkout_payment page.
I'll be updating EO to make that more clear, but any order-related discounts can be handled using EO's Onetime Discount order total.