Remove code related to spree promotions

This commit is contained in:
Luis Ramos
2020-09-03 22:58:45 +01:00
parent ba16de6627
commit 459959c068

View File

@@ -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