diff --git a/frontend/app/controllers/spree/checkout_controller.rb b/frontend/app/controllers/spree/checkout_controller.rb index 312efe835d8..98261af11e3 100644 --- a/frontend/app/controllers/spree/checkout_controller.rb +++ b/frontend/app/controllers/spree/checkout_controller.rb @@ -167,8 +167,8 @@ def completion_route end def apply_coupon_code - if params[:order] && params[:order][:coupon_code].present? - @order.coupon_code = params[:order][:coupon_code] + if update_params[:coupon_code].present? + @order.coupon_code = update_params[:coupon_code] handler = PromotionHandler::Coupon.new(@order).apply diff --git a/frontend/app/controllers/spree/orders_controller.rb b/frontend/app/controllers/spree/orders_controller.rb index 013f1195a3b..d88028d9242 100644 --- a/frontend/app/controllers/spree/orders_controller.rb +++ b/frontend/app/controllers/spree/orders_controller.rb @@ -122,8 +122,8 @@ def assign_order end def apply_coupon_code - if params[:order] && params[:order][:coupon_code].present? - @order.coupon_code = params[:order][:coupon_code] + if order_params[:coupon_code].present? + @order.coupon_code = order_params[:coupon_code] handler = PromotionHandler::Coupon.new(@order).apply