fix: Cart buttons not working
- Add cart.js to web bundle
- Hide icon conditionally since now this file loads on every single page
diff --git a/erpnext/public/js/cart.js b/erpnext/public/js/cart.js
index 0c97045..69357ee 100644
--- a/erpnext/public/js/cart.js
+++ b/erpnext/public/js/cart.js
@@ -292,7 +292,9 @@
});
frappe.ready(function() {
- $(".cart-icon").hide();
+ if (window.location.pathname === "/cart") {
+ $(".cart-icon").hide();
+ }
shopping_cart.parent = $(".cart-container");
shopping_cart.bind_events();
});
diff --git a/erpnext/public/js/erpnext-web.bundle.js b/erpnext/public/js/erpnext-web.bundle.js
index cbe899d..576abd2 100644
--- a/erpnext/public/js/erpnext-web.bundle.js
+++ b/erpnext/public/js/erpnext-web.bundle.js
@@ -1,6 +1,7 @@
import "./website_utils";
import "./wishlist";
import "./shopping_cart";
+import "./cart";
import "./customer_reviews";
import "../../e_commerce/product_ui/list";
import "../../e_commerce/product_ui/views";