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.

Migrate logic for Spree::Product

Matthew Kennedyde0ef447a9e6
diff --git a/core/app/models/spree/product.rb b/core/app/models/spree/product.rb
index f055f6f286..5c1069e9b9 100644
--- a/core/app/models/spree/product.rb
+++ b/core/app/models/spree/product.rb
@@ -55,6 +55,7 @@ module Spree
has_many :possible_promotions, -> { advertised.active }, through: :promotion_rules,
class_name: 'Spree::Promotion',
source: :promotion
+ has_many :digitals, through: :variants_including_master
belongs_to :tax_category, class_name: 'Spree::TaxCategory'
belongs_to :shipping_category, class_name: 'Spree::ShippingCategory', inverse_of: :products