Rates in case of mixed carts

Rates in case of mixed carts

duduwefa
Visitor
1 0 0

Hello everyone!


I'm an app developer and have gone into the documentation about carrier services. One thing that is not clear to me is how to manage mixed carts. This is something that we did with other platforms, but I struggling to understand how to correctly manage them in Shopify. Let me share you some of my questions:

 

1. In the Shipping and fulfillment API > Providing shipping rates to Shopify: how does partners know that a product has free shipping? Shouldn't we need it to provide rates accordingly?
2. In the same section: in case the consumer sets up a cart with a product with free shipping and other product without free shipping, what should be returned to you? Should it be the price of the product that does not have free shipping or there is a special rule to follow along?
3. For the seller to offer a product with free shipping, does he need to something else besides marking the product with free shipping?

 

 

Thanks 

Reply 1 (1)

ShopifyDevSup
Shopify Staff
1453 238 512

Hi @duduwefa!

Shipping rates are calculated at the order level not on individual line items and there's no per-product shipping discounts available in our Discounts API. On Shopify, either shipping on the entire order is free or it isn't.

Now, if your carrier service is offering free or discounted shipping on certain products or if you're creating a per-product free shipping feature for your app, then it would be up to your service to read the items on the order and respond with the appropriate rates.

 

Using metafields, for example, you could allow merchants to flag products as having free shipping with your carrier service. When the request for rates hits your callback URL, the app can query the shop for the product IDs in the request and check for the metafield. If the metafield exists, the app can adjust the rates before returning them.

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog