mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Remove code related to spree promotions
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user