Log in
Model

Discount

Magento\SalesRule\Model\Quote\Discount

What it does

This class calculates and applies shopping cart price rule discounts during quote totals collection in Magento 2.

Developers interact with it when customizing discount calculations, creating custom total collectors, or modifying how promotional rules affect cart pricing.

It processes all applicable sales rules, aggregates discounts per item and rule, and updates the quote totals with the calculated discount amounts.

Public Methods

  • _resetState()
  • collect()
  • fetch()