For some reason we need the orders populate route to make product import routes work

This commit is contained in:
luisramos0
2019-04-10 22:43:18 +01:00
parent 35c8236c21
commit 5ba0f906a1

View File

@@ -89,6 +89,14 @@ Spree::Core::Engine.routes.prepend do
resources :products
# For some reason we need the orders populate route to make product import routes work
# See #3670 for more details
populate_redirect = redirect do |params, request|
request.flash[:error] = Spree.t(:populate_get_error)
request.referer || '/cart'
end
get '/orders/populate', :via => :get, :to => populate_redirect
get '/locale/set', :to => 'locale#set'
resources :states, :only => :index