Log in
Model

CarrierResult

Magento\Shipping\Model\Rate\CarrierResult

What it does

This class manages shipping rate results collected from multiple carriers during the shipping calculation process.

It aggregates results from different shipping carriers, handles errors, and provides methods to retrieve rates by various criteria (cheapest, by carrier, by ID).

Developers use this when implementing shipping methods that need to compare and display multiple carrier options to customers.

Public Methods

  • appendResult()
  • getAllRates()
  • getError()
  • getRateById()
  • getCheapestRate()
  • getRatesByCarrier()
  • asArray()
  • sortRatesByPrice()
  • updateRatePrice()