From 49cdf9b7b023f29aec83a7586b9000c9a58e9cad Mon Sep 17 00:00:00 2001 From: Devin Slauenwhite Date: Fri, 31 Dec 2021 09:58:00 -0500 Subject: [PATCH] fix(e-commerce): shopping cart total quantity (#29076) * fix: shopping cart total quantity * fix: linter error --- erpnext/e_commerce/shopping_cart/cart.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/e_commerce/shopping_cart/cart.py b/erpnext/e_commerce/shopping_cart/cart.py index a8c9b8ef741..ee47e643d0e 100644 --- a/erpnext/e_commerce/shopping_cart/cart.py +++ b/erpnext/e_commerce/shopping_cart/cart.py @@ -23,7 +23,7 @@ def set_cart_count(quotation=None): if cint(frappe.db.get_singles_value("E Commerce Settings", "enabled")): if not quotation: quotation = _get_cart_quotation() - cart_count = cstr(len(quotation.get("items"))) + cart_count = cstr(cint(quotation.get("total_qty"))) if hasattr(frappe.local, "cookie_manager"): frappe.local.cookie_manager.set_cookie("cart_count", cart_count)