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.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo

E-commerce tax calculation - cannot set up - Fatal Error


Go to End


2 Posts   1267 Views

Avatar
Pixel

Community Member, 78 Posts

24 July 2008 at 9:15pm

I have been having ongoing difficulty in setting up the ecommerce module.

My clients wish to add tax to their orders and so i added this snippet of code word for word from the ecommerce documentation to the mysites/_config.php:

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

However I get this fatal error:

Fatal error: Class 'TaxCalculator' not found in /var/www/vhosts/mysite.co.uk/httpdocs/mysite/_config.php on line 38

Why does it not work!!?

If i put:

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

the fatal error goes but nothing seems to happen

Help please

Avatar
Pixel

Community Member, 78 Posts

28 July 2008 at 8:50pm

Ok i still have had no luck with implementing the TaxCalculator.

The only workaround that I can think of now is to include tax in the prices and then show the net prices in the product description.

Unless someone knows otherwise.