Shopify themes, liquid, logos, and UX
Hi everyone,
Hope you're all doing well. I'm trying to make the "Continue Shopping" simply close the Cart Drawer, not going to the "All products" page. If only you could help me with this.
Here is the code for the button
<a href="javascript:location.reload();" class="underlined-link">Continue shopping</a>
I also attach the picture so you could easily consider the situation
Thank you very much! I'm looking forward to hearing from you soon.
Solved! Go to the solution
This is an accepted solution.
Hi @DK7,
Please change code:
<a href="javascript:location.reload();" class="underlined-link">Continue shopping</a>
=>
<a class="underlined-link" onclick="toggleCart();" style="cursor: pointer;">Continue shopping</a>
Hope it helps!
Hi @DK7,
Please change:
javascript:location.reload();
=>
javascript:void(0)
Hope it helps!
Hi @LitCommerce ,
Thank you for your response. I tried the code but I did nothing when I clicked on the button. I'm looking for another code.
Hope you're doing well. Thank you very much!
This is an accepted solution.
Hi @DK7,
Please change code:
<a href="javascript:location.reload();" class="underlined-link">Continue shopping</a>
=>
<a class="underlined-link" onclick="toggleCart();" style="cursor: pointer;">Continue shopping</a>
Hope it helps!
Hi @LitCommerce ,
Your code did its work really well. Thank you so much! Wish you all the best!
Hi, this is exactly what I'm trying to achieve as well, can I ask where you added the above code? I can't seem to find a liquid file for the cart drawer, just for the main full screen cart. Thanks!
Never mind, found the liquid file! I've tried both solutions mentioned above, but neither of these close the drawer when you click them. Any ideas what the issue might be?
Thanks.
<a onclick="toggleCart();" class="btn">Continue shopping</a>
<a href="javascript:void(0)" class="underlined-link">Continue shopping</a>
I've tried both solutions mentioned above, but neither of these close the drawer when you click them. Any ideas what the issue might be?
Thanks.
<a onclick="toggleCart();" class="btn">Continue shopping</a>
<a href="javascript:void(0)" class="underlined-link">Continue shopping</a>
Hi @bamboom,
You can create a question on the community and send me the link. I will check it.
Because this will help build a better community.
Thank you.
Hello i have the same problem, but my code for the button is looking different and i already pasted your code in but nothing changed (i am a beginner). What can i do?
Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025Discover opportunities to improve SEO with new guidance available from Shopify’s growth...
By Jacqui May 1, 2025