Sha256: 58c7d01b96ed4a7eb4bc3bc8965ac59db821ac9ef3ad0c453543bd37c489cd0a

Contents?: true

Size: 496 Bytes

Versions: 15

Compression:

Stored size: 496 Bytes

Contents

require_dependency 'spree/shipping_calculator'

module Spree
  module Calculator::Shipping
    class FlatRate < ShippingCalculator
      preference :amount, :decimal, :default => 0
      preference :currency, :string, :default => Spree::Config[:currency]

      attr_accessible :preferred_amount, :preferred_currency

      def self.description
        Spree.t(:shipping_flat_rate_per_order)
      end

      def compute_package(package)
        self.preferred_amount
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
spree_core-2.0.13 app/models/spree/calculator/shipping/flat_rate.rb
spree_core-2.0.12 app/models/spree/calculator/shipping/flat_rate.rb
spree_core-2.0.11 app/models/spree/calculator/shipping/flat_rate.rb
spree_core-2.0.10 app/models/spree/calculator/shipping/flat_rate.rb
spree_core-2.0.9 app/models/spree/calculator/shipping/flat_rate.rb
spree_core-2.0.8 app/models/spree/calculator/shipping/flat_rate.rb
spree_core-2.0.7 app/models/spree/calculator/shipping/flat_rate.rb
spree_core-2.0.6 app/models/spree/calculator/shipping/flat_rate.rb
spree_core-2.0.5 app/models/spree/calculator/shipping/flat_rate.rb
spree_core-2.0.4 app/models/spree/calculator/shipping/flat_rate.rb
spree_core-2.0.3 app/models/spree/calculator/shipping/flat_rate.rb
spree_core-2.0.2 app/models/spree/calculator/shipping/flat_rate.rb
spree_core-2.0.1 app/models/spree/calculator/shipping/flat_rate.rb
spree_core-2.0.0 app/models/spree/calculator/shipping/flat_rate.rb
spree_core-2.0.0.rc1 app/models/spree/calculator/shipping/flat_rate.rb