In the storefront product page, I have access to the relevant selling plan groups. I have access to an id (https://shopify.dev/docs/themes/liquid/reference/objects/selling-plan-group#selling_plan_group-id) but would like to get the GraphQL id. I need it to fetch some data from our servers.
I tried window.atob but it just returns gibberish.
1 Like
Iām also looking to solve a similar conundrum. Iām in a situation where I have a Selling Plan Group id, retrieved from the Product AJAX api, and Iām trying to find a sane way of correlating that with Selling Plan Groupās actual id.
Through the Admin GraphQL api, I can retrieve a Selling Plan Group Id, āgid://shopify/SellingPlanGroup/91521195ā. The same Selling Plan Group, when returned as part of the response from the Product AJAX API, is returned as ā443f8160e8514d187603d97741c928a440bd9240ā. The example shown in the Product AJAX API reference shows a number being returned for the selling_plan_group_id, but instead it seems to be returning a hex value
I have GID:
gid://shopify/SellingPlanGroup/7705303480
which corresponds to liquid/ajax ID:
6cc7db4a53ac057899844db763b684560c57ace6
I checked a bunch of different hashes to see if that was it (such as the entire GID, or just the numeric portion of the GID, different hash algorithms) but couldnāt find any connection between the hex and the GID