mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-18 04:39:14 +00:00
Update order state when moving back through checkout step
Some important logic happens after the order transition from one state to another. In particular, voucher are recalculated. To fix any inconsistency, we make sure the order is the state matching the checkout step we are on.
This commit is contained in:
@@ -24,6 +24,8 @@ class SplitCheckoutController < ::BaseController
|
||||
|
||||
def edit
|
||||
redirect_to_step_based_on_order unless params[:step]
|
||||
|
||||
update_order_state if params[:step]
|
||||
check_step if params[:step]
|
||||
|
||||
return if available_shipping_methods.any?
|
||||
|
||||
Reference in New Issue
Block a user