Comparing the database tables did not reveal anything unusual except the orders_total table for ot_total class was different, as expected. Also, the order of the classes in the orders_total table differed, with ot_shipping being the last entry for the order created using Admin New Order/ Edit Orders, but I don't think this is an issue.
I have struggled through the Edit Order code and debug log for the order. After the product is added and before shipping is added, at the step where getOrderInfo is called by edit_orders.php on line 655, everything looks correct including ot_total at this point. At the point where eo_update_database_order_totals, taxes/totals on entry called by edit_orders.php on line 656, everything looks correct. Then Checking taxes for ot_quantity_discount is encountered, followed by eo_update_database_order_totals, after_adjustments. After checking the order for virtual status, eo_update_database_order_totals, after process shows the first occurrence where order_total is incorrect. It's too low by the tax on the quantity discount. Specifically $order->info['total'] is wrong at this point.
Problem is, I get lost trying to follow the code in store-side ot_total class, which I think is called just before $order->info['total'] is printed at the point above. Any help would be appreciated. Could this problem be associated with the fixes for GitHub issue #56?


Reply With Quote
