App reviews, troubleshooting, and recommendations
Hello, when creating an order, I need to calculate the shipping price according to my logic, through my api, how can I do this?
Checkout Carrier Calculated Shipping (CCS) in Shopify
https://shopify.dev/docs/api/admin-rest/2023-01/resources/carrierservice
That is, I create an endpoint (I accept it), I process everything and give the response, will this be taken into account when ordering an order and during checkout?
Yes. Exactly.
Be mindful that you need CCS to be enabled on your store for this to work.
Check this document on how you can get CCS activated: https://help.shopify.com/en/manual/shipping/setting-up-and-managing-your-shipping/enabling-shipping-...
# Shipping lines format
shipping_lines = [{
title: your_shipping_title,
price: your_shipping_line_price,
code: your_shipping_code,
source: your_shipping_line_source
}]
# Example
shipping_lines = [{
title: "Standard Shipping",
price: 10.0, # if you want free shipping, you can set this as 0
code: "Standard Shipping",
source: "shopify"
}]
# Create order using Shopify API
payload = {
# other fields
shipping_lines: shipping_lines
}
ShopifyAPI::Order.create(payload)
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024