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.

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, frankmullenger, biapar, Willr, Ingo, Jedateach, swaiba, simon_w

TaxCalculator Not Working


Reply


3 Posts   805 Views

Avatar
mwalsh

Community Member, 21 Posts

24 March 2009 at 10:52pm

Hi,

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");
Order::set_modifiers(array('TaxModifier'));

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

Thanks.

Avatar
mwalsh

Community Member, 21 Posts

3 April 2009 at 7:59am

Has anyone cracked this?

It's a real show stopper for me.

Avatar
mwalsh

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!