Shipping error at checkout when expand operation replaces physical product with non-physical one

givy_app
Shopify Partner
9 1 3

Hello Functions teams!

 

We're hoping to launch some new Functions functionality soon, and are running into an interesting error. 

 

When a cart function returns an expand operation that removes a physical product and replaces it with a product that does not require shipping, the checkout page displays an error in the shipping section.

 

The error does not block the checkout, and the user can ignore the error and complete the checkout, but most customers would probably stop here and not check out.

 

Could somebody please advise on a way for us to prevent this error, or let us know if this is a bug? I'll confirm that the address we selected is available for shipping on this dev store, so it's not a configuration issue.

 

Thanks

 

Here's the error:

givy_app_0-1707871885842.png

 

Replies 10 (10)

SBD_
Shopify Staff
1829 269 409

Hey @givy_app 

 

Checking with the Functions team on this one and will report back!

Scott | Developer Advocate @ Shopify 

SBD_
Shopify Staff
1829 269 409

Hey @givy_app 

 

Sounds like an issue on our end. From the Functions folks:

 

From the top of my head I can’t figure out why this could be happening, but I’ll open an issue so the team can investigate. 

 

Keep you posted.

Scott | Developer Advocate @ Shopify 

givy_app
Shopify Partner
9 1 3

Hey @SBD_  - thanks very much!

 

Is there any way to track the progress of the issue on Shopify's side?

givy_app
Shopify Partner
9 1 3

Hi @SBD_ - did you get any update from the team on this? It's the only thing preventing us from launching a new app.

 

Thanks in advance.

 

JP

SBD_
Shopify Staff
1829 269 409

Hey @givy_app 

 

This one's still waiting to be investigated. I'm subscribed to the issue and will let you know as it moves.

Scott | Developer Advocate @ Shopify 

givy_app
Shopify Partner
9 1 3

Hi @SBD_ - I don't mean to pester, but is there anything we can do to prioritize this bug? Our app is ready for submission, but this bug makes the app unusable.

 

Thanks again.

JP

thegreatone99
Shopify Partner
3 0 2

Hey @SBD_, just letting you know I'm also seeing this issue. Hoping there can be some progress soon 🤞

givy_app
Shopify Partner
9 1 3

Hi @SBD_ - it's now been three months without an update from Shopify. Can you please provide an update on how this bug's resolution is progressing? It's still a blocker for our app.

 

JP

thegreatone99
Shopify Partner
3 0 2

 

I have been looking into this more and have come up with a few details I think will be helpful for the devs on your side.

 

The "Shipping not available" error only happens if the product, added using the expand operation, does not have shipping configured. If the product added with the expand operation has shipping configured there is no error and it displays the correct rates for the product. So, that section is actually working as expected. It makes sense that it errors out when it does. It is trying to retrieve shipping rates for a product that doesn't have any. It would never work.

 

The real issue is that the checkout is displaying sections that are not usually displayed when there are no products that require shipping in the cart. See attached screenshots for the checkout with the "no shipping" product. The "Delivery" and "Shipping method" sections are not displayed. However, both those sections are currently being displayed if an expand operation removes all products with shipping and only adds products without. This leads to the "Shipping not available" error being visible.

 

Based on that, my guess is the logic that determines which version of the checkout to display (requires shipping/no shipping) is doing so before the cart function makes modifications to the products in the cart. Instead it should be factoring in the changes made by cart functions.

 

Hope that helps!

 

Screen Shot 2024-03-20 at 11.57.33 AM.png

Screen Shot 2024-03-20 at 12.25.07 PM.png

givy_app
Shopify Partner
9 1 3

Hi @SBD_ - just checking in on this one, as it's been two months since it was acknowledged as a bug. Any progress that you can see?

 

Thanks.

JP