mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-15 11:09:17 +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
GitHub
parent
79d126f5d0
commit
2602fc633b
@@ -24,7 +24,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)
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
import frappe
|
import frappe
|
||||||
from frappe import _
|
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
|
from six import iteritems
|
||||||
|
|
||||||
import erpnext
|
import erpnext
|
||||||
|
|||||||
Reference in New Issue
Block a user