Re: Abandoned cart flow with headless store issues

Abandoned cart flow with headless store issues

Algy
Visitor
3 0 1

Hello.
I have a Shopify store for which we are using a headless approach to build our frontend. In the past we were using a Shopify theme but we disabled it and password protected it when switching to headless.
We are still using the native checkout experience, by redirecting our users to the checkout URL provided by the API. The checkout URL is not on the domain where the frontend lives but on the Shopify theme domain. It looks something like `mystore.shopify.com/cart/c/{id}`. This redirects to /checkouts/ and works perfectly fine.
We are now encountering an issue with the abandoned checkout flow. We are using the Klaviyo integration to handle this, where Klaviyo automatically sends an email to prompt our customers to complete their checkout. The email contains a URL that should redirect the user to the checkout page with their items in the cart. Klaviyo is receiving this URL from Shopify itself, and it looks something like this: `mystore.shopify.com/{id}/checkouts/ac/{...}`. However, when navigating to this URL, Shopify redirects to `mystore.shopify.com/password`.
Is there a way to change what Shopify is providing to the integration and have it send the same checkout URL that we receive from the API? Or is the only solution to remove the password protection from the Shopify theme?

Replies 2 (2)

stage32
Visitor
2 0 0

We have a similar setup. Instead of password protecting the store, we have added some javascript inside of the main theme.liquid file which immediately redirects users to our custom storefront. This theme file is not loaded when viewing checkout so it does not effect this page.   

This is an example of our theme.liquid file

<html>
<head>
<script>
    window.location.replace(`https://www.example.com/`);      
</script>
...rest of the original theme 

 

Algy
Visitor
3 0 1

Thanks so much for the reply! This is what we did in the end. Although the headless approach needs so much customisation for any updates, we're considering gong back to using a theme…