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.

Archive

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

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

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


Reply

2 Posts   953 Views

Avatar
Pixel

24 July 2008 at 9:15pm Community Member, 78 Posts

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

28 July 2008 at 8:50pm Community Member, 78 Posts

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.