Jump to:

2088 Posts in 1008 Topics by 455 members

E-Commerce Modules

SilverStripe Forums » E-Commerce Modules » TaxCalculator Not Working

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

Page: 1
Go to End
Author Topic: 782 Views
  • mwalsh
    Avatar
    Community Member
    21 Posts

    TaxCalculator Not Working Link to this post

    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.

  • mwalsh
    Avatar
    Community Member
    21 Posts

    Re: TaxCalculator Not Working Link to this post

    Has anyone cracked this?

    It's a real show stopper for me.

  • mwalsh
    Avatar
    Community Member
    21 Posts

    Re: TaxCalculator Not Working Link to this post

    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!

    782 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.