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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

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


1520 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?