We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

How to sync storefront API cart with theme cart in Shopify?

How to sync storefront API cart with theme cart in Shopify?

tiagob
Shopify Partner
2 0 1

I intent to use Shopify cart and checkout. How can I sync storefront API cart with Shopify theme cart? I only have a token on theme and an ID in storefront. Any suggestions?  

Replies 2 (2)

AvadaCommerce
Shopify Partner
3879 840 1007

Hi @tiagob ,

 

May this guide will help you sync API and create a subscription on that : 

https://shopify.dev/api/examples/subscriptions#create-a-cart-and-a-subscription-line-item

 

I hope this helps.

banned

NBOliver
Shopify Partner
4 0 0

Themes use a cookie with the name `cart` and the value cart ID to access the cart. The cart ID is the same one that's used to query with the Storefront API.