From 988ea8d61d657f3d86f82afe4d2af10bb3838996 Mon Sep 17 00:00:00 2001 From: Anupam Date: Fri, 22 Jan 2021 10:45:34 +0530 Subject: [PATCH] feat: shopping portal changes --- erpnext/shopping_cart/cart.py | 7 +++++++ erpnext/templates/pages/cart.html | 3 +++ 2 files changed, 10 insertions(+) diff --git a/erpnext/shopping_cart/cart.py b/erpnext/shopping_cart/cart.py index c2549fe7dd..c2d743b2a9 100644 --- a/erpnext/shopping_cart/cart.py +++ b/erpnext/shopping_cart/cart.py @@ -180,6 +180,13 @@ def create_lead_for_item_inquiry(lead, subject, message): lead_doc.update(lead) lead_doc.set('lead_owner', '') + if not frappe.db.exists('Lead Source', 'Product Inquiry'): + frappe.get_doc({ + 'doctype': 'Lead Source', + 'source_name' : 'Product Inquiry' + }).insert(ignore_permissions=True) + lead_doc.set('source', 'Product Inquiry') + try: lead_doc.save(ignore_permissions=True) except frappe.exceptions.DuplicateEntryError: diff --git a/erpnext/templates/pages/cart.html b/erpnext/templates/pages/cart.html index 3033d1587d..c06a790da3 100644 --- a/erpnext/templates/pages/cart.html +++ b/erpnext/templates/pages/cart.html @@ -47,6 +47,9 @@ {% if doc.items %}
+ + {{ _("Add More") }} + {% if cart_settings.enable_checkout %}