Hi DW,
I'm trying to render tag of type Priceinfo. But i'm having trouble applying VAT.
So far i have this code:
double price = 0; double.TryParse( productToUse.ProductFieldValues.GetProductFieldValue( "BeforeGrossDKK" ).Value.ToString(), out price ); Dynamicweb.eCommerce.Prices.PriceRaw pr = new Dynamicweb.eCommerce.Prices.PriceRaw( price, Dynamicweb.eCommerce.Common.Context.Currency ); Dynamicweb.eCommerce.Prices.PriceCalculated pi = new Dynamicweb.eCommerce.Prices.PriceCalculated( pr ); Dynamicweb.eCommerce.Frontend.Renderer.RenderPriceInfo( pi, _template, "Co3.Custom.Price" );
But when rendering my tag rendering my tag, no VAT is applied. Is there an easy way to get the current VAT from Context and apply it to my PriceInfo?
My tag is only for viewing and is never used in calculations, but i'd like to have the flexibility to use all the template features that a PriceInfo can have.