Log in
Model

TotalsCollector

Magento\Quote\Model\Quote\TotalsCollector

What it does

This class orchestrates the calculation of all quote totals (subtotals, discounts, taxes, shipping, grand total) in Magento 2.

Developers interact with it when customizing checkout calculations, adding custom total collectors, or when programmatically triggering quote total recalculation.

It coordinates multiple total collectors and ensures totals are properly aggregated across billing and shipping addresses.

Public Methods

  • collectQuoteTotals()
  • collect()
  • collectAddressTotals()