try to fix #997 ,when cart is disabled, it will not show error and it will dedirect to 'contact' page (#8636)
diff --git a/erpnext/shopping_cart/cart.py b/erpnext/shopping_cart/cart.py
index 61ec78c..66e9f4c 100644
--- a/erpnext/shopping_cart/cart.py
+++ b/erpnext/shopping_cart/cart.py
@@ -315,7 +315,8 @@
else:
if not cart_settings.enabled:
- return None
+ frappe.local.flags.redirect_location = "/contact"
+ raise frappe.Redirect
customer = frappe.new_doc("Customer")
fullname = get_fullname(user)
customer.update({