If you have a look at an order's logs after adding a product, you will see erroneous changes like:
- order_total changed from 20 to 5.
- product_count changed from 3 to 1.

uc_order_edit_form_submit() assumes that $form_state['order'] contains updated values compared to loaded $order but for some properties, it's the opposite!

Both uc_order_edit_form_validate() and uc_order_edit_form_submit() need rewrites so that only the changes reported by panes are applied.

Comments

anrikun created an issue. See original summary.

anrikun’s picture

anrikun’s picture

Status: Needs review » Needs work

Actually proposed patch above may break custom modules that update $form_state['order'] directly.

anrikun’s picture