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.
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.
Vendr Tax calculation
Is there any way to change tax value dynamically by update cart items.
I’m not sure how you mean, can you explain what you need to do?
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.
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?
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.
is working on a reply...