fix(e-commerce): shopping cart total quantity (#29076)

* fix: shopping cart total quantity

* fix: linter error
This commit is contained in:
Devin Slauenwhite
2021-12-31 09:58:00 -05:00
committed by GitHub
parent 79d126f5d0
commit 2602fc633b
2 changed files with 2 additions and 2 deletions

View File

@@ -24,7 +24,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)

View File

@@ -4,7 +4,7 @@
import frappe
from frappe import _
from frappe.utils import add_days, add_months, cint, date_diff, flt, get_datetime, getdate
from frappe.utils import add_days, cint, date_diff, flt, get_datetime, getdate
from six import iteritems
import erpnext