In the JS BUY SDK examples, they use id's that are really long, but when I read the (outdated) short introduction to the BUY SDK, they use the regular, short numeric ID's found in the product url's in Shopify's admin.
So I have tried using the regular ID's in my code with no luck. How do I find or convert to these long clunky ID's so I can fetch my products?
And, Shopify! Please add an explanation about this in the introduction in the future!
Base64 decode it:
Thanks for the reply!
If I want to pick a particular product using the ID i've found in the admin url. How do I turn the ID into that base64 string?
I could take this: 7857989384...
Manually add this: "gid://shopify/Product/"...
And then base64 encode it. But that seems very clunky. Is there no other way to fetch a product by ID?