Discount variables are available when the campaign has a discount configured. They expose all the pricing details related to the campaign discount — including the code to apply at checkout, the amounts before and after discount, and the saving relative to the compare-at price.
discount.discountCode — The discount code the customer can apply at checkout to redeem the campaign offer.
discount.discountPercentage — The percentage discount the campaign is offering (e.g. 10 for 10% off).
discount.actualPrice — The price before the campaign discount is applied, formatted with currency.
discount.actualPrice_wo_currency — Price before discount as a raw number.
discount.discountAmount — The amount being discounted by the campaign, formatted with currency.
discount.discountAmount_wo_currency — Campaign discount amount as a raw number.
discount.discountedPrice — The final price the customer pays after the campaign discount, formatted with currency.
discount.discountedPrice_wo_currency — Final discounted price as a raw number.
discount.totalComparePrice — The total compare-at (original) price across all applicable products, formatted with currency.
discount.totalComparePrice_wo_currency — Total compare-at price as a raw number.
discount.compareDiscountAmount — The total saving the customer gets relative to the original compare-at price — combining the existing price reduction and the campaign discount. Formatted with currency.
discount.compareDiscountAmount_wo_currency — Total saving vs original price as a raw number.
