Accepting credit cards, warehouses, and shipping and fulfilling orders
I am trying to get a shipping rate for the order before checkout using draftorderCalculate But when I add the country code except for default once, the result shows null for me.
{
"input": {
"email": "gulshan@xxxxx.net",
"lineItems": [
{
"originalUnitPrice": "1.25",
"quantity": 1,
"requiresShipping": true,
"sku": "BJxxx",
"taxable": false,
"title": "1-9 Number Puzzles",
"variantId": "gid://shopify/ProductVariant/4310787820xxxx"
}
],
"shippingAddress": {
"address1": "Fake city",
"city": "dublin",
"provinceCode":"Carlow",
"countryCode": "IE",
"firstName": "Gulshan",
"lastName": "Sharma",
"zip": "A91X2R3"
},
"useCustomerDefaultAddress": false
}
}
Result:
{
"data": {
"draftOrderCalculate": {
"calculatedDraftOrder": {
"totalShippingPrice": "0.00",
"availableShippingRates": []
},
"userErrors": []
}
},
"extensions": {
"cost": {
"requestedQueryCost": 11,
"actualQueryCost": 11,
"throttleStatus": {
"maximumAvailable": 1000,
"currentlyAvailable": 989,
"restoreRate": 50
}
}
}
}
The shipping rate for Standard International is set as 14.99.
Please let me know if anyone has any suggestions.
Regards
Hey @rkmsoftware,
Do you found any solution?
I am experiencing the same problem right now and don't really know how to continue.
Kind regards
You can you draftOrderCalculate mutation from Shopify graphQL. Which provides you with all the information you will get while checkout including the shipping price
Thanks for the fast reply!
I will try it with your suggested approach.
Hey Community! As we jump into 2025, we want to give a big shout-out to all of you wh...
By JasonH Jan 7, 2025Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024