# Cart : add "empty cart" button

**URL:** <https://forum.modmore.com/t/cart-add-empty-cart-button/2263>\
**Category:** Commerce\
**Created:** [July 17, 2021, 8:12am UTC](https://forum.modmore.com/t/cart-add-empty-cart-button/2263 "2021-07-17T08:12:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![shashin](https://forum.modmore.com/letter_avatar_proxy/v4/letter/s/46a35a/32.png) [@shashin](https://forum.modmore.com/u/shashin)\
**Post date:** [July 17, 2021, 8:12am UTC](https://forum.modmore.com/t/cart-add-empty-cart-button/2263/1 "2021-07-17T08:12:41Z")

</div>

How can I add a “remove all cart items” buttons ?

---

<div class="post-metadata">

**Author:** ![mhamstra](https://forum.modmore.com/user_avatar/forum.modmore.com/mhamstra/32/459_2.png) [@mhamstra](https://forum.modmore.com/u/mhamstra)\
**Post date:** [July 20, 2021, 11:14am UTC](https://forum.modmore.com/t/cart-add-empty-cart-button/2263/2 "2021-07-20T11:14:15Z")

</div>

There’s not currently such a feature built in, so I’ve logged a feature request.

There’s a `$order->forgetOrderId()` method that will make the browser forget the order it was using (essentially resetting it entirely - although it may still exist in the database) which is probably the most thorough reset. Alternatively iterating over the items and calling `$order->removeItem($item)` for each one would just remove items while keeping addresses and such.
