3. The ShippingSubjectInterface¶
Danger
We’re sorry but this documentation section is outdated. Please have that in mind when trying to use it. You can help us making documentation up to date via Sylius Github. Thank you!
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.