Creates ShippingProfileService & ShippingOptionService (#30)
Adds ShippingProfiles: With Shipping Profiles store operators can group products together and select which shipping options can fulfill the products. The shipping profiles are region agnostic, but for products to be shippable to a given region the shipping profile must have a shipping option associated that ships to this region. Adds Shipping Options: Shipping Options represents a way that the customer can have their order shipped. The shipping option has a fulfillment provider associated to determine who fulfills orders with the given shipping method. If a fulfillment provider has multiple ways that they can ship a shipping option for each of the fulfillment provider's shipping options can be created.
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
# ShippingOptionService
|
||||
|
||||
In Medusa, ShippingOptions represent ways that the customer can have their order shipped. Shipping options are defined by the store operator and are linked to a fulfillment provider. When the customer places their order the fulfillment provider plugin will be notified.
|
||||
|
||||
Shipping Options can have either flat rate prices or calculated prices. As the names suggest a flat rate price is a fixed amount, e.g. for Free Shipping, while calculated rates are prices that are calculated by the fulfillment provider.
|
||||
|
||||
## Creating ShippingOptions
|
||||
|
||||
Shipping options are created with POST calls to `/admin/shipping-options`. You can define requirements that the cart should meet in order to allow the shipping option to be applied to it. Furthermore, you should define what Region the shipping option is available in.
|
||||
|
||||
## Using Shipping Options
|
||||
|
||||
Your fulfillment provider may need additional data in order to validate the shipping option for use. For example, the store operator could make a shipping option called "ShopPickup" which is fulfilled by your warehouse and shipped with CarrierX.
|
||||
|
||||
CarrierX sends the order to the customer's local store where the customer can pick up their order. In this case fulfillment provider needs some additional data about which store CarrierX is shipping to. The additional data should be provided in the data field when calling POST `/store/carts/:id/shipping-method`.
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
# ShippingProfileService
|
||||
|
||||
In Medusa, a Shipping Profile represents a group of products and shipping options that can fulfill said products. For example, a store may have to product types "Shirts" and "Shorts" which are produced in Italy and UK respectively. In this case the store operator would create two shipping profiles, one for Shirts and one for Shorts, and add the products correspondingly. The store operator can now decide which shipping options can fulfill the products by adding shipping options to each of the profiles.
|
||||
|
||||
Products and Shipping Options can only belong to one shipping profile at a time.
|
||||
|
||||
|
||||
## Using Shipping Profiles
|
||||
The shipping profiles are used to fetch the correct shipping options for a cart. When GET `/store/shipping-options` is called the ShippingProfileService is asked to find all shipping options that can fulfill the cart's products.
|
||||
Reference in New Issue
Block a user