Log in
Model

AbstractCarrier

Magento\Shipping\Model\Carrier\AbstractCarrier

What it does

This is the base abstract class that all shipping carrier implementations in Magento 2 must extend.

Developers use this when creating custom shipping carriers or integrating third-party shipping methods, as it provides core functionality for configuration retrieval, rate calculation with handling fees, country validation, debugging, and shipment request handling.

Public Methods

  • getConfigData()
  • getConfigFlag()
  • requestToShipment()
  • returnOfShipment()
  • getContainerTypes()
  • getCustomizableContainerTypes()
  • getDeliveryConfirmationTypes()
  • checkAvailableShipCountries()
  • processAdditionalValidation()
  • proccessAdditionalValidation()
  • isActive()
  • isFixed()
  • isTrackingAvailable()
  • isShippingLabelsAvailable()
  • getSortOrder()
  • getFinalPriceWithHandlingFee()
  • getTotalNumOfBoxes()
  • isStateProvinceRequired()
  • isCityRequired()
  • isZipCodeRequired()
  • getDebugFlag()
  • debugData()
  • getCarrierCode()
  • getContentTypes()