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
Spree::ProductHelper#product_variants_matrix - pass an instance of current_store
Nathaniel Nande5e09bc2dde47
diff --git a/core/app/helpers/spree/products_helper.rb b/core/app/helpers/spree/products_helper.rbindex a831db2c84..208c7a4711 100644--- a/core/app/helpers/spree/products_helper.rb+++ b/core/app/helpers/spree/products_helper.rb@@ -110,7 +110,8 @@ module Spreevariants: @variants,is_product_available_in_currency: is_product_available_in_currency,current_currency: current_currency,- current_price_options: current_price_options+ current_price_options: current_price_options,+ current_store: current_store).call.to_jsonenddiff --git a/core/app/presenters/spree/variant_presenter.rb b/core/app/presenters/spree/variant_presenter.rbindex 70375e0960..8ee21cc0ad 100644--- a/core/app/presenters/spree/variant_presenter.rb+++ b/core/app/presenters/spree/variant_presenter.rb@@ -3,13 +3,14 @@ module Spreeinclude Rails.application.routes.url_helpersinclude Spree::BaseHelper- attr_reader :current_currency, :current_price_options+ attr_reader :current_currency, :current_price_options, :current_storedef initialize(opts = {})@variants = opts[:variants]@is_product_available_in_currency = opts[:is_product_available_in_currency]@current_currency = opts[:current_currency]@current_price_options = opts[:current_price_options]+ @current_store = opts[:current_store]enddef call