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
Add page_links associations to Product and Taxon models
Łukasz Adamczyka937000cc4f6
diff --git a/core/app/models/spree/product.rb b/core/app/models/spree/product.rbindex 2f3134f776..7cbf14d954 100644--- a/core/app/models/spree/product.rb+++ b/core/app/models/spree/product.rb@@ -141,6 +141,8 @@ module Spreehas_many :stores, through: :store_products, class_name: 'Spree::Store'has_many :digitals, through: :variants_including_master+ has_many :page_links, as: :linkable, class_name: 'Spree::PageLink', dependent: :destroy+after_create :add_associations_from_prototypeafter_create :build_variants_from_option_values_hash, if: :option_values_hashdiff --git a/core/app/models/spree/taxon.rb b/core/app/models/spree/taxon.rbindex e07877b6f4..f88f58803c 100644--- a/core/app/models/spree/taxon.rb+++ b/core/app/models/spree/taxon.rb@@ -47,6 +47,8 @@ module Spreehas_many :promotion_rule_taxons, class_name: 'Spree::PromotionRuleTaxon', dependent: :destroyhas_many :promotion_rules, through: :promotion_rule_taxons, class_name: 'Spree::PromotionRule'+ has_many :page_links, as: :linkable, class_name: 'Spree::PageLink', dependent: :destroy+## Attachments#