diff --git a/erpnext/public/js/shopping_cart.js b/erpnext/public/js/shopping_cart.js index 63231d96d64..ddb64fe8cad 100644 --- a/erpnext/public/js/shopping_cart.js +++ b/erpnext/public/js/shopping_cart.js @@ -33,10 +33,9 @@ $.extend(shopping_cart, { }, btn: opts.btn, callback: function(r) { + shopping_cart.set_cart_count(); if(opts.callback) opts.callback(r); - - shopping_cart.set_cart_count(); } }); } @@ -56,10 +55,6 @@ $.extend(shopping_cart, { if(cart_count) { - // if($badge.length === 0) { -// var $badge = $('') -// .appendTo($cart.find("a").addClass("badge-hover")); -// } $badge.html(cart_count); } else { $badge.remove(); diff --git a/erpnext/selling/doctype/sales_order/sales_order.js b/erpnext/selling/doctype/sales_order/sales_order.js index a6ec6176469..74b52027c54 100644 --- a/erpnext/selling/doctype/sales_order/sales_order.js +++ b/erpnext/selling/doctype/sales_order/sales_order.js @@ -54,7 +54,7 @@ erpnext.selling.SalesOrderController = erpnext.selling.SellingController.extend( // delivery note if(flt(doc.per_delivered, 2) < 100 && ["Sales", "Shopping Cart"].indexOf(doc.order_type)!==-1 && allow_delivery) { cur_frm.add_custom_button(__('Delivery'), this.make_delivery_note, __("Make")); - cur_frm.page.set_inner_btn_group_as_primary(__("Make")); + // cur_frm.page.set_inner_btn_group_as_primary(__("Make")); } // sales invoice diff --git a/erpnext/templates/generators/item.html b/erpnext/templates/generators/item.html index b62f30640a3..34d345fd2f1 100644 --- a/erpnext/templates/generators/item.html +++ b/erpnext/templates/generators/item.html @@ -71,8 +71,7 @@ style="display: none; padding-left: 0px; padding-right: 0px; padding-top: 10px;"> -
- {{ _("Item added to cart") }}
+ {{ _("Goto Cart") }} diff --git a/erpnext/templates/includes/cart.js b/erpnext/templates/includes/cart.js index e413f0b2e99..0c29569b9e2 100644 --- a/erpnext/templates/includes/cart.js +++ b/erpnext/templates/includes/cart.js @@ -65,11 +65,11 @@ $.extend(shopping_cart, { if(!r.exc) { $(".cart-items").html(r.message.items); $(".cart-tax-items").html(r.message.taxes); + $(".cart-icon").hide(); } }, }); }); - }, render_tax_row: function($cart_taxes, doc, shipping_rules) { @@ -144,5 +144,6 @@ $.extend(shopping_cart, { }); $(document).ready(function() { + $(".cart-icon").hide(); shopping_cart.bind_events(); }); diff --git a/erpnext/templates/includes/product_page.js b/erpnext/templates/includes/product_page.js index 0a38c23f9b4..f4d90279c5d 100644 --- a/erpnext/templates/includes/product_page.js +++ b/erpnext/templates/includes/product_page.js @@ -49,21 +49,6 @@ frappe.ready(function() { }); }); - $("#item-update-cart button").on("click", function() { - shopping_cart.update_cart({ - item_code: get_item_code(), - qty: $("#item-update-cart input").val(), - btn: this, - callback: function(r) { - if(r.exc) { - $("#item-update-cart input").val(qty); - } else { - qty = $("#item-update-cart input").val(); - } - }, - }); - }); - $("[itemscope] .item-view-attribute .form-control").on("change", function() { try { var item_code = encodeURIComponent(get_item_code());