Shopping Cart error messages issue resolved
This commit is contained in:
parent
e00a20d99d
commit
1d79f350bc
@ -68,6 +68,10 @@ $.extend(shopping_cart, {
|
|||||||
|
|
||||||
if(parseInt(cart_count) === 0 || cart_count === undefined) {
|
if(parseInt(cart_count) === 0 || cart_count === undefined) {
|
||||||
$cart.css("display", "none");
|
$cart.css("display", "none");
|
||||||
|
$(".cart-items").html('Cart is Empty');
|
||||||
|
$(".cart-tax-items").hide();
|
||||||
|
$(".btn-place-order").hide();
|
||||||
|
$(".cart-addresses").hide();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$cart.css("display", "inline");
|
$cart.css("display", "inline");
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
"allow_import": 1,
|
"allow_import": 1,
|
||||||
"allow_rename": 0,
|
"allow_rename": 0,
|
||||||
"autoname": "naming_series:",
|
"autoname": "naming_series:",
|
||||||
|
"beta": 0,
|
||||||
"creation": "2013-05-24 19:29:08",
|
"creation": "2013-05-24 19:29:08",
|
||||||
"custom": 0,
|
"custom": 0,
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
@ -922,7 +923,7 @@
|
|||||||
"print_hide_if_no_value": 0,
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 1,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
"unique": 0,
|
"unique": 0,
|
||||||
@ -2131,7 +2132,7 @@
|
|||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 1,
|
"max_attachments": 1,
|
||||||
"menu_index": 0,
|
"menu_index": 0,
|
||||||
"modified": "2016-04-14 12:28:39.092593",
|
"modified": "2016-05-10 12:16:13.978635",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Selling",
|
"module": "Selling",
|
||||||
"name": "Quotation",
|
"name": "Quotation",
|
||||||
@ -2302,6 +2303,7 @@
|
|||||||
"write": 0
|
"write": 0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"quick_entry": 0,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"read_only_onload": 1,
|
"read_only_onload": 1,
|
||||||
"search_fields": "status,transaction_date,customer,lead,order_type",
|
"search_fields": "status,transaction_date,customer,lead,order_type",
|
||||||
|
@ -16,7 +16,6 @@ $.extend(shopping_cart, {
|
|||||||
shopping_cart.bind_address_select();
|
shopping_cart.bind_address_select();
|
||||||
shopping_cart.bind_place_order();
|
shopping_cart.bind_place_order();
|
||||||
shopping_cart.bind_change_qty();
|
shopping_cart.bind_change_qty();
|
||||||
shopping_cart.bind_remove_item();
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -63,7 +62,6 @@ $.extend(shopping_cart, {
|
|||||||
btn: this,
|
btn: this,
|
||||||
callback: function(r) {
|
callback: function(r) {
|
||||||
frappe.unfreeze();
|
frappe.unfreeze();
|
||||||
location.reload();
|
|
||||||
if(!r.exc) {
|
if(!r.exc) {
|
||||||
$(".cart-items").html(r.message.items);
|
$(".cart-items").html(r.message.items);
|
||||||
$(".cart-tax-items").html(r.message.taxes);
|
$(".cart-tax-items").html(r.message.taxes);
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{% from "erpnext/templates/includes/order/order_macros.html" import item_name_and_description %}
|
{% from "erpnext/templates/includes/order/order_macros.html" import item_name_and_description %}
|
||||||
|
|
||||||
{% for d in doc.items %}
|
{% 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">
|
<div class="col-sm-8 col-xs-6 col-name-description">
|
||||||
{{ item_name_and_description(d) }}
|
{{ item_name_and_description(d) }}
|
||||||
</div>
|
</div>
|
||||||
@ -18,7 +18,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</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">
|
<div class="col-sm-8 col-xs-8 col-name-description">
|
||||||
{{ item_name_and_description(d) }}
|
{{ item_name_and_description(d) }}
|
||||||
</div>
|
</div>
|
||||||
|
@ -22,9 +22,11 @@
|
|||||||
{% from "templates/includes/macros.html" import item_name_and_description %}
|
{% from "templates/includes/macros.html" import item_name_and_description %}
|
||||||
|
|
||||||
<div class="cart-container">
|
<div class="cart-container">
|
||||||
|
<div id="cart-container">
|
||||||
<div id="cart-error" class="alert alert-danger"
|
<div id="cart-error" class="alert alert-danger"
|
||||||
style="display: none;"></div>
|
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">
|
<div class="col-sm-8 col-xs-6 h6 text-uppercase">
|
||||||
{{ _("Item") }}
|
{{ _("Item") }}
|
||||||
</div>
|
</div>
|
||||||
@ -40,14 +42,14 @@
|
|||||||
{% include "templates/includes/cart/cart_items.html" %}
|
{% include "templates/includes/cart/cart_items.html" %}
|
||||||
</div>
|
</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
<p>{{ _("Cart is Empty") }}</p>
|
<p class="empty-cart">{{ _("Cart is Empty") }}</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
</div>
|
||||||
{% if doc.items %}
|
{% if doc.items %}
|
||||||
<!-- taxes -->
|
<!-- taxes -->
|
||||||
<div class="row cart-taxes">
|
<div class="row cart-taxes">
|
||||||
<div class="col-sm-6"><!-- empty --></div>
|
<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" %}
|
{% include "templates/includes/order/order_taxes.html" %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -71,6 +73,7 @@
|
|||||||
{{ _("Place Order") }}</button></p>
|
{{ _("Place Order") }}</button></p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- no-sidebar -->
|
<!-- no-sidebar -->
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
Loading…
Reference in New Issue
Block a user