Okay so I figured out that there were a batch of old files form an old version of Edit orders still in the 'includes/languages/english/modules/order_total/' folder. I deleted those and this issue went away but now I have a new issue that seems to be a bug in the ver 5 edit orders but I am not 100% sure.
When I try to add a 'Onetime Discount' I get the following debug log:
************************************
[03-Feb-2025 12:35:08 America/Boise] PHP Fatal error: Uncaught Error: Undefined constant "MODULE_ORDER_TOTAL_ONETIME_DISCOUNT_DEDUCTION_ONLY" in //public_html/zc_plugins/EditOrders/v5.0.0/catalog/includes/modules/order_total/ot_onetime_discount.php:143
Stack trace:
#0 //public_html/includes/classes/order_total.php(209): ot_onetime_discount->collect_posts()
#1 //public_html/zc_plugins/EditOrders/v5.0.0/catalog/includes/classes/ajax/zcAjaxEditOrdersAdmin.php(764): order_total->collect_posts()
#2 //public_html/zc_plugins/EditOrders/v5.0.0/catalog/includes/classes/ajax/zcAjaxEditOrdersAdmin.php(632): zcAjaxEditOrdersAdmin->processOrderUpdate()
#3 //public_html/ajax.php(77): zcAjaxEditOrdersAdmin->addOrUpdateOrderTotal()
#4 //public_html/Zcf294AkrVd6csa550FeF/ajax.php(17): require('/...')
#5 {main}
thrown in //public_html/zc_plugins/EditOrders/v5.0.0/catalog/includes/modules/order_total/ot_onetime_discount.php on line 143
[03-Feb-2025 12:35:08 America/Boise] Request URI: //ajax.php?act=ajaxEditOrdersAdmin&method=addOrUpdateOrderTotal, IP address: 107.204.159.118
--> PHP Fatal error: Uncaught Error: Undefined constant "MODULE_ORDER_TOTAL_ONETIME_DISCOUNT_DEDUCTION_ONLY" in //public_html/zc_plugins/EditOrders/v5.0.0/catalog/includes/modules/order_total/ot_onetime_discount.php:143
Stack trace:
#0 //public_html/includes/classes/order_total.php(209): ot_onetime_discount->collect_posts()
#1 //public_html/zc_plugins/EditOrders/v5.0.0/catalog/includes/classes/ajax/zcAjaxEditOrdersAdmin.php(764): order_total->collect_posts()
#2 //public_html/zc_plugins/EditOrders/v5.0.0/catalog/includes/classes/ajax/zcAjaxEditOrdersAdmin.php(632): zcAjaxEditOrdersAdmin->processOrderUpdate()
#3 //public_html/ajax.php(77): zcAjaxEditOrdersAdmin->addOrUpdateOrderTotal()
#4 //public_html/Zcf294AkrVd6csa550FeF/ajax.php(17): require('/...')
#5 {main}
thrown in //public_html/zc_plugins/EditOrders/v5.0.0/catalog/includes/modules/order_total/ot_onetime_discount.php on line 143.
[03-Feb-2025 12:35:08 America/Boise] Request URI: //ajax.php?act=ajaxEditOrdersAdmin&method=addOrUpdateOrderTotal, IP address: 107.204.159.118
--> PHP Fatal error: Uncaught Error: Undefined constant "MODULE_ORDER_TOTAL_ONETIME_DISCOUNT_DEDUCTION_ONLY" in //public_html/zc_plugins/EditOrders/v5.0.0/catalog/includes/modules/order_total/ot_onetime_discount.php:143
Stack trace:
#0 //public_html/includes/classes/order_total.php(209): ot_onetime_discount->collect_posts()
#1 //public_html/zc_plugins/EditOrders/v5.0.0/catalog/includes/classes/ajax/zcAjaxEditOrdersAdmin.php(764): order_total->collect_posts()
#2 //public_html/zc_plugins/EditOrders/v5.0.0/catalog/includes/classes/ajax/zcAjaxEditOrdersAdmin.php(632): zcAjaxEditOrdersAdmin->processOrderUpdate()
#3 //public_html/ajax.php(77): zcAjaxEditOrdersAdmin->addOrUpdateOrderTotal()
#4 //public_html/Zcf294AkrVd6csa550FeF/ajax.php(17): require('/...')
#5 {main}
thrown in //public_html/zc_plugins/EditOrders/v5.0.0/catalog/includes/modules/order_total/ot_onetime_discount.php on line 143.
**************************************************
When I look in the file that defines the constants for EO 5, lang.ot_onetime_discount.php, I do not see that constant listed. Only the two following constants are listed:
Code:
$define = [
'MODULE_ORDER_TOTAL_ONETIME_DISCOUNT_TITLE' => 'Onetime Discount',
'MODULE_ORDER_TOTAL_ONETIME_DISCOUNT_DESCRIPTION' => 'Onetime Discount applied to the order',
I added the following to the file:
Code:
'MODULE_ORDER_TOTAL_ONETIME_DISCOUNT_DEDUCTION_ONLY' => 'Onetime Deduction Only',
this stopped the debug file from being created.
I also found that you must specify a negative amount for the discount or EO will not deduct the amount from the total but add it to the total.