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.
Ruby b2b-commercee-commerceecommerceecommerce-apiecommerce-frameworkecommerce-platformheadlessheadless-commerceheadless-ecommercemarketplacemulti-tenantmulti-vendormulti-vendor-ecommerceopen-sourcespree-commerce
Only fetch Products from the Current Store in Storefront API Products endpoint
Damian Legawiec691af784d070
diff --git a/api/app/controllers/spree/api/v2/storefront/products_controller.rb b/api/app/controllers/spree/api/v2/storefront/products_controller.rbindex 183bff2f75..51d1814ef3 100644--- a/api/app/controllers/spree/api/v2/storefront/products_controller.rb+++ b/api/app/controllers/spree/api/v2/storefront/products_controller.rb@@ -3,7 +3,7 @@ module Spreemodule V2module Storefrontclass ProductsController < ::Spree::Api::V2::ResourceController- private+ protecteddef sorted_collectioncollection_sorter.new(collection, current_currency, params, allowed_sort_attributes).call@@ -37,6 +37,10 @@ module SpreeSpree::Productend+ def scope+ current_store.products.accessible_by(current_ability, :show).includes(scope_includes)+ end+def scope_includes{master: :default_price,