10. Shipping method requirements


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!

Sylius has a very flexible system for displaying only the right shipping methods to the user.

10.1. Shipping categories

Every ShippableInterface can hold a reference to ShippingCategory. The ShippingSubjectInterface (or ShipmentInterface) returns a collection of shippables.

ShippingMethod has an optional shipping category setting as well as categoryRequirement which has 3 options. If this setting is set to null, categories system is ignored.

10.1.1. “Match any” requirement

With this requirement, the shipping method will support any shipment (or shipping subject) which contains at least one shippable with the same category.

10.1.2. “Match all” requirement

All shippables have to reference the same category as the ShippingMethod.

10.1.3. “Match none” requirement

None of the shippables can have the same shipping category.