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

TaxCalculator Not Working

Go to End

3 Posts   1135 Views


Community Member, 21 Posts

24 March 2009 at 10:52pm


Can anyone point me to any documentation as to how to get the TaxCalculator functionality working?

The code below is not working:

TaxCalculator::set_for_country("UK", 0.15, "VAT", "exclusive");

Likewise with this code as well:

TaxModifier::set_for_country("UK", 0.15, "VAT", "exclusive");

There also seems to be others running into problems with this but I'm yet to find a solution on these forums.



Community Member, 21 Posts

3 April 2009 at 7:59am

Has anyone cracked this?

It's a real show stopper for me.


Community Member, 21 Posts

3 April 2009 at 8:56pm

OK, I've cracked it.

Firstly make sure you have the very latest stable releases of not only the core CMS but the ecommerce module too.

Then you need to add these lines to the _config.php file:

TaxCalculator::set_for_country("UK", 0.15, "VAT", "exclusive");
TaxCalculator::set_for_country("NZ", 0.15, "VAT", "exclusive");

Strangely it requires the NZ entry for the UK one to work.

I hope this helps someone!