I am using the Drupal Commerce module. On the checkout page, I need to add 'Subtotal' and 'Discount' fields above the 'Order total'.
The discount will be calculated by iterating through all products in the cart and (using some unique and complex PHP business logic that I won't get into here) calculating how much discount each product is eligible for.
The discount total will then be displayed in a 'Discount' field between 'Subtotal' and 'Total'. The product prices should not be discounted.