Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

E-Commerce Modules /

Discuss about the various e-commerce modules available:
Ecommerce, SS Shop, SilverCart and SwipeStripe
Alternatively, have a look the shared mailinglist.

Moderators: martimiz, Nicolaas, Sean, Ed, frankmullenger, biapar, Willr, Ingo, Jedateach, swaiba

Silvershop: How to setup GlobalTaxModifier?


Go to End


266 Views

Avatar
sebastiand

Community Member, 5 Posts

15 February 2017 at 12:19am

Edited: 15/02/2017 12:21am

Hello everybody,
I´m a little lost setting up the GlobalTaxModifier. I can´t find any documentation about that.
I want to be able to have different tax rates, based on the country that the users selects for her address.

I added the modifier to Order class in my config.yml:

Order:
  modifiers:
    - 'GlobalTaxModifier'

Then I tried to setup my tax rates per country by adding the following t the config.yml:

GlobalTaxModifier:
  country_rates:
    Switzerland:
      rate: 0.08
    Germany:
      rate: 0.19
    Austria:
      rate: 0.20
  defaults:
    Rate: 0.08

But every order jus uses the default Rate of 0.08.

How is the GlobalTaxModifier picking up the country to assign the correct value? Is that done via the CountryDropdownField in the order process - where the user selects one of the allowed countries?

Can somebody provide me some info about setting this up correctly?