Cart button rerouting

Topic summary

A user is trying to modify the “Continue Shopping” button on their Shopify cart page to redirect to the homepage instead of its current destination.

Proposed Solution:

  • Use the code: <a href="{{ routes.root_url }}" class="button">Continue Shopping</a>

Implementation Steps:

  1. Locate the relevant file (likely sections/main-cart.liquid, templates/cart.liquid, or snippets/cart.liquid depending on the theme)
  2. Find the existing “Continue Shopping” button code
  3. Replace the current button with the provided anchor tag, or insert it in the cart empty state section if no button exists

Status: A solution has been provided with specific code and file locations. The user needs to confirm if they require additional help locating the exact placement in their theme.

Summarized with AI on October 31. AI used: claude-sonnet-4-5-20250929.

How can I make this button on the “cart” screen link back to the main homepage?
I’m pretty sure this is the code, just not sure where to put it:

<a href=“{{ routes.root_url }}” class=“button”

Hey @shinkim1710 ,

Yes! You can modify the “Continue Shopping” button to link back to the homepage using:

Continue Shopping

Where to Place It:

  1. Find the Correct File:
  • If you’re using a Shopify Dawn (or a similar) theme, navigate to:

  • sections/main-cart.liquid

  • or templates/cart.liquid

  • If you’re unsure, check snippets/cart.liquid.

  1. Locate the Current Button
  1. Replace or Add the Code

Let me know if you need help finding the exact location in your theme!

If I was able to help you, please don’t forget to Like and mark it as the Solution!

Best Regard,
Rajat