Is there a way to add a button to the cart page that would clear/empty the cart so that you dont have to click the X one by one on each item you want to remove from the cart? This is for the Empire theme. Attached is a screenshot of the cart page. Thank you for your help.
Topic summary
Request to add a single-click button to empty the cart on the Empire theme cart page.
- Solution: A simple code snippet was shared that creates an “Empty cart” button/link. It can be added via the theme’s “Custom liquid” block/section.
- Implementation: Paste the provided code into a Custom liquid block in the Theme Customizer. If the theme lacks this block, the alternative is to edit the cart section/template directly, which varies by theme and may require theme-specific adjustments.
- Outcome: The original poster confirmed the snippet worked and successfully added the button.
- Additional questions: Another participant asked where to insert the code; guidance reiterated to use the Custom liquid block or, if unavailable, edit the cart section code.
- Assets: A screenshot of the cart page was attached but not essential to the solution.
Status: Resolved for the original request; general guidance provided for others depending on theme capabilities.
If your theme gives you “Custom liquid” block/section, you can use the following code:
Empty cart
2 Likes
That did work, thank you. @tim_1
Where do I insert this code @tim_1 .
Thanks
If your theme has “Custom liquid” section/block, you can use it and paste the code there in theme Customizer.
Otherwise you’d need to edit cart section code, but it’s different for each theme.
1 Like
