Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Add ability to clear cart

Adam Bogdal2ad16c44adb2
diff --git a/saleor/cart/__init__.py b/saleor/cart/__init__.py
index 097bf23ba3..9b26604240 100755
--- a/saleor/cart/__init__.py
+++ b/saleor/cart/__init__.py
@@ -48,3 +48,6 @@ class Cart(cart.Cart):
return pgettext(
'Shopping cart',
'Your cart (%(cart_count)s)') % {'cart_count': self.count()}
+
+ def clear(self):
+ self._state = []