How can I create a cart permalink that retains existing selections?

biznazz101
Shopify Partner
494 50 89

Hello, I have a question regarding Cart Permalinks.

Is there a way to create a permalink which when clicked returns the customer to their existing cart? (with their previously selected items in it still, if they chose any prior to clicking permalink)

I have read the documentation and used every variation of permalinks I am aware of including these but they all clear the cart before adding the product:

https://my-shop-name.myshopify.com/cart/36485954240671:1
https://my-shop-name.myshopify.com/cart/36485954240671:1?storefront=true

I do know it's possible as I have seen it in many Shopify stores, but I am not sure where I am going wrong.

Any help is appreciated thank you!

Don't hesitate to reach out for more help with your store.
SEE OUR TASK STORE or check us out via our profile! FREE STORE AUDIT
Replies 2 (2)
biznazz101
Shopify Partner
494 50 89

I see, thank you for your response! Do you mind taking a look at this? Any idea how they are making this happen? In particular, the donation feature that is shown when an item is in cart.

https://mssignature.myshopify.com/cart

Are they basically Add To Cart buttons that have been added to the cart page somehow then?
Thanks again!

Don't hesitate to reach out for more help with your store.
SEE OUR TASK STORE or check us out via our profile! FREE STORE AUDIT

jam_chan
Shopify Partner
901 23 175

You can use the cart API to get the existing cart items. After that, construct the permalink with the data. Just ask chatgpt to generate the js code

BYOB - Build Your Own Bundles, SPO - SEO App to research keywords & edit social link preview