3. The ShippingSubjectInterface¶
The find available shipping methods or calculate shipping cost you need to use object implementing ShippingSubjectInterface.
The default Shipment model is already implementing ShippingSubjectInterface.
3.1. Interface methods¶
- The
getShippingMethodreturns aShippingMethodInterfaceinstance, representing the method. - The
getShippingItemCountprovides you with the count of items to ship. - The
getShippingItemTotalreturns the total value of shipment, if applicable. The default Shipment model returns 0. - The
getShippingWeightreturns the total shipment weight. - The
getShippablesreturns a collection of uniqueShippableInterfaceinstances.