Log in
Model

QuantityCollector

Magento\Quote\Model\Quote\QuantityCollector

What it does

This class calculates and updates the total quantities of items in a shopping cart quote.

It tracks the total number of items, total quantity of all items, and specifically the quantity of virtual items (like downloadable products), handling both simple and complex product types with children items.

Developers would use this when they need to recalculate quote item counts after adding, removing, or updating cart items.

Public Methods

  • collectItemsQtys()