Have your say in Community Polls: What was/is your greatest motivation to start your own business?
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Re: Function API Delivery customization issue

Function API Delivery customization issue

siddhu_kevadiya
Shopify Partner
9 0 2

Facing an issue on delivery customisation!

 

Hide all shipping method if address contains "po box".

It works that hide all shipping rates if address contains "po box" but at checkout if address change, like remove PO Box or change address completely, it does not showing any shipping rates!

only works if refresh checkout page!

I am using https://shopify.dev/docs/api/functions/reference/delivery-customization/graphql/common-objects/hideo...

 

 

See a video for example: https://www.loom.com/share/ecaf01bbd419488284cfabbcf46fd3af 

 

Thanks in advance. 

 

 

Replies 7 (7)

Nick_Wesselman
Shopify Staff
171 43 72

I'm unable to replicate this issue, can you provide an example of the function output that causes this for you, and the X-Request-ID header value that you see in checkout when it occurs?

Nick Wesselman | Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

siddhu_kevadiya
Shopify Partner
9 0 2

Hello @Nick_Wesselman 

 

Actually once display an error, Shopify does not display logs unless refresh the page!

 

it display logs once rule execute to hide rates. and once hide all rates, it could not back to display rates unless refresh the page. 

 

work with this if enter "PO Box" 

9914d674-24c5-4133-88c1-5d593c6dbbdd

 

then no log unless I fresh checkout page. 

ID: 76bbeddd-eb7a-4faf-a02c-40dbf3986c5d

 

 

Please make sure to create a rule that hides all shipping rates. 

 

if there are 2 rates and hide 1 only using rule, then it works fine. 

 

Let me know if still more details. 

 

Nick_Wesselman
Shopify Staff
171 43 72

OK so this wasn't clear at all to me -- you want to hide all shipping rates? And the actual bug is that the rates aren't coming back after removing PO Box?

Nick Wesselman | Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

Nick_Wesselman
Shopify Staff
171 43 72

I'm able to reproduce the issue now --

  1. Create a function that hides all delivery options based on matching ‘po box’ in address
  2. Test with that string in checkout — delivery options are removed and ‘Shipping not available’ appears (works as expected)
  3. Remove that string from the address
    1. EXPECTED: Delivery options return
    2. ACTUAL: Error message remains until you hard refresh the page

I've reported the issue internally to the appropriate team, will let you know if I hear anything.

Nick Wesselman | Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

Nick_Wesselman
Shopify Staff
171 43 72

Confirmed that address changes not re-triggering functions is a known issue, if I hear back on resolution I will post here.

Nick Wesselman | Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

siddhu_kevadiya
Shopify Partner
9 0 2

 

It was working with changing any value in inputs on customer information fields. I am 200% sure.

because we have 3 users they are using this function and right now they have to switch 3 step checkout after facing issue. they preferred one page checkout.  

 

siddhu_kevadiya
Shopify Partner
9 0 2

Right now the same issue on 3 steps checkout as well 😞 

even I change name or address, function does not execute.