Posted on 18/10/2021 13:31:14
Hi Dmitrij,
In this particular case, it's not about the user / the entire cart, it's about specific products. Some products are tax exempt (books, training) and others could be in a low or high rate (think VAT groups in Dynamicweb). What we're trying to achieve is to make live integration aware of this. As Frederik mentioned, it works for the cart, but not for product prices.
I think there are two parts to this question:
1. ERP - As you say, we'll need update the code unit to return a VAT aware price. That would be relatively easy to do custom (however, it would also be nice to have this in the standard code units out of the box)
2. The live pricing part in Dynamicweb - it seems that we can't solve this using a PriceProvider as FindPrice returns a PriceRaw that is VAT unaware. All we can do is return a decimal value (and a currency) but no VAT info.
A VatProvider seems overkill to me, but even then I don't think we can solve the above issue, can we? If it is the solution, can you give us some pointers on how to implement it?
Would it be an option to add a method to the PriceProvider similar to FindPrice that but that returns a price with VAT? The cart can handle it, so it's mostly just a matter of displaying the correct prices on list and details pages coming from the PriceProvider.
Thanks!
Imar