Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Setting SimpleShipping and TaxCalculator--- its not working

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

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

Page: 1
Go to End
Author Topic: 1353 Views
  • stooni
    Avatar
    Community Member
    89 Posts

    Setting SimpleShipping and TaxCalculator--- its not working Link to this post

    I have setting in _config.php following parameters!

    SimpleShippingCalculator::set_charges(10);
    TaxCalculator::set_for_country("CH", 7.6, "MWST", "inclusive");

    and in the Order.php
    $shipping = '$' . number_format($sc->Shipping(), 2);
    $tax = '$' . number_format($sc->calcAddedTax(), 2);      
    remove the Comment // signs ...
       
    it still does not working???

    Can any body help me!!!

    Thanks ---stooni

  • stooni
    Avatar
    Community Member
    89 Posts

    Re: Setting SimpleShipping and TaxCalculator--- its not working Link to this post

    Setting SimpleShipping --- is ok. in the new version functionaly

    because when i set

    TaxCalculator::set_for_country("CH", 7.6, "MWST.", "inclusive");

    in the ecommerce/_config.php then nothing dooing also when i db/build... or /?flush=1 ...???
    ???

    thanks for help!

    --stooni

  • stooni
    Avatar
    Community Member
    89 Posts

    Re: Setting SimpleShipping and TaxCalculator--- its not working Link to this post

    in the documentation TaxCalculator is wrong!!!
    // Set the tax calculation to be for NZ customers at 12.5% exclusive
    // on the order price.
    TaxCalculator::set_for_country("NZ", 0.125, "GST", "exclusive");

    when i take this one in the log saying

    PHP Fatal error: Class 'TaxCalculator' not found in /var/www/vhosts/webjobs.ch/subdomains/const/httpdocs/ecommerce/_config.php on line 17,

    Some Help?

    Thanks!
    ---Stooni

  • stooni
    Avatar
    Community Member
    89 Posts

    Re: Setting SimpleShipping and TaxCalculator--- its not working Link to this post

    These its working
    SimpleShippingModifier::set_charges_for_countries(array(
        'CH' => 10,
        'DE' => 25,
        ));

    because these not working
    TaxModifier::set_for_country("CH", 7.6, "MWST.", "inclusive");

    You Check on http://const.webjobs.ch/products/

    thanks for help

    --- stooni!

  • stooni
    Avatar
    Community Member
    89 Posts

    Re: Setting SimpleShipping and TaxCalculator--- its not working Link to this post

    Must i write the command these way

    Order::set_modifiers(TaxModifier::set_for_country("CH", 7.6, "MWST.", "inclusive"));

    perhaps is Romain Louis here he has write the new TaxModifier???

    Thanks for Help stooni

    1353 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.