Shopping Cart error messages issue resolved

This commit is contained in:
Kanchan Chauhan 2016-05-10 17:19:47 +05:30
parent e00a20d99d
commit 1d79f350bc
5 changed files with 56 additions and 49 deletions

View File

@ -68,6 +68,10 @@ $.extend(shopping_cart, {
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");

View File

@ -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",

View File

@ -16,7 +16,6 @@ $.extend(shopping_cart, {
shopping_cart.bind_address_select();
shopping_cart.bind_place_order();
shopping_cart.bind_change_qty();
shopping_cart.bind_remove_item();
},
@ -63,7 +62,6 @@ $.extend(shopping_cart, {
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);

View File

@ -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>

View File

@ -22,9 +22,11 @@
{% from "templates/includes/macros.html" import item_name_and_description %}
<div class="cart-container">
<div id="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 id="cart-items">
<div class="row cart-item-header text-muted">
<div class="col-sm-8 col-xs-6 h6 text-uppercase">
{{ _("Item") }}
</div>
@ -40,14 +42,14 @@
{% include "templates/includes/cart/cart_items.html" %}
</div>
{% else %}
<p>{{ _("Cart is Empty") }}</p>
<p class="empty-cart">{{ _("Cart is Empty") }}</p>
{% endif %}
</div>
{% if doc.items %}
<!-- taxes -->
<div class="row cart-taxes">
<div class="col-sm-6"><!-- empty --></div>
<div class="col-sm-6 text-right">
<div class="col-sm-6 text-right cart-tax-items">
{% include "templates/includes/order/order_taxes.html" %}
</div>
</div>
@ -71,6 +73,7 @@
{{ _("Place Order") }}</button></p>
{% endif %}
</div>
</div>
<!-- no-sidebar -->
{% endblock %}