To clear all items in the shopping cart on your Webflow site, there is no built-in “Reset Cart” feature, but there are a few workarounds using Webflow’s features and minimal custom code. Deleting the browser cache will not clear the cart, as Webflow eCommerce uses JavaScript and local/session storage to manage cart data.
Webflow does not provide a native cart reset button. However, you can simulate clearing the cart with custom JavaScript:
localStorage/sessionStorage, which Webflow uses for cart data.
Example:
id="clear-cart-btn".
Do not include this in raw <script> tags when pasting into Webflow embed blocks. Only the JavaScript body.
```javascript
<script>
document.getElementById('clear-cart-btn').addEventListener('click', function() {
window.Webflow.require('commerce').cart.clear().then(() => {
location.reload();
});
});
</script>
```
commerce.cart.clear() method to clear all items, then reloads the page.
You can also simulate clearing the cart by:
However, this only works after a purchase and not on active carts during browsing.
window.location.reload() or Webflow Page Link) will not clear the cart because cart data is persistent across sessions unless manually reset.
To fully clear a Webflow Shopping Cart, use a custom script calling commerce.cart.clear() tied to a custom button. Standard page reloads or cache clearing won’t empty the cart, and Webflow does not offer native cart-reset functionality.