Shopify themes, liquid, logos, and UX
Does anyone have a code example to add an "empty the cart" or "clear the cart"-button to the Dawn theme, so that one can delete all items with one click.
I know Apps exists, but using several apps already I rather find a code solution.
Thanks,
Karin
Solved! Go to the solution
This is an accepted solution.
Hello @karinorage ,
Use this
<a href="/cart/clear">Clear cart</a>
Thanks
This is an accepted solution.
Hello @karinorage ,
Use this
<a href="/cart/clear">Clear cart</a>
Thanks
Thank you, Guleria.
That was quick and simple 👍
Hi,
I have the same issue on the "refresh" theme. Would this work there also, and where whould I paste it?
thanks
I think it would, Refresh is a Shopify theme, based on Dawn. I see in the demo it uses a drawer, so you might want look into the cart-drawer.liquid to add the
<a href="/cart/clear">Clear cart</a>
in to.
tx for responding, but it dit not work putting it into cart-drawer.liquid.
I tried like this
and like this:
You must not put it in the section cart-drawer.liquid, but in the snippet: cart-drawer.liquid
Hi,
I managed to get the button on the main overview for the cart by pasting it on line 29 in main-cart-items.liquid
However for the side bar there is no effect. That's the most important place to have it I think
You must not put it in the section cart-drawer.liquid, but in the snippet cart-drawer.liquid
Ahh I see, and if I want it just above the ckeckout button, where would I put it?
on point! Thanks
Hey Community! As we jump into 2025, we want to give a big shout-out to all of you wh...
By JasonH Jan 7, 2025Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024