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…
As 2024 wraps up, the dropshipping landscape is already shifting towards 2025's trends....
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024In today’s interview, we sat down with @BSS-Commerce to discuss practical strategies f...
By JasonH Nov 13, 2024