By default, all items are allowed to go into any type of ShippingGroup. However, it might be necessary to prevent specific commerce items from being added to certain types of shipping groups. For example, only certain types of items can be assigned to an ElectronicShippingGroup. It does not make sense for a box of golf balls to be shipped electronically.

Follow these steps to prevent commerce items from being added to specific types of shipping groups:

Alternatively, you could create a shippingGroupsNotAllowed property for the SKU item descriptor in the product repository. In this property, list the names of the ShippingGroup types to which a CommerceItem is not allowed.

loading table of contents...