'Return to cart' doesn't appear on web checkout form in Headless Shopify (Storefront API)

bhagya19
Tourist
11 0 8

Hi,

We have built a custom storefront using Storefront API which includes product catalog, details & cart. As per Shopify's recommendation for checkout, we forward the checkout request to web checkout form wherein the users perform the payment & order confirmation.

The issue is we don't have 'cart'/'return to cart' link in the web checkout form. When we use Shopify's out-of the-box storefront for cart & then redirect to checkout, we see the 'return to cart' link. Apparently the API approach is stopping the link from appearing.

Any idea/suggestions on how we can achieve it? We need 'return to cart' link in the web checkout form & on clicking the link, the user should be redirected back to the custom storefront.

Replies 3 (3)

klener811
Shopify Partner
3 0 2

Hi, this is a great question and I am also searching for an answer!
One idea (seen at https://takearecess.com) , but I dont know how to set it up with liquid is:

  • create a shopify store (only used for redirect, the real action is still in your storefront)
  • create a page in the shopify store that only serves the purpose to redirect to the checkout.
    • extract the checkout id parameter and other necessary information
    • redirect to that specific checkout
  • make all other pages except the checkout page redirect to your storefront
    • when the customer accesses the checkout page from within the shopify store through this redirect page, the "back to cart" should appear.
    • so when the customer clicks on "back to cart" he will be redirected to your storefront

But I don't know how to extract parameters from the URL and redirect internally to the cart with liquid.

Maybe you have an idea and the skills to do so?

Best
klener811

jaredkc
Shopify Partner
1 0 0

I am also looking into this. Did you ever find a solution?

klener811
Shopify Partner
3 0 2

Unfortunately I was still not able to solve this, as I don't have the Liquid skills to pull it off