It is only possible to retrieve the SavedAmount that is the total of all discounts for each type, not for each discount separately.
That's means you can only retrieve the total of SavedAmount for order, line item and shipping discounts.
For example If you have 3 discounts and they are all the line item level then it is not possible to retrieve the SavedAmount for each of them, you can only retrieve the total SavedAmount of them.
You can use the following code to retrieve SavedAmount for each discount type:
IOrderGroupCalculator.GetOrderDiscountTotal() => retrieve SavedAmount of total order discounts
IShippingCalculator.GetShipmentDiscountPrice() => retrieve SavedAmount of shipping discount for 1 shipment
For the line item, you will need to customize the line item calculator. If you use your default built-in, you can use: item.PlacedPrice * item.Quantity - ILineItemCalculator.GetDiscountedPrice (item, curency) .Amount.
Please sign in to leave a comment.