Class: Spree::ShippingRate
- Extended by:
- DisplayMoney
- Defined in:
- app/models/spree/shipping_rate.rb
Overview
Records the costs of different shipping methods for a shipment and which method has been selected to deliver the shipment.
Instance Method Summary collapse
- #display_price ⇒ Object (also: #display_cost)
Methods included from DisplayMoney
Methods inherited from Base
Methods included from Core::Permalinks
#generate_permalink, #save_permalink
Instance Method Details
#display_price ⇒ Object Also known as: display_cost
26 27 28 29 30 31 32 33 34 35 36 |
# File 'app/models/spree/shipping_rate.rb', line 26 def display_price price = display_amount.to_s return price if taxes.to_a.empty? || amount == 0 tax_explanations = taxes.map(&:label).join(tax_label_separator) I18n.t 'spree.shipping_rate.display_price.display_price_with_explanations', price:, explanations: tax_explanations end |