Hello,
I have developed a control that will display the amount that is being saved on any particular product i.e. Save £5 or Save 12%.
My code is pretty simple, I get a handle on the variant (if there is only one of them). I can easily get at the amount the discount is saving by using:
PriceHelper.GetDiscountAmount(productVariant)
But what I want to get a handle on is the discount that nop is applying to the variant. It could of course be a discount set at the category level or variant level. I see there is a method DiscountService.GetPreferredDiscount but I'm not sure how i can use it with a variant?
Any ideas please?
Thanks
Al