Log in
Interface

DiscountDataInterface

Magento\SalesRule\Api\Data\DiscountDataInterface

What it does

This interface defines the contract for retrieving discount data in Magento 2 sales rules.

Developers use it to access discount amounts in both store and base currencies, including both the applied discount and original discount amounts before any adjustments.

It's commonly used when working with shopping cart price rules, promotions, and order totals to display or calculate discount information.

Public Methods

  • getAmount()
  • getBaseAmount()
  • getOriginalAmount()
  • getBaseOriginalAmount()