Closed afetter closed 1 year ago
According to Shopify documentation, you won't be able to checkout the products that require shipping. So you either have to set a free shipping line, or mark these products/variants to not require shipping.
Hey mate, I think there is a missing field, on create checkout mutation checkoutCreate
requiresShipping
.
Also, I think AvailableShippingRates or getCheckoutInfoWithAvailableShippingRatesQuery
is not available anywhere in this API.
Am I correct?
requiresShipping
field is not present in the checkoutCreate mutation itself.
And yes, AvailableShippingRates or getCheckoutInfoWithAvailableShippingRatesQuery is not available anywhere in this API.
That is an attribute your get in checkout response. But as per my knowledge, there's no method to update it for now
Thank you so much mate, it was an error in my code.
the process requires:
var checkout = await shopifyCheckout.createCheckout(
lineItems: items,
shippingAddress: address,
email: 'anderson',
);
//missed part to get available Shipping Rates
checkout = await shopifyCheckout.getCheckoutInfoQuery(checkout.id);
var shippingRates = checkout.availableShippingRates?.shippingRates;
//missed part, set shipping rate
await shopifyCheckout.checkoutShippingLineUpdate(
checkout.id, shippingRates?[0].handle ?? '');
Glad to hear you found the fix to the issue
I only got this error at the final stage of the test, which means I made the payment and I try to complete the checkout.
I didn't find a way to define the shipping rate.