Server IP : 192.64.112.168 / Your IP : 52.14.7.53 Web Server : Apache System : Linux nc-ph-2300-85.bluforrest.com 4.18.0-513.9.1.el8_9.x86_64 #1 SMP Sat Dec 2 05:23:44 EST 2023 x86_64 User : expressoneac ( 1128) PHP Version : 8.0.30 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/expressoneac/www/wp-content/themes/woodmart/js/scripts/wc/ |
Upload File : |
!function(c){woodmartThemeModule.$document.on("wdShopPageInit wdArrowsLoadProducts wdLoadMoreLoadProducts wdProductsTabsLoaded wdSearchFullScreenContentLoaded wdBackHistory wdRecentlyViewedProductLoaded",function(){woodmartThemeModule.updateWishlistButtonState()}),woodmartThemeModule.wishlist=function(){var d="woodmart_wishlist_count",i="woodmart_wishlist_products";if(woodmart_settings.is_multisite&&(d+="_"+woodmart_settings.current_blog_id,i+="_"+woodmart_settings.current_blog_id),"undefined"!=typeof Cookies){var t=Cookies.get(d),e=0;if(void 0!==t)try{e=JSON.parse(t)}catch(t){console.log("cant parse cookies json")}void 0!==woodmart_settings.wishlist_expanded&&"yes"===woodmart_settings.wishlist_expanded||a(e),woodmartThemeModule.$body.on("click",".wd-wishlist-btn a",function(t){var e=c(this);if(e.hasClass("added"))return!0;t.preventDefault();var o,t=e.data("product-id"),s=e.data("key");woodmartThemeModule.$body.hasClass("logged-in")||"undefined"==typeof Cookies?(e.addClass("loading"),void 0!==woodmart_settings.wishlist_expanded&&"yes"===woodmart_settings.wishlist_expanded&&"disable"!==woodmart_settings.wishlist_show_popup&&woodmartThemeModule.$body.hasClass("logged-in")?woodmartThemeModule.$document.trigger("wdShowWishlistGroupPopup",[t,s]):n(t,"",s)):(s={},(s=void 0!==(o=Cookies.get(i))&&o&&(o=JSON.parse(o),Object.keys(o).length)?o:s)[t]={product_id:t},a(o=Object.keys(s).length),Cookies.set(i,JSON.stringify(s),{expires:7,path:woodmart_settings.cookie_path,secure:woodmart_settings.cookie_secure_param}),Cookies.set(d,o,{expires:7,path:woodmart_settings.cookie_path,secure:woodmart_settings.cookie_secure_param}),l(e))}),woodmartThemeModule.$body.on("click",".wd-wishlist-remove",function(t){t.preventDefault();var e,o=c(this),t="";o.parents(".wd-wishlist-group").length&&(t=o.parents(".wd-wishlist-group").data("group-id")),o.addClass("loading"),woodmartThemeModule.$body.hasClass("logged-in")||"undefined"==typeof Cookies||1===o.parents(".products.elements-grid").find(".product-grid-item").length?r(o.data("product-id"),t,o.parents(".wd-products-holder"),function(){o.removeClass("loading")}):(o.parents(".product-grid-item").remove(),t={},void 0!==(e=Cookies.get(i))&&e&&(t=JSON.parse(e),Object.keys(t).length)&&delete t[o.data("product-id")],a(e=Object.keys(t).length),Cookies.set(i,JSON.stringify(t),{expires:7,path:woodmart_settings.cookie_path,secure:woodmart_settings.cookie_secure_param}),Cookies.set(d,e,{expires:7,path:woodmart_settings.cookie_path,secure:woodmart_settings.cookie_secure_param}))}),woodmartThemeModule.$body.on("click",".wd-wishlist-checkbox",function(t){var e=c(this),o=e.parents(".product-grid-item"),e=e.parents(".wd-products-element").siblings(".wd-wishlist-bulk-action"),s=e.find(".wd-wishlist-select-all");o.toggleClass("wd-current-product"),s.hasClass("wd-selected")&&e.hasClass("wd-visible")&&!o.hasClass("wd-current-product")&&s.removeClass("wd-selected"),o.siblings(".product").length===o.siblings(".wd-current-product").length&&o.hasClass("wd-current-product")&&s.addClass("wd-selected"),o.siblings(".wd-current-product").length||!e.hasClass("wd-visible")||o.hasClass("wd-current-product")?e.addClass("wd-visible"):e.removeClass("wd-visible")}),woodmartThemeModule.$body.on("click",".wd-wishlist-remove-action > a",function(t){t.preventDefault();var e=c(this),t=e.parents(".wd-wishlist-bulk-action").siblings(".wd-products-element").find(".products"),o=t.find(".wd-current-product"),s=[],d="";o.length&&confirm(woodmart_settings.wishlist_remove_notice)&&(e.addClass("loading"),e.parents(".wd-wishlist-group").length&&(d=e.parents(".wd-wishlist-group").data("group-id")),o.each(function(){s.push(c(this).data("id"))}),r(s,d,t,function(){e.parents(".wd-wishlist-bulk-action").removeClass("wd-visible"),e.removeClass("loading")}))}),woodmartThemeModule.$body.on("click",".wd-wishlist-select-all > a",function(t){t.preventDefault();var t=c(this).parent(),e=t.parents(".wd-wishlist-bulk-action").siblings(".wd-products-element").find(".products");t.hasClass("wd-selected")?(e.find(".product").removeClass("wd-current-product").find(".wd-wishlist-checkbox").prop("checked",!1),t.removeClass("wd-selected"),t.parents(".wd-wishlist-bulk-action").removeClass("wd-visible")):(e.find(".product").addClass("wd-current-product").find(".wd-wishlist-checkbox").prop("checked",!0),t.addClass("wd-selected"))}),woodmartThemeModule.$document.on("wdAddProductToWishlist",function(t,e,o,s,d){n(e,o,s,d)}),woodmartThemeModule.$document.on("wdRemoveProductToWishlist",function(t,e,o,s,d){r(e,o,s,d)}),woodmartThemeModule.$document.on("wdUpdateWishlistContent",function(t,e){var o;e=e,o=c(".wd-wishlist-content"),a(e.count),0<o.length&&!o.hasClass("wd-wishlist-preview")&&woodmartThemeModule.removeDuplicatedStylesFromHTML(e.wishlist_content,function(t){o.replaceWith(t),woodmartThemeModule.$document.trigger("wdUpdateWishlist")})})}function a(t){var e=c(".wd-header-wishlist");0<e.length&&e.find(".wd-tools-count").text(t)}function n(t,e,o,s=""){var d=c("a[data-product-id="+t+"]");c.ajax({url:woodmart_settings.ajaxurl,data:{action:"woodmart_add_to_wishlist",product_id:t,group:e,key:o},dataType:"json",method:"GET",success:function(t){t?(t.count&&a(t.count),t.fragments&&(woodmartThemeModule.$document.trigger("wdWishlistSaveFragments",[t.fragments,t.hash]),c.each(t.fragments,function(e,t){woodmartThemeModule.removeDuplicatedStylesFromHTML(t,function(t){c(e).replaceWith(t)})})),l(d)):console.log("something wrong loading wishlist data ",t),s&&s()},error:function(){console.log("We cant add to wishlist. Something wrong with AJAX response. Probably some PHP conflict.")},complete:function(){d.removeClass("loading")}})}function r(t,e,s,d=""){var o="";void 0!==s.data("atts")&&((o=s.data("atts")).ajax_page=s.attr("data-paged")),c.ajax({url:woodmart_settings.ajaxurl,data:{action:"woodmart_remove_from_wishlist",product_id:t,group_id:e,key:woodmart_settings.wishlist_page_nonce,atts:o},dataType:"json",method:"GET",success:function(t){var e,o;t.wishlist_content?(a(t.count),e=t,(o=s.parents(".wd-products-element")).length&&!c(".wd-wishlist-content").hasClass("wd-wishlist-preview")&&woodmartThemeModule.removeDuplicatedStylesFromHTML(e.wishlist_content,function(t){o.replaceWith(t),woodmartThemeModule.$document.trigger("wdUpdateWishlist")}),setTimeout(function(){var t=c(".wd-wishlist-content .wd-pagination").find("a.page-numbers");t.length&&t.each(function(){var t=c(this),e=t.attr("href").split("product-page=")[1],e=parseInt(e);t.attr("href",window.location.origin+window.location.pathname+"?product-page="+e)})},500)):console.log("something wrong loading wishlist data ",t),t.fragments&&woodmartThemeModule.$document.trigger("wdUpdateWishlistFragments",[t.fragments,t.hash]),d&&d()},error:function(){console.log("We cant remove from wishlist. Something wrong with AJAX response. Probably some PHP conflict.")}})}function l(t){var e=t.data("added-text");(0<t.find("span").length?t.find("span"):t).text(e),t.addClass("added"),woodmartThemeModule.$document.trigger("added_to_wishlist"),woodmartThemeModule.$document.trigger("wdUpdateTooltip",t)}},woodmartThemeModule.updateWishlistButtonState=function(){var t,e;void 0===woodmart_settings.wishlist_save_button_state||"yes"!==woodmart_settings.wishlist_save_button_state||"undefined"==typeof Cookies||woodmartThemeModule.$body.hasClass("logged-in")||(e="woodmart_wishlist_products",t={},woodmart_settings.is_multisite&&(e+="_"+woodmart_settings.current_blog_id),(t=void 0!==(e=Cookies.get(e))&&e?Object.values(JSON.parse(e)):t).length&&c.each(t,function(t,e){var o,e=c(".wd-wishlist-btn a[data-product-id="+e.product_id+"]");e.length&&!e.hasClass("added")&&(e.addClass("added"),o=e.data("added-text"),(0<e.find("span").length?e.find("span"):e).text(o))}))},c(document).ready(function(){woodmartThemeModule.wishlist(),woodmartThemeModule.updateWishlistButtonState()})}(jQuery);