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

bhagya19
Tourist
11 0 5

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.

Reply 1 (1)
klener811
New Member
2 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