Hello Dynamicweb,
I need to retrieve the discounted price for a product through the API. At the moment, it seems like I have to do something like this:
var discountCollection = new DiscountInfoCollection(priceContext, product, null, 0); var discountPrice = discountCollection.TotalPrice;
However, the TotalPrice property is deprecated with the following message:
Use Services.DiscountService.GetProductDiscountPrice() instead.
The issue is that GetProductDiscountPrice() appears to be internal in DiscountService, and the DefaultDiscountService class is also internal.
What is the recommended way to retrieve the discounted product price in Dynamicweb 10?
Best regards, Anders