Skip to content

Commit 3a949bb

Browse files
fix: item group not disaplying in the website if shopping cart is disabled
1 parent 714d686 commit 3a949bb

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

erpnext/setup/doctype/item_group/item_group.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def get_context(self, context):
7070
limit=context.page_length + 1, search=frappe.form_dict.get("search")),
7171
"parents": get_parent_item_groups(self.parent_item_group),
7272
"title": self.name,
73-
"products_as_list": cint(frappe.db.get_single_value('Website Settings', 'products_as_list'))
73+
"products_as_list": cint(frappe.db.get_single_value('Products Settings', 'products_as_list'))
7474
})
7575

7676
if self.slideshow:
@@ -114,8 +114,9 @@ def get_product_list_for_group(product_group=None, start=0, limit=10, search=Non
114114
data = frappe.db.sql(query, {"product_group": product_group,"search": search, "today": nowdate()}, as_dict=1)
115115
data = adjust_qty_for_expired_items(data)
116116

117-
for item in data:
118-
set_product_info_for_website(item)
117+
if cint(frappe.db.get_single_value("Shopping Cart Settings", "enabled")):
118+
for item in data:
119+
set_product_info_for_website(item)
119120

120121
return [get_item_for_list_in_html(r) for r in data]
121122

0 commit comments

Comments
 (0)