Shopify themes, liquid, logos, and UX
When the cart is empty and you click on the "continue shopping" it currently takes you to the collections page which shows all of our products. How can I change the URL that button directs users to? As that page shows products not meant for the public, so I want to take them to a certain product instead
Thanks for your help
Joe
Solved! Go to the solution
This is an accepted solution.
Hi @mrjoemorgan,
You can make this change by adjusting your theme's code. Before doing so, I do suggest trying this out in a duplicate version of your theme, just to be on the safe side.
1. From your Shopify admin, go to Online Store > Themes.
2. Find the theme you want to edit, and then click Actions > Edit code.
3. In the Sections directory, click main-cart-items.liquid.
4. Look for the “continue shopping” code. If you're having trouble finding it, you can hit CTRL + F or CMD + F if you're on a Mac and type in "continue" to find the code.
5. Replace {{ routes.all_products_collection_url }} with the URL that you want it to redirect to.
I hope this answer helps.
Hello @mrjoemorgan
Where do you want to redirect that "continue shopping" link?
This is an accepted solution.
Hi @mrjoemorgan,
You can make this change by adjusting your theme's code. Before doing so, I do suggest trying this out in a duplicate version of your theme, just to be on the safe side.
1. From your Shopify admin, go to Online Store > Themes.
2. Find the theme you want to edit, and then click Actions > Edit code.
3. In the Sections directory, click main-cart-items.liquid.
4. Look for the “continue shopping” code. If you're having trouble finding it, you can hit CTRL + F or CMD + F if you're on a Mac and type in "continue" to find the code.
5. Replace {{ routes.all_products_collection_url }} with the URL that you want it to redirect to.
I hope this answer helps.
Thank you so much for your help.
Are you ready to take your business to the next level? Look no further than the latest ...
By SarahF_Shopify Apr 15, 2024We’re keeping the ball rolling to make sure you’re always ahead of the game. So buckle ...
By JasonH Apr 8, 2024Portrait of Stephen positioned next to an image of planet Earth, with the Stephen's World ...
By JasonH Mar 18, 2024