feat: shopping portal changes (#24445)
* feat: shopping portal changes
* fix: review changes
* review changes
diff --git a/erpnext/shopping_cart/cart.py b/erpnext/shopping_cart/cart.py
index c2549fe..c2d743b 100644
--- a/erpnext/shopping_cart/cart.py
+++ b/erpnext/shopping_cart/cart.py
@@ -180,6 +180,13 @@
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 3033d15..876eaea 100644
--- a/erpnext/templates/pages/cart.html
+++ b/erpnext/templates/pages/cart.html
@@ -47,6 +47,9 @@
{% if doc.items %}
<div class="place-order-container">
+ <a class="btn btn-primary-light mr-2" href="/all-products">
+ {{ _("Continue Shopping") }}
+ </a>
{% if cart_settings.enable_checkout %}
<button class="btn btn-primary btn-place-order" type="button">
{{ _("Place Order") }}