
Originally Posted by
lat9
That "Reset Totals" checkbox is a way to kick EO in the arse and have it "do-over" the totals. Sometimes the order_total/order_tax element(s) in the base orders table get out-of-sync with the values recorded in the orders_total table.
so there is no harm with having it always checked, and ignoring it when not checked? ie the only penalty is a little processing time and perhaps some DB hits?
i have tracked down this bug to ot_tax. ot_tax is hard coded into EO. if you have a store that does NOT make use of the ot_tax orders total module, and you do not have the checkbox checked, you will get PHP notices as such:
Code:
[08:10:05 US/Great_State_of_Los_Angeles] PHP Notice: Undefined offset: 2 in /admin/includes/functions/extra_functions/edit_orders_functions.php on line 1499
[08:10:05 US/Great_State_of_Los_Angeles] PHP Notice: Trying to access array offset on value of type null in /admin/includes/functions/extra_functions/edit_orders_functions.php on line 1499
[08:10:05 US/Great_State_of_Los_Angeles] PHP Notice: Undefined offset: 2 in /admin/includes/functions/extra_functions/edit_orders_functions.php on line 1500
[08:10:05 US/Great_State_of_Los_Angeles] PHP Notice: Trying to access array offset on value of type null in /admin/includes/functions/extra_functions/edit_orders_functions.php on line 1500
[08:10:05 US/Great_State_of_Los_Angeles] PHP Notice: Undefined offset: 2 in /admin/includes/functions/extra_functions/edit_orders_functions.php on line 1505
[08:10:05 US/Great_State_of_Los_Angeles] PHP Notice: Trying to access array offset on value of type null in /admin/includes/functions/extra_functions/edit_orders_functions.php on line 1505
[08:10:05 US/Great_State_of_Los_Angeles] PHP Notice: Undefined offset: 2 in /admin/includes/functions/extra_functions/edit_orders_functions.php on line 1509
[08:10:05 US/Great_State_of_Los_Angeles] PHP Notice: Trying to access array offset on value of type null in /admin/includes/functions/extra_functions/edit_orders_functions.php on line 1509
i believe i am using the latest version with an alpha or beta designation (call me a radical), and 1499 corresponds to here:
https://github.com/lat9/edit_orders/...ions.php#L1499
personally, i am not a fan of hard coding anything (despite doing it all the time); but if i can override that checkbox to have it always checked using your provided observer with no ill effect, that's fine with me.
thanks in advance!
Bookmarks