So your orderlines in the order object should already have tax applied, but it depends what your's order Tax Class / Tax Rate is set to as it's this that will determine the calculation.
You'll need to ensure your order has a tax class assigned to it and that tax class needs to have a tax rate, then Vendr will perform the calculation for you.
Hmm, so first thing it doesn't matter if the order line has a tax class ID or not, it just means if it doesn't, it falls back to the order tax class that is used. This is what allows you to have product / order line specific tax rates.
So the only other thing I think that should affect this is the orders billing / shipping country as those need to be set in order for it to know which tax rate to apply.
OK, now I get it. Because I tested switzerland (0%) before, these informations got stored in the cookie and where from then on applied in all other views.
And even if I delete all products in the shopping basket, I still see the prices according to the TaxRate that was assigned to the last selected delivery address (country).
Once I clear the cookie, I fall back on the default Tax Class Standard Rate.
An order won't know really if the tax class changes outside of it, so I guess it didn't know to update it's tax rate and so because the tax class was never changing, it just knew "there is no point recalculating this as it's not changed".
How to display price with tax
Hi,
does anyone know the best way on how to display the prices with tax when shop settings are
In the cart I tried to use
but that returns the net price.
In the product.cshtml I tried
but here also it shows the net price.
Am I missing something?
Thanks
So your orderlines in the order object should already have tax applied, but it depends what your's order Tax Class / Tax Rate is set to as it's this that will determine the calculation.
You'll need to ensure your order has a tax class assigned to it and that tax class needs to have a tax rate, then Vendr will perform the calculation for you.
Hi Matt,
sorry if its a stupid question, but where can I assign a tax class to the order?
Thanks
order.SetTaxClass(taxClass)
or it will usually also set it based upon what is the default tax class for the default currency.ok, my order has a taxClass assigned
But even though in the tax class the default value is 22% the tax rate in the order is 0,00%
Thanks
ok, my order has a taxClass assigned
But even though in the tax class the default value is 22% the tax rate in the order is 0,00%
Update: But it seems that the OrderLine has no TaxClass Id. Why does that not get assigned?
Thanks
Hmm, so first thing it doesn't matter if the order line has a tax class ID or not, it just means if it doesn't, it falls back to the order tax class that is used. This is what allows you to have product / order line specific tax rates.
So the only other thing I think that should affect this is the orders billing / shipping country as those need to be set in order for it to know which tax rate to apply.
OK, now I get it. Because I tested switzerland (0%) before, these informations got stored in the cookie and where from then on applied in all other views.
And even if I delete all products in the shopping basket, I still see the prices according to the TaxRate that was assigned to the last selected delivery address (country).
Once I clear the cookie, I fall back on the default Tax Class Standard Rate.
Is this the intended behaviour?
I mean, I guess.
An order won't know really if the tax class changes outside of it, so I guess it didn't know to update it's tax rate and so because the tax class was never changing, it just knew "there is no point recalculating this as it's not changed".
is working on a reply...