[fixes] show link to visit cart after adding item, hide cart button on cart view
diff --git a/erpnext/templates/includes/cart.js b/erpnext/templates/includes/cart.js
index e413f0b..0c29569 100644
--- a/erpnext/templates/includes/cart.js
+++ b/erpnext/templates/includes/cart.js
@@ -65,11 +65,11 @@
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 @@
});
$(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 0a38c23..f4d9027 100644
--- a/erpnext/templates/includes/product_page.js
+++ b/erpnext/templates/includes/product_page.js
@@ -49,21 +49,6 @@
});
});
- $("#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());