if (Shopify && Shopify.shop === "house-ofchikankari.myshopify.com") { throw new Error("Script stopped for this shop."); } if (window.location.pathname.includes("/pages/wishlist")) { throw new Error("Script stopped for this shop."); } window.icallofzColl=1; var zooomyColl= function(jQuery) { var getwishselector = document.querySelectorAll(".zoomywishid"); if(icallofzColl>1){ return false; } window.$=jQuery var getwishselectorlength = getwishselector.length; var ifruncode = getwishselectorlength; var myurlcheck = document.location.href; var checktrue = myurlcheck.includes("login"); if (checktrue == false) { checktrue = myurlcheck.includes("register"); } if (checktrue == false) { checktrue = myurlcheck.includes("challenge"); } if (checktrue == false) { checktrue = myurlcheck.includes("account"); } if (checktrue == false) { checktrue = myurlcheck.includes("cart"); } if (checktrue == false) { checktrue = myurlcheck.includes("pages"); } if (checktrue == false) { checktrue = myurlcheck.includes("blog"); } if (checktrue == false) { checktrue = myurlcheck.includes("policies"); } if ($('#zooomy-wishlist-counter').length){ getwishselectorlength = 1; } if (checktrue) { getwishselectorlength = 1; } var sendurl =""; //console.log(myurlcheck); if (getwishselectorlength == 0) { return false } else { icallofzColl++ let callAjax=1; function wishlist(callAjaxLen) { var WishIdsArray = []; var WishIds = ""; let getwishselector = $(".zoomywishid"); $(getwishselector).each(function() { if ($(this).html().trim() == '') { WishIds = $(this).attr("data-product-id"); WishIdsArray.push(WishIds); } }); let shop = ""; var customerid = ""; var scripts = document.getElementsByTagName("script"); for (var i = 0, l = scripts.length; i < l; i++) { if (scripts[i].getAttribute("data-shop-id") != null) { customerid = scripts[i].getAttribute("data-cus-id"); customername = scripts[i].getAttribute("data-cus-name"); customer_email = scripts[i].getAttribute("data-cus-email"); } } shop = Shopify.shop; var cvalforcust = btoa(customer_email); sendurl = "https://zooomyapps.com/wishlist/Coll.php?shop=" + shop + "&customerid=" + customerid + "&WishIdsArray=" + WishIdsArray + "&ifruncode=" + ifruncode; if(customerid=="") { var WishIdsArrayempty = ""; sendurl = "https://zooomyapps.com/wishlist/Coll.php?shop=" + shop + "&customerid=" + customerid + "&WishIdsArray=" + WishIdsArrayempty + "&ifruncode=" + ifruncode; } $.ajax({ url: sendurl, data: {}, dataType: "jsonp", jsonp: "jsonCode", async: "true", success: function(jsonData) { var usercss = jsonData.custom_css; var useraddedcss = jsonData.user_added_css; var empty = jsonData.empty; var itemadded = jsonData.itemadded; var coll_f_color = jsonData.coll_f_color; var coll_e_color = jsonData.coll_e_color; var login_text = jsonData.login_text; var shop = jsonData.shop; var totalv = jsonData.totalv; var wish_icon= jsonData.wish_icon; if (jsonData.l_f_color == undefined) { jsonData.l_f_color = "#000"; jsonData.l_b_color = "#a4dfc7"; jsonData.l_br_color = "#277f4e"; } if ($('#zooomy-wishlist-counter').length){ $("#zooomy-wishlist-counter span").replaceWith(""+totalv+""); } if ($('.zooomyIconval').length) { if (totalv > 0) { $('.zooomyIconval i.fa').addClass('fa-'+wish_icon).removeClass('fa-'+wish_icon+'-o'); } } $('').appendTo("body"); if (jsonData.w_login == "yes") { $("body").append( '' ); $("").appendTo("body"); } $( "" ).appendTo("body"); $("").appendTo("body"); $("").appendTo("body"); var alldata = {}; if (jsonData.app_plan != "free") { if (getwishselector.length == 0) {} else { $(getwishselector).each(function() { var productid = $(this).attr("data-product-id"); if (jsonData.itemadded[productid] == "yes") { hearticon = "