Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

Fix missing path on products config.

Matthew Kennedy8b0f614d8c2a
diff --git a/frontend/config/routes.rb b/frontend/config/routes.rb
index b6dffcdfb8..abdd79dfd6 100644
--- a/frontend/config/routes.rb
+++ b/frontend/config/routes.rb
@@ -2,7 +2,8 @@ Spree::Core::Engine.add_routes do
scope '(:locale)', locale: /#{Spree.available_locales.join('|')}/, defaults: { locale: nil } do
root to: 'home#index'
- resources :products, only: [:index, :show]
+ resources :products, only: [:index, :show], path: "/#{Spree::Config[:storefront_product_path]}"
+
get "/#{Spree::Config[:storefront_product_path]}/:id/related", to: 'products#related'
# route globbing for pretty nested taxon and product paths
get "/#{Spree::Config[:storefront_taxon_path]}/*id", to: 'taxons#show', as: :nested_taxons