From 131d9384c21d08090392e06f33afbc7cc0f8c406 Mon Sep 17 00:00:00 2001 From: Rob Harrington Date: Sat, 23 Sep 2017 12:50:32 +1000 Subject: [PATCH] Use flash.notice instead of flash.success to display order confirmation message This way it overwrites any message that is set from spree, rather than displaying duplicate messages --- app/controllers/checkout_controller.rb | 2 +- app/controllers/spree/paypal_controller_decorator.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/checkout_controller.rb b/app/controllers/checkout_controller.rb index 13d9e71d51..be35682a7b 100644 --- a/app/controllers/checkout_controller.rb +++ b/app/controllers/checkout_controller.rb @@ -43,7 +43,7 @@ class CheckoutController < Spree::CheckoutController ResetOrderService.new(self, current_order).call session[:access_token] = current_order.token - flash[:success] = t(:order_processed_successfully) + flash[:notice] = t(:order_processed_successfully) respond_to do |format| format.html do respond_with(@order, :location => order_path(@order)) diff --git a/app/controllers/spree/paypal_controller_decorator.rb b/app/controllers/spree/paypal_controller_decorator.rb index 9ad11927ab..40c0aa46a9 100644 --- a/app/controllers/spree/paypal_controller_decorator.rb +++ b/app/controllers/spree/paypal_controller_decorator.rb @@ -19,7 +19,7 @@ Spree::PaypalController.class_eval do def reset_order_when_complete if current_order.complete? - flash[:success] = t(:order_processed_successfully) + flash[:notice] = t(:order_processed_successfully) ResetOrderService.new(self, current_order).call session[:access_token] = current_order.token