Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • NPina 32 posts 183 karma points
    Dec 06, 2022 @ 16:21
    NPina
    0

    Vendr Tax calculation

    Is there any way to change tax value dynamically by update cart items.

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Dec 06, 2022 @ 16:45
    Matt Brailsford
    0

    I’m not sure how you mean, can you explain what you need to do?

  • NPina 32 posts 183 karma points
    Dec 06, 2022 @ 17:02
    NPina
    0

    Hi Matt.

    My use cases are to apply tax to the order according to the country that the user specified when they create account. I'm getting all TaxClass from vendr. From that I will check if one of them match to the country that user specified and apply tax based on it.

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Dec 07, 2022 @ 09:04
    Matt Brailsford
    0

    Hey NPina,

    If the taxes are preditermined (ie, it's just a case of selecting the given tax class) you could simply call the SetTaxClass(taxClass) on the order to switch it's tax.

    Also, tax classes can have country specific rates defined on them so changing the billing country of the order should also switch the tax rate used if there is a custom rate defined for the orders selected tax class.

    Does that solve your problem?

  • NPina 32 posts 183 karma points
    Dec 07, 2022 @ 12:14
    NPina
    0

    Hi Matt

    If is there any way to change billing address programmatically, and make the billing address fields readonly, yes it could solve my problem.

    Is there any way to do that?

    Thanks.

Please Sign in or register to post replies

Write your reply to:

Draft