mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-02 19:59:12 +00:00
fix(e-commerce): shopping cart total quantity (#29076)
* fix: shopping cart total quantity * fix: linter error
This commit is contained in:
committed by
marination
parent
45fadb5235
commit
49cdf9b7b0
@@ -23,7 +23,7 @@ def set_cart_count(quotation=None):
|
|||||||
if cint(frappe.db.get_singles_value("E Commerce Settings", "enabled")):
|
if cint(frappe.db.get_singles_value("E Commerce Settings", "enabled")):
|
||||||
if not quotation:
|
if not quotation:
|
||||||
quotation = _get_cart_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"):
|
if hasattr(frappe.local, "cookie_manager"):
|
||||||
frappe.local.cookie_manager.set_cookie("cart_count", cart_count)
|
frappe.local.cookie_manager.set_cookie("cart_count", cart_count)
|
||||||
|
|||||||
Reference in New Issue
Block a user