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.

Prodduct: delegate `dimensions_unit` and `weight_unit` to master variant

Damian Legawiec6479d99cba10
diff --git a/core/app/models/spree/product.rb b/core/app/models/spree/product.rb
index b8624294f4..c70445f57d 100644
--- a/core/app/models/spree/product.rb
+++ b/core/app/models/spree/product.rb
@@ -165,7 +165,8 @@ module Spree
[
:sku, :barcode, :price, :currency, :weight, :height, :width, :depth, :is_master,
- :cost_currency, :price_in, :amount_in, :cost_price, :compare_at_price, :compare_at_amount_in
+ :cost_currency, :price_in, :amount_in, :cost_price, :compare_at_price, :compare_at_amount_in,
+ :dimensions_unit, :weight_unit
].each do |method_name|
delegate method_name, :"#{method_name}=", to: :find_or_build_master
end