Sha256: eb04b53efae6c79f240893a8f3352dcff16ee5e03cd5efaeef0f103d222625af
Contents?: true
Size: 725 Bytes
Versions: 3
Compression:
Stored size: 725 Bytes
Contents
Spree::ShippingRate.class_eval do def tax_rate Spree::TaxRate.find(tax_rate_id) if tax_rate_id end # Solidusv1.0-v1.2 uses display_amount while newer versions use display_base_price def display_price price = if respond_to?(:display_amount) display_amount else display_base_price end.to_s return price if Spree::Avatax::Config.tax_calculation return price if taxes.empty? || amount == 0 tax_explanations = taxes.map(&:label).join(tax_label_separator) Spree.t :display_price_with_explanations, scope: 'shipping_rate.display_price', price: price, explanations: tax_explanations end alias_method :display_cost, :display_price end
Version data entries
3 entries across 3 versions & 1 rubygems