Sha256: e655816dbd22a0d5f862ed3381e9c6c4dd9a15dbd77d26f3a4d1e2df0508d27e

Contents?: true

Size: 413 Bytes

Versions: 15

Compression:

Stored size: 413 Bytes

Contents

class Calculator::FlatRate < Calculator
  preference :amount, :decimal, :default => 0

  def self.description
    I18n.t("flat_rate_per_order")
  end

  def self.register
    super                                
    Coupon.register_calculator(self)
    ShippingMethod.register_calculator(self)
    ShippingRate.register_calculator(self)
  end  
  
  def compute(object=nil)
    self.preferred_amount
  end  
end

Version data entries

15 entries across 15 versions & 2 rubygems

Version Path
spree-0.11.4 app/models/calculator/flat_rate.rb
spree-0.11.3 app/models/calculator/flat_rate.rb
spree-0.11.2 app/models/calculator/flat_rate.rb
spree-0.11.1 app/models/calculator/flat_rate.rb
spree-0.11.0 app/models/calculator/flat_rate.rb
spree-0.10.2 app/models/calculator/flat_rate.rb
spree-0.10.1 app/models/calculator/flat_rate.rb
spree-0.10.0 app/models/calculator/flat_rate.rb
spree-0.10.0.beta app/models/calculator/flat_rate.rb
spree-enriquez-0.9.4 app/models/calculator/flat_rate.rb
spree-0.9.4 app/models/calculator/flat_rate.rb
spree-0.9.3 app/models/calculator/flat_rate.rb
spree-0.9.2 app/models/calculator/flat_rate.rb
spree-0.9.1 app/models/calculator/flat_rate.rb
spree-0.9.0 app/models/calculator/flat_rate.rb