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
This commit is contained in:
Rob Harrington
2017-09-23 12:50:32 +10:00
parent 7beb6e624c
commit 131d9384c2
2 changed files with 2 additions and 2 deletions

View File

@@ -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))

View File

@@ -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