From 5ba0f906a12937a7381f1eaa214c2368cbe4000f Mon Sep 17 00:00:00 2001 From: luisramos0 Date: Wed, 10 Apr 2019 22:43:18 +0100 Subject: [PATCH] For some reason we need the orders populate route to make product import routes work --- config/routes/spree.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/config/routes/spree.rb b/config/routes/spree.rb index 4fbf5ad05f..32c1322a1c 100644 --- a/config/routes/spree.rb +++ b/config/routes/spree.rb @@ -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