Ahh I see, and if I want it just above the ckeckout button, where would I put it?
Topic summary
A user seeks code to add a “clear cart” button to Shopify’s Dawn theme without using third-party apps.
Solution Provided:
Another user shares a simple code snippet:
<a href="/cart/clear">Clear cart</a>
Implementation Details:
- For Dawn theme: Add the code to the cart-drawer.liquid snippet (not the section file)
- For Refresh theme (Dawn-based): Successfully placed on line 29 of main-cart-items.liquid for the main cart page
- The drawer/sidebar cart requires placement in the snippet file specifically
Key Points:
- The solution works across Dawn-based themes
- Placement location matters: snippets vs. section files produce different results
- One user confirms the code worked quickly and simply
- Discussion includes troubleshooting for proper button positioning, particularly above the checkout button in the cart drawer
