Class: Spree::Calculator::FreeShipping Deprecated
- Inherits:
-
Spree::Calculator
- Object
- ActiveRecord::Base
- Base
- Spree::Calculator
- Spree::Calculator::FreeShipping
- Defined in:
- app/models/spree/calculator/free_shipping.rb
Overview
Deprecated.
This calculator will be removed in future versions of Spree. The only case where it was used was for Free Shipping Promotions. There is now a Promotion Action which deals with these types of promotions instead.
Instance Method Summary collapse
Methods inherited from Spree::Calculator
#available?, calculators, description, #description, #to_s
Methods inherited from Base
display_includes, page, preference, #preferences
Methods included from Spree::Core::Permalinks
#generate_permalink, #save_permalink
Instance Method Details
#compute(object) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 |
# File 'app/models/spree/calculator/free_shipping.rb', line 10 def compute(object) Spree::Deprecation.warn('This method is deprecated, because it is no longer used') if object.is_a?(Array) return if object.empty? order = object.first.order else order = object end order.ship_total end |