What's your biggest current challenge? Have your say in Community Polls along the right column.
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.

How to convert a regular checkout id to Storefront CheckoutID?

How to convert a regular checkout id to Storefront CheckoutID?

Atiqur_Rahman
Shopify Partner
24 1 19

So, I was trying to addLineItem to checkout using storefront api on a regular checkout. What I tried is - 

var ck_id = "{{ checkout.id }}";
ck_id = btoa('gid://shopify/Checkout/'+ck_id);

 

But in response it says, "Checkout doesn't exist" which means my checkout id conversion isn't really working. Any thoughts?

If you have any requirement, please email me directly to ratiqur807@gmail.com

I'm the GENUINE EXPERT that you might need today!
Replies 0 (0)