Log in
Model

TotalsReader

Magento\Quote\Model\Quote\TotalsReader

What it does

The TotalsReader class is responsible for collecting and aggregating all quote totals (subtotal, shipping, tax, discounts, etc.) from various total collectors in Magento 2.

Developers use this class when they need to retrieve calculated totals for a shopping cart quote, as it orchestrates fetching data from all registered total collectors and merges them into a unified array of Total objects.

Public Methods

  • fetch()