fix: Sider
diff --git a/erpnext/public/js/wishlist.js b/erpnext/public/js/wishlist.js
index 6ab1906..b2c840a 100644
--- a/erpnext/public/js/wishlist.js
+++ b/erpnext/public/js/wishlist.js
@@ -8,24 +8,23 @@
set_wishlist_count: function() {
// set badge count for wishlist icon
var wish_count = frappe.get_cookie("wish_count");
- if(frappe.session.user==="Guest") {
+ if (frappe.session.user==="Guest") {
wish_count = 0;
}
- if(wish_count) {
+ if (wish_count) {
$(".wishlist").toggleClass('hidden', false);
}
var $wishlist = $('.wishlist-icon');
var $badge = $wishlist.find("#wish-count");
- if(parseInt(wish_count) === 0 || wish_count === undefined) {
+ if (parseInt(wish_count) === 0 || wish_count === undefined) {
$wishlist.css("display", "none");
- }
- else {
+ } else {
$wishlist.css("display", "inline");
}
- if(wish_count) {
+ if (wish_count) {
$badge.html(wish_count);
$wishlist.addClass('cart-animate');
setTimeout(() => {
@@ -129,18 +128,21 @@
}
frappe.call({
+ async: async,
type: "POST",
method: method,
args: args,
callback: function (r) {
if (r.exc) {
- if (failure_action && (typeof failure_action === 'function')) {failure_action();}
+ if (failure_action && (typeof failure_action === 'function')) {
+ failure_action();
+ }
frappe.msgprint({
message: __("Sorry, something went wrong. Please refresh."),
indicator: "red", title: __("Note")
});
- } else {
- if (success_action && (typeof success_action === 'function')) {success_action();}
+ } else if (success_action && (typeof success_action === 'function')) {
+ success_action();
}
}
});
diff --git a/erpnext/templates/pages/wishlist.py b/erpnext/templates/pages/wishlist.py
index 15aef87..0dbcf21 100644
--- a/erpnext/templates/pages/wishlist.py
+++ b/erpnext/templates/pages/wishlist.py
@@ -5,7 +5,6 @@
no_cache = 1
import frappe
-from erpnext.e_commerce.shopping_cart.cart import get_cart_quotation
def get_context(context):
settings = frappe.get_doc("E Commerce Settings")