mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-30 06:31:16 +00:00
Move all calculators outside the spree namespace
This commit is contained in:
@@ -29,7 +29,7 @@ class PaymentMethodFactory
|
||||
enterprise,
|
||||
"Cash on collection",
|
||||
"Pay on collection!",
|
||||
Spree::Calculator::FlatRate.new
|
||||
Calculator::FlatRate.new
|
||||
)
|
||||
end
|
||||
|
||||
@@ -39,7 +39,7 @@ class PaymentMethodFactory
|
||||
enterprise,
|
||||
"Credit card (fake)",
|
||||
"We charge 1%, but won't ask for your details. ;-)",
|
||||
Spree::Calculator::FlatPercentItemTotal.new(preferred_flat_percent: 1)
|
||||
Calculator::FlatPercentItemTotal.new(preferred_flat_percent: 1)
|
||||
)
|
||||
end
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ class ShippingMethodFactory
|
||||
name: "Home delivery #{enterprise.name}",
|
||||
description: "yummy food delivered at your door",
|
||||
require_ship_address: true,
|
||||
calculator_type: "Spree::Calculator::FlatRate"
|
||||
calculator_type: "Calculator::FlatRate"
|
||||
)
|
||||
delivery.calculator.preferred_amount = 2
|
||||
delivery.calculator.save!
|
||||
|
||||
Reference in New Issue
Block a user