Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
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?
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
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…
Hey Community! As we jump into 2025, we want to give a big shout-out to all of you wh...
By JasonH Jan 7, 2025Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024