Hide cart icon and badge count after logging out (#11530)

This commit is contained in:
Britlog 2017-11-17 07:11:35 +01:00 committed by Rushabh Mehta
parent 2a89a502f0
commit b6096057c6

View File

@ -65,6 +65,9 @@ $.extend(shopping_cart, {
set_cart_count: function() { set_cart_count: function() {
var cart_count = getCookie("cart_count"); var cart_count = getCookie("cart_count");
if(frappe.session.user==="Guest") {
cart_count = 0;
}
if(cart_count) { if(cart_count) {
$(".shopping-cart").toggleClass('hidden', false); $(".shopping-cart").toggleClass('hidden', false);