Merge pull request #5329 from KanchanChauhan/shoppingcart-cleanup

Shopping Cart error messages issue resolved
diff --git a/erpnext/public/js/shopping_cart.js b/erpnext/public/js/shopping_cart.js
index 9d16c62..40f5b98 100644
--- a/erpnext/public/js/shopping_cart.js
+++ b/erpnext/public/js/shopping_cart.js
@@ -68,6 +68,10 @@
 
 		if(parseInt(cart_count) === 0 || cart_count === undefined) {
 			$cart.css("display", "none");
+			$(".cart-items").html('Cart is Empty');
+			$(".cart-tax-items").hide();
+			$(".btn-place-order").hide();
+			$(".cart-addresses").hide();
 		}
 		else {
 			$cart.css("display", "inline");
diff --git a/erpnext/selling/doctype/quotation/quotation.json b/erpnext/selling/doctype/quotation/quotation.json
index 123686d..037f1e8 100644
--- a/erpnext/selling/doctype/quotation/quotation.json
+++ b/erpnext/selling/doctype/quotation/quotation.json
@@ -3,6 +3,7 @@
  "allow_import": 1, 
  "allow_rename": 0, 
  "autoname": "naming_series:", 
+ "beta": 0, 
  "creation": "2013-05-24 19:29:08", 
  "custom": 0, 
  "docstatus": 0, 
@@ -922,7 +923,7 @@
    "print_hide_if_no_value": 0, 
    "read_only": 0, 
    "report_hide": 0, 
-   "reqd": 1, 
+   "reqd": 0, 
    "search_index": 0, 
    "set_only_once": 0, 
    "unique": 0, 
@@ -2131,7 +2132,7 @@
  "istable": 0, 
  "max_attachments": 1, 
  "menu_index": 0, 
- "modified": "2016-04-14 12:28:39.092593", 
+ "modified": "2016-05-10 12:16:13.978635", 
  "modified_by": "Administrator", 
  "module": "Selling", 
  "name": "Quotation", 
@@ -2302,6 +2303,7 @@
    "write": 0
   }
  ], 
+ "quick_entry": 0, 
  "read_only": 0, 
  "read_only_onload": 1, 
  "search_fields": "status,transaction_date,customer,lead,order_type", 
diff --git a/erpnext/templates/includes/cart.js b/erpnext/templates/includes/cart.js
index 2a6570f..d56721d 100644
--- a/erpnext/templates/includes/cart.js
+++ b/erpnext/templates/includes/cart.js
@@ -16,7 +16,6 @@
 		shopping_cart.bind_address_select();
 		shopping_cart.bind_place_order();
 		shopping_cart.bind_change_qty();
-		shopping_cart.bind_remove_item();
 
 	},
 
@@ -63,7 +62,6 @@
 				btn: this,
 				callback: function(r) {
 					frappe.unfreeze();
-					location.reload();
 					if(!r.exc) {
 						$(".cart-items").html(r.message.items);
 						$(".cart-tax-items").html(r.message.taxes);
diff --git a/erpnext/templates/includes/cart/cart_items.html b/erpnext/templates/includes/cart/cart_items.html
index 1445e21..976467d 100644
--- a/erpnext/templates/includes/cart/cart_items.html
+++ b/erpnext/templates/includes/cart/cart_items.html
@@ -1,7 +1,7 @@
 {% from "erpnext/templates/includes/order/order_macros.html" import item_name_and_description %}
 
 {% for d in doc.items %}
-<div class="row cart-items checkout">
+<div class="row checkout">
     <div class="col-sm-8 col-xs-6 col-name-description">
         {{ item_name_and_description(d) }}
     </div>
@@ -18,7 +18,7 @@
     </div>
 </div>
 
-<div class="row cart-items cart-dropdown">
+<div class="row cart-dropdown">
     <div class="col-sm-8 col-xs-8 col-name-description">
         {{ item_name_and_description(d) }}
     </div>
diff --git a/erpnext/templates/pages/cart.html b/erpnext/templates/pages/cart.html
index 229d6d6..7d8d0ff 100644
--- a/erpnext/templates/pages/cart.html
+++ b/erpnext/templates/pages/cart.html
@@ -22,54 +22,57 @@
 {% from "templates/includes/macros.html" import item_name_and_description %}
 
 <div class="cart-container">
-	<div id="cart-error" class="alert alert-danger"
-	style="display: none;"></div>
-	<div class="row cart-items cart-item-header text-muted">
-		<div class="col-sm-8 col-xs-6 h6 text-uppercase">
-		{{ _("Item") }}
+	<div id="cart-container">
+			<div id="cart-error" class="alert alert-danger"
+		style="display: none;"></div>
+		<div id="cart-items">
+			<div class="row cart-item-header text-muted">
+				<div class="col-sm-8 col-xs-6 h6 text-uppercase">
+				{{ _("Item") }}
+				</div>
+				<div class="col-sm-2 col-xs-3 text-right h6 text-uppercase">
+				{{ _("Qty") }}
+				</div>
+				<div class="col-sm-2 col-xs-3 text-right h6 text-uppercase">
+				{{ _("Subtotal") }}
+				</div>
+			</div>
+			{% if doc.items %}
+				<div class="cart-items">
+					{% include "templates/includes/cart/cart_items.html" %}
+				</div>
+			{% else %}
+				<p class="empty-cart">{{ _("Cart is Empty") }}</p>
+			{% endif %}
 		</div>
-		<div class="col-sm-2 col-xs-3 text-right h6 text-uppercase">
-		{{ _("Qty") }}
+		{% if doc.items %}
+		<!-- taxes -->
+		<div class="row cart-taxes">
+			<div class="col-sm-6"><!-- empty --></div>
+			<div class="col-sm-6 text-right cart-tax-items">
+			{% include "templates/includes/order/order_taxes.html" %}
+			</div>
 		</div>
-		<div class="col-sm-2 col-xs-3 text-right h6 text-uppercase">
-		{{ _("Subtotal") }}
-		</div>
-	</div>
-	{% if doc.items %}
-	<div class="cart-items">
-		{% include "templates/includes/cart/cart_items.html" %}
-	</div>
-	{% else %}
-	<p>{{ _("Cart is Empty") }}</p>
-	{% endif %}
 
-	{% if doc.items %}
-	<!-- taxes -->
-	<div class="row cart-taxes">
-		<div class="col-sm-6"><!-- empty --></div>
-		<div class="col-sm-6 text-right">
-		{% include "templates/includes/order/order_taxes.html" %}
+		{% if doc.tc_name %}
+			<div class="cart-terms" style="display: none;" title={{doc.tc_name}}>
+				{{doc.tc_name}}
+				{{doc.terms}}
+			</div>
+			<div class="cart-link">
+				<a href="#" onclick="show_terms();return false;">*Terms and Conditions</a>
+			</div>
+		{% endif %}
+
+		<div class="cart-addresses">
+		{% include "templates/includes/cart/cart_address.html" %}
 		</div>
+
+		<p class="cart-footer text-right">
+		<button class="btn btn-primary btn-place-order btn-sm" type="button">
+		{{ _("Place Order") }}</button></p>
+		{% endif %}
 	</div>
-
-	{% if doc.tc_name %}
-		<div class="cart-terms" style="display: none;" title={{doc.tc_name}}>
-			{{doc.tc_name}}
-			{{doc.terms}}
-		</div>
-		<div class="cart-link">
-			<a href="#" onclick="show_terms();return false;">*Terms and Conditions</a>
-		</div>
-	{% endif %}
-
-	<div class="cart-addresses">
-	{% include "templates/includes/cart/cart_address.html" %}
-	</div>
-
-	<p class="cart-footer text-right">
-	<button class="btn btn-primary btn-place-order btn-sm" type="button">
-	{{ _("Place Order") }}</button></p>
-	{% endif %}
 </div>
 
 <!-- no-sidebar -->