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)
Transform this holiday season into a shopping spree. Plus, learn how to effortlessly open ...
By Jasonh Dec 8, 2023Make the shift from discounts to donations, and witness your business not only thrive fina...
By Holly Dec 4, 2023On our Shopify Expert Marketplace, you can find many trusted third party developers and fr...
By Arno Nov 27, 2023