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”
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:
<a href="{{ routes.root_url }}" class="button">Continue Shopping</a>Implementation Steps:
sections/main-cart.liquid, templates/cart.liquid, or snippets/cart.liquid depending on the theme)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.
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:
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.
If a button already exists, replace it with the above tag.
If not, insert the tag inside the cart empty state section.
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