Shopify POS Links Bug?

Highlighted
Shopify Expert
46 0 10

Is it possible there's been a recent change to POS Links? I've had a POS Link added to the "edit cart page" for several years now with no issue. In the past couple of days, it seems as though it's stopped passing relevant information. Previously, it would send a customer id and the documentation states that it still should, however, I'm no longer seeing that as the case. Can anyone confirm? 

I've got loads of debugging information helpful if there is a Shopify Dev available to lend a hand. 

0 Likes
Highlighted
Shopify Expert
46 0 10

Nevermind, this was a mistake on my part. 

0 Likes
Highlighted
Shopify Partner
5 0 0

Would you mind sharing what your solution was? I'm also hoping to get the customer id and hopefully also the line item data with my Edit Cart link requests.

0 Likes
Highlighted
Shopify Expert
46 0 10

Of course, happy to share any info I can. Unfortunately, in this case, my thinking was flawed and the issue I was seeing was actually the result of a recent code change on my end. I had been looking at this issue for way too long and was confusing the Edit Cart link with another piece of functionality from the Admin links which does in fact send a customer id.

For Edit Cart links, however, no information is passed with the request to your app other than the appropriate authentication information. That means it's up to you to use the POS JS SDK to retrieve the cart information (or, I believe Shopify App Bridge is more appropriate these days). Specifically, when a user clicks your Edit Cart link, a request is made to your app, you need to authenticate the request and then use the appropriate cart fetch method (https://shopify.dev/tools/pos-app-sdk/methods#cart-fetch or https://shopify.dev/tools/app-bridge/actions/cart#fetch-cart) to retrieve information about the cart. As a part of that response, you will receive line item information as well as customer information. 

Hope those links help!

0 Likes