Add Clear Cart Button On Cart - Trade Theme

Topic summary

A user wants to add a “Clear Cart” button to their Trade Theme store, allowing customers to empty their cart with one click instead of deleting items individually.

Solution provided:

  • Use Shopify’s clear endpoint: /cart/clear (e.g., store.myshopify.com/cart/clear)
  • Alternatively, implement via JavaScript using Shopify’s AJAX Cart API
  • For Dawn-based themes, buttons can be added to main-cart-items

Implementation considerations:

  • Button placement is critical for user experience
  • Should be positioned near cart items but away from checkout buttons and other call-to-action elements
  • Exact implementation varies by theme

Additional help:
The responder offers customization services via email or private message for those needing further assistance with implementation details.

Summarized with AI on November 6. AI used: claude-sonnet-4-5-20250929.

I am trying to add a button or link in the cart that will allow the customer to clear the cart with one click instead of clicking the trash can by each item. Is this possible with Trade Theme?

@svandervort yes possible, use the clear endpoint either in a link or a button

/cart/clear , i.e. Please Log In

or with javacript

https://shopify.dev/docs/api/ajax/reference/cart#post-locale-cart-clear-js

Exact implementation details vary by theme, for example in themes based on Dawn buttons could be added to main-cart-items.

:warning: UX: when doing this think through selecting the position possibly near all the items, while also not being anywhere near the checkout buttons or other call to actions.

If you need this customization then contact me by my email for services, or if you have access private message by clicking here (sloooower).
Contact info in forum signature.
ALWAYS please provide context, examples: store url, theme name, post url(s) , or any further detail in ALL correspondence.