Cart Permalink not working with Variant ID

dakotabryant
Visitor
1 0 0

I'm trying to create a cart permalink following the directions here: https://shopify.dev/apps/channels/cart-permalinks

 

I've formatted the URL correctly to my knowledge https://mystore.myshopify.com/cart/Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC8zOTgxMDQ5NjQzMDI2Mg==:1 and still get a 404 each time. I've tried with multiple variant IDs and have even tried navigating directly to the url after getting the variant ID from the Graphql Playground. Any help is appreciated. 

Reply 1 (1)

Jason
Shopify Expert
11196 226 2287

A permalink would want the actual variant ID, not the GID.

So base64 decoding what you have gives me

gid://shopify/ProductVariant/39810496430262

so the permalink will be

https://mystore.myshopify.com/cart/39810496430262:1

 

This is mentioned in the docs you linked in this section:
https://shopify.dev/apps/channels/cart-permalinks#creating-checkout-permalinks

 

 

 

★ I jump on these forums in my free time to help and share some insights. Not looking to be hired, and not looking for work. http://freakdesign.com.au ★