Compare commits
2 Commits
master
...
1-2-stable
Author | SHA1 | Date |
---|---|---|
Harald Welte | 97335a298e | |
Harald Welte | 52de319def |
|
@ -126,32 +126,20 @@ module Spree
|
|||
# maximum insured value 5000 EUR
|
||||
end
|
||||
|
||||
def insurance_cost_DE(value)
|
||||
if value <= 500
|
||||
return 0
|
||||
elsif value <= 2500
|
||||
return 6
|
||||
elsif value <= 25000
|
||||
return 18
|
||||
else
|
||||
return 99999
|
||||
end
|
||||
end
|
||||
|
||||
# we choose pricing between 2kg and 5kg
|
||||
# we choose pricing between 2kg and 5kg; UPS Standard via shipcloud
|
||||
def price_germany(value, weight)
|
||||
if weight < 2000
|
||||
price = 4.99
|
||||
price = 5.50
|
||||
elsif weight < 5000
|
||||
price = 5.99
|
||||
price = 6.50
|
||||
elsif weight < 10000
|
||||
price = 8.49
|
||||
price = 7.50
|
||||
elsif weight < 31500
|
||||
price = 16.49
|
||||
price = 8.50
|
||||
else
|
||||
price = 99999
|
||||
end
|
||||
return price + insurance_cost_DE(value)
|
||||
return price
|
||||
end
|
||||
|
||||
# We assume a 5kg package in all zones below
|
||||
|
|
Loading…
Reference in New Issue