CART API can't generate shipping rates

Nulls
Shopify Expert
4 0 0

Hi All,

The cart API returns an empty JSON, no error message or anything. We are using https://community.shopify.com/c/shopify-design/cart-add-a-shipping-rates-calculator-to-your-cart/td-... , so it is pure javascript and liquid. It uses cart API as you know and Shopify needs to generate rates with a simple get request.

Here is the problem.

The customer adds a product (quantity x1)

https://www.billboardvinyls.com/products/10-x-36-new-white-vinyl-tarp?variant=39433160327251

When you check the shipping rates everything looks ok: https://www.billboardvinyls.com/cart/shipping_rates.json?shipping_address[zip]=35242&shipping_addres...

The customer changes the quantity x6 and Cart API can't generate rates anymore.

With the same quantity(x6) everything is fine at the checkout.

I believe this is a small bug but Shopify support redirects me here to get some help.

Any help would be much appreciated.

0 Likes
Jason
Shopify Expert
10416 165 2066

Are you doing this?

The recommended method to generate shipping rates is to use the POST /cart/prepare_shipping_rates.json and GET /cart/async_shipping_rates.json endpoints because it might take a while for shipping rates to be returned. The GET /cart/shipping_rates.json endpoint is subject to throttling

Without knowing what calls or frequency you're making them in perhaps you're seeing a throttle. See how it goes with the async options and if that yields better results first.

I jump on these forums to help and share some insights. Not looking to be hired, and not looking for work.

Don't hand out staff invites or give admin password to forum members unless absolutely needed. In most cases the help you need can be handled without that.


★ http://freakdesign.com.au ★
0 Likes
Nulls
Shopify Expert
4 0 0

Hi Jason,

Thank you for your time and answer but the tutorial uses post and async and it returns empty too for a certain weight.  If (an item x quantity) >= 150lbs then it returns empty. As I understood, cart API doesn't generate rates for LTL freights, or is there any way to force it?

0 Likes
Nulls
Shopify Expert
4 0 0

Anyone?

0 Likes