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.

Is it possible to get the cart id/ cart_token in a checkout ui extension?

Solved

Is it possible to get the cart id/ cart_token in a checkout ui extension?

fourlinecode
Shopify Partner
1 0 1

I am working on a checkout ui extension that tracks different events from user. I want to be able to use the cart_token as the identifier of all the events of a user from store to checkout.

 

I was able to get checkout_token, but it is different from the cart token. 

 

If you guys have any different idea to uniquely identify a cart object from theme to checkout

Accepted Solution (1)

Huptech-Web
Shopify Partner
1011 204 218

This is an accepted solution.

Hello @fourlinecode 

 

Currently, there is no option to directly retrieve the cart token in the checkout extension. If you need to access the cart token, you can add it to the cart attributes and retrieve it using the useAttributes hook.
 
If the solution presented meets your needs and addresses your query effectively, I encourage you to accept it as the chosen answer. This will acknowledge the support you received and aid fellow community members in identifying reliable and effective solutions for their similar concerns.
Thank you.
If you found this response helpful, please do like and accept the solution. Thanks!
Need support with Customizing your Shopify store?
Feel free to contact me at info@huptechweb.com or Visit our website Huptech Web.
Instant Shortcode Builder: Integrate customizable UI features anywhere in your store - No coding knowledge required

View solution in original post

Reply 1 (1)

Huptech-Web
Shopify Partner
1011 204 218

This is an accepted solution.

Hello @fourlinecode 

 

Currently, there is no option to directly retrieve the cart token in the checkout extension. If you need to access the cart token, you can add it to the cart attributes and retrieve it using the useAttributes hook.
 
If the solution presented meets your needs and addresses your query effectively, I encourage you to accept it as the chosen answer. This will acknowledge the support you received and aid fellow community members in identifying reliable and effective solutions for their similar concerns.
Thank you.
If you found this response helpful, please do like and accept the solution. Thanks!
Need support with Customizing your Shopify store?
Feel free to contact me at info@huptechweb.com or Visit our website Huptech Web.
Instant Shortcode Builder: Integrate customizable UI features anywhere in your store - No coding knowledge required