Merge pull request #5329 from KanchanChauhan/shoppingcart-cleanup
Shopping Cart error messages issue resolved
This commit is contained in:
commit
a3f20ae9e6
@ -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,54 +22,57 @@
|
|||||||
{% 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-error" class="alert alert-danger"
|
<div id="cart-container">
|
||||||
style="display: none;"></div>
|
<div id="cart-error" class="alert alert-danger"
|
||||||
<div class="row cart-items cart-item-header text-muted">
|
style="display: none;"></div>
|
||||||
<div class="col-sm-8 col-xs-6 h6 text-uppercase">
|
<div id="cart-items">
|
||||||
{{ _("Item") }}
|
<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>
|
||||||
<div class="col-sm-2 col-xs-3 text-right h6 text-uppercase">
|
{% if doc.items %}
|
||||||
{{ _("Qty") }}
|
<!-- 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>
|
||||||
<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 %}
|
{% if doc.tc_name %}
|
||||||
<!-- taxes -->
|
<div class="cart-terms" style="display: none;" title={{doc.tc_name}}>
|
||||||
<div class="row cart-taxes">
|
{{doc.tc_name}}
|
||||||
<div class="col-sm-6"><!-- empty --></div>
|
{{doc.terms}}
|
||||||
<div class="col-sm-6 text-right">
|
</div>
|
||||||
{% include "templates/includes/order/order_taxes.html" %}
|
<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>
|
</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>
|
</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>
|
</div>
|
||||||
|
|
||||||
<!-- no-sidebar -->
|
<!-- no-sidebar -->
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user