From 459959c0689fd08f4e5589990d0719130c41b25b Mon Sep 17 00:00:00 2001 From: Luis Ramos Date: Thu, 3 Sep 2020 22:58:45 +0100 Subject: [PATCH] Remove code related to spree promotions --- app/models/spree/product.rb | 6 ------ 1 file changed, 6 deletions(-) diff --git a/app/models/spree/product.rb b/app/models/spree/product.rb index 5ea1ad0c59..624cbbbe97 100755 --- a/app/models/spree/product.rb +++ b/app/models/spree/product.rb @@ -40,7 +40,6 @@ module Spree has_many :classifications, dependent: :delete_all has_many :taxons, through: :classifications - has_and_belongs_to_many :promotion_rules, join_table: :spree_products_promotion_rules belongs_to :tax_category, class_name: 'Spree::TaxCategory' belongs_to :shipping_category, class_name: 'Spree::ShippingCategory' @@ -314,11 +313,6 @@ module Spree end end - def possible_promotions - promotion_ids = promotion_rules.map(&:activator_id).uniq - Spree::Promotion.advertised.where(id: promotion_ids).reject(&:expired?) - end - def total_on_hand stock_items.sum(&:count_on_hand) end