Redirect after click on "go to checkout"

Topic summary

Multiple Shopify stores are experiencing a critical issue where customers clicking “go to checkout” are being redirected to incorrect pages (often the homepage) instead of the checkout page. The problem appears widespread and affects even Shopify Plus stores.

Proposed Solution:
One developer suggested modifying the ajax-cart-template.liquid file by replacing the checkout button code with a direct cart link. The fix involves changing from a submit button to an anchor tag pointing to /cart.

Possible Cause:
The issue may stem from scripts not loading properly. A suggested workaround includes using setTimeout in JavaScript to ensure proper script execution before layout rendering.

Current Status:
The discussion remains open with no confirmed resolution. The original poster forwarded the suggested code to their development team for testing. A later participant reported experiencing the identical problem, indicating the issue persists across multiple stores. Hotjar session recordings have been used to document the redirect behavior.

Summarized with AI on November 3. AI used: claude-sonnet-4-5-20250929.

hello everyone - we are facing massive problems with customers getting redirected somewhere else rather than the checkout after click on “go to checkout”. I see there are a few other shops with this problem. Shopify is NOT being a great help eventhough we are a shopify plus store. We have been tracking sessions on hotjar as well.

Can anyone tell us what the solution might be?

Store: www.thedarktenor.com/tickets

Hello @BillyAndrews

I think You wan’t this type code if you don’t mind to apply this code on your store and then check

Go to Themes > Action > Edit code. Then open the “ajax-cart-template.liquid” file, and replace :

{% endraw %}{{ 'cart.general.checkout' | t }}{% raw %}

with the following :

{% endraw %}VIEW CART{% raw %}

hi @AK_Design_Dev - thank you for your quick reply. I have forwarded this to my devs. As soon as they test it i´ll get back to you. Can you explain why this snippet will be better? Do you know why out of nowhere suddenly our cart slider and its button redirect the customer away instead of to the checkout?

Hi @BillyAndrews - I think Your script are not properly reloaded or You can also the use in script setTimeout to without script load you layout are not open

hi @AK_Design_Dev - thanks! i´ll forward this information as well! This problem seems to have hit a few stores out there!

1 Like

Hello! I know it’s a bit old topic but did that fix for you? I’m facing the exact same problem, most of my customers can’t go to checkout. Hotjar is showing they click on “go to checkout” and they are just redirect to home page instead.