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
Optimize performance of loading translations
Rafal Cymerysa30c96e61002
diff --git a/api/app/controllers/concerns/spree/api/v2/product_list_includes.rb b/api/app/controllers/concerns/spree/api/v2/product_list_includes.rbindex f6c7aa2faa..885f9148a3 100644--- a/api/app/controllers/concerns/spree/api/v2/product_list_includes.rb+++ b/api/app/controllers/concerns/spree/api/v2/product_list_includes.rb@@ -8,7 +8,8 @@ module Spreeoption_types: [],variant_images: [],master: product_variant_includes,- variants: product_variant_includes+ variants: product_variant_includes,+ translations: []}enddiff --git a/api/app/controllers/spree/api/v2/storefront/taxons_controller.rb b/api/app/controllers/spree/api/v2/storefront/taxons_controller.rbindex 0e78a0b9ff..81e4d369a2 100644--- a/api/app/controllers/spree/api/v2/storefront/taxons_controller.rb+++ b/api/app/controllers/spree/api/v2/storefront/taxons_controller.rb@@ -30,13 +30,14 @@ module Spreeenddef scope_includes- node_includes = %i[icon parent taxonomy]+ node_includes = %i[icon parent taxonomy translations]{parent: node_includes,children: node_includes,taxonomy: [root: node_includes],- icon: [attachment_attachment: :blob]+ icon: [attachment_attachment: :blob],+ translations: []}enddiff --git a/core/app/finders/spree/option_values/find_available.rb b/core/app/finders/spree/option_values/find_available.rbindex 034119bd22..94aca09f85 100644--- a/core/app/finders/spree/option_values/find_available.rb+++ b/core/app/finders/spree/option_values/find_available.rb@@ -9,7 +9,7 @@ module Spreeenddef execute- find_available(scope, products_scope).select(select_args).order(order_args)+ find_available(scope, products_scope).includes(:translations).select(select_args).order(order_args)endprivatediff --git a/core/app/finders/spree/product_properties/find_available.rb b/core/app/finders/spree/product_properties/find_available.rbindex 79e497dcb4..420905d207 100644--- a/core/app/finders/spree/product_properties/find_available.rb+++ b/core/app/finders/spree/product_properties/find_available.rb@@ -9,7 +9,7 @@ module Spreeenddef execute- find_available(scope, products_scope)+ find_available(scope, products_scope).includes(:translations)endprivate