Quote Originally Posted by lat9 View Post
@carlwhat, I believe that I can provide a work-around for the issue you've identified (order_totals not re-indexed after removal). I could use a foreach loop instead of a for-loop to prevent those 'missing indices' notices.
@lat9, thanks for the help in pinpointing where the problem might be as well as thinking about solutions. i want to be clear about what is happening, prior to you making a determination as to what you may want to do.

i think i was incorrect in my expression of what the tax module did in my last post. it is not a rearrangement as i suggested; it removes its element (in all observed cases, that was element [2]), and then adds a new one to the end of the array. i have now modified that code to use the removed index if removed, or just add it to the end of the array if not removed (loving the new coalesce operator in php7+). that seems to have addressed the problem with no ill consequences that i have seen.

in addition, i am still unclear if one can safely remove the reset_totals checkbox from user choice with no ill consequences. i initially did that approach (using the observer which again addressed the issue), and again with no ill consequences. i understand a bit of a processing penalty; but i can easily live with that.

i also think there are shops out there that may experience this problem, that if it can be solved within EO, it would be of value. not every shop will have the IT techno expertise to figure this out, and as php progresses i think some of these notices could turn into warnings, then errors, etc.

i can test your solution later today if you would like. i would hesitate for you to commit to anything un-tested; and unless you are so inclined to set up your env to mimic this behavior, i could easily do it later today.

best.