mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
move all calculators to reload block
This commit is contained in:
@@ -98,17 +98,7 @@ module Openfoodnetwork
|
||||
|
||||
# Register Spree calculators
|
||||
Rails.application.reloader.to_prepare do
|
||||
Openfoodnetwork::Application.config.spree.calculators.shipping_methods = [
|
||||
Calculator::FlatPercentItemTotal,
|
||||
Calculator::FlatRate,
|
||||
Calculator::FlexiRate,
|
||||
Calculator::PerItem,
|
||||
Calculator::PriceSack,
|
||||
Calculator::Weight
|
||||
]
|
||||
end
|
||||
|
||||
initializer 'spree.register.calculators' do |app|
|
||||
app = Openfoodnetwork::Application
|
||||
app.config.spree.calculators.shipping_methods = [
|
||||
Calculator::FlatPercentItemTotal,
|
||||
Calculator::FlatRate,
|
||||
@@ -119,7 +109,7 @@ module Openfoodnetwork
|
||||
]
|
||||
|
||||
app.config.spree.calculators.add_class('enterprise_fees')
|
||||
config.spree.calculators.enterprise_fees = [
|
||||
app.config.spree.calculators.enterprise_fees = [
|
||||
Calculator::FlatPercentPerItem,
|
||||
Calculator::FlatRate,
|
||||
Calculator::FlexiRate,
|
||||
@@ -129,7 +119,7 @@ module Openfoodnetwork
|
||||
]
|
||||
|
||||
app.config.spree.calculators.add_class('payment_methods')
|
||||
config.spree.calculators.payment_methods = [
|
||||
app.config.spree.calculators.payment_methods = [
|
||||
Calculator::FlatPercentItemTotal,
|
||||
Calculator::FlatRate,
|
||||
Calculator::FlexiRate,
|
||||
@@ -138,7 +128,7 @@ module Openfoodnetwork
|
||||
]
|
||||
|
||||
app.config.spree.calculators.add_class('tax_rates')
|
||||
config.spree.calculators.tax_rates = [
|
||||
app.config.spree.calculators.tax_rates = [
|
||||
Calculator::DefaultTax
|
||||
]
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user