Server IP : 192.64.112.168 / Your IP : 18.222.67.8 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(m){woodmartThemeModule.$document.on("wdShopPageInit wdUpdateWishlist wdArrowsLoadProducts wdLoadMoreLoadProducts wdProductsTabsLoaded wdSearchFullScreenContentLoaded wdBackHistory wdRecentlyViewedProductLoaded",function(){woodmartThemeModule.woodmartCompareUpdateState()}),woodmartThemeModule.woodmartCompare=function(){var r="woodmart_compare_list";if(woodmart_settings.is_multisite&&(r+="_"+woodmart_settings.current_blog_id),"undefined"!=typeof Cookies){var e,o=woodmartThemeModule.$body,t=m(".wd-header-compare"),a=Cookies.get(r);if(0<t.length){if(void 0!==a)try{var n=JSON.parse(a);t.find(".wd-tools-count").text(n.length)}catch(e){console.log("cant parse cookies json")}else t.find(".wd-tools-count").text(0);if(void 0!==woodmart_settings.compare_by_category&&"yes"===woodmart_settings.compare_by_category)try{woodmartThemeModule.supports_html5_storage&&(e=JSON.parse(sessionStorage.getItem(r+"_fragments")),e="undefined"==typeof actions||"1"!==actions.is_lang_switched&&"1"!==actions.force_reset?e:"")?m.each(e,function(e,o){m(e).replaceWith(o)}):i()}catch(e){i()}}o.on("click",".wd-compare-btn a",function(e){var t=m(this),o=t.data("id"),a=m(".wd-header-compare");if(t.hasClass("added"))return!0;e.preventDefault(),a.find(".wd-dropdown-compare").length?(t.addClass("loading"),jQuery.ajax({url:woodmart_settings.ajaxurl,data:{action:"woodmart_add_to_compare",id:o},dataType:"json",method:"GET",success:function(e){var o;e.count?(0<(o=m(".wd-header-compare")).length&&o.find(".wd-tools-count").text(e.count),c(t)):console.log("something wrong loading compare data ",e),e.fragments&&(m.each(e.fragments,function(e,o){m(e).replaceWith(o)}),sessionStorage.setItem(r+"_fragments",JSON.stringify(e.fragments)))},error:function(){console.log("We cant add to compare. Something wrong with AJAX response. Probably some PHP conflict.")},complete:function(){t.removeClass("loading")}})):(e=[],(e=void 0!==(a=Cookies.get(r))&&a?Object.values(JSON.parse(a)):e).length&&-1!==e.indexOf(o.toString())||e.push(o.toString()),a=e.length,o=a,0<(a=m(".wd-header-compare")).length&&a.find(".wd-tools-count").text(o),Cookies.set(r,JSON.stringify(e),{expires:7,path:woodmart_settings.cookie_path,secure:woodmart_settings.cookie_secure_param}),c(t))}),o.on("click",".wd-compare-remove",function(e){e.preventDefault();var o=m(this),e=o.data("id"),t="";void 0!==woodmart_settings.compare_by_category&&"yes"===woodmart_settings.compare_by_category&&(t=o.parents(".wd-compare-table").data("category-id"))&&o.parents(".compare-value").siblings().length<=1?d(t,o.parents(".wd-compare-page")):(o.addClass("loading"),jQuery.ajax({url:woodmart_settings.ajaxurl,data:{action:"woodmart_remove_from_compare",id:e,category_id:t,key:woodmart_settings.compare_page_nonce},dataType:"json",method:"GET",success:function(e){e.table?(s(e),e.fragments&&(m.each(e.fragments,function(e,o){m(e).replaceWith(o)}),sessionStorage.setItem(r+"_fragments",JSON.stringify(e.fragments)))):console.log("something wrong loading compare data ",e)},error:function(){console.log("We cant remove product compare. Something wrong with AJAX response. Probably some PHP conflict.")},complete:function(){o.remove("loading")}}))}),o.on("change",".wd-compare-select",function(e){e.preventDefault();var e=m(this),o=e.parents(".wd-compare-page"),t=o.find(".wd-compare-table[data-category-id="+e.val()+"]"),a=o.find(".wd-compare-table.wd-active");o.find(".wd-compare-cat-link").attr("href",t.data("category-url")),a.removeClass("wd-in"),setTimeout(function(){a.removeClass("wd-active")},100),setTimeout(function(){t.addClass("wd-active")},100),setTimeout(function(){t.addClass("wd-in"),woodmartThemeModule.$document.trigger("wood-images-loaded")},200)}),o.on("click",".wd-compare-remove-cat",function(e){e.preventDefault();e=m(this);d(e.parents(".wd-compare-header").find(".wd-compare-select").val(),e.parents(".wd-compare-page"))})}function d(e,o){var t=o.find(".wd-loader-overlay");t.addClass("wd-loading"),jQuery.ajax({url:woodmart_settings.ajaxurl,data:{action:"woodmart_remove_category_from_compare",category_id:e,key:woodmart_settings.compare_page_nonce},dataType:"json",method:"GET",success:function(e){e.table?(s(e),e.fragments&&(m.each(e.fragments,function(e,o){m(e).replaceWith(o)}),sessionStorage.setItem(r+"_fragments",JSON.stringify(e.fragments)))):console.log("something wrong loading compare data ",e)},error:function(){console.log("We cant remove product compare. Something wrong with AJAX response. Probably some PHP conflict.")},complete:function(){t.removeClass("wd-loading");var e=m(".wd-compare-table").first();setTimeout(function(){e.addClass("wd-active")},100),setTimeout(function(){e.addClass("wd-in"),woodmartThemeModule.$document.trigger("wood-images-loaded")},200)}})}function s(e){var o=m(".wd-header-compare");0<o.length&&o.find(".wd-tools-count").text(e.count),woodmartThemeModule.removeDuplicatedStylesFromHTML(e.table,function(e){var o=m(".wd-compare-page"),t=m(".wd-compare-table");0<o.length?o.replaceWith(e):0<t.length&&t.replaceWith(e)}),void 0!==woodmart_settings.compare_by_category&&"yes"===woodmart_settings.compare_by_category&&woodmartThemeModule.$document.trigger("wdTabsInit")}function i(){jQuery.ajax({url:woodmart_settings.ajaxurl,data:{action:"woodmart_get_fragment_product_category_compare"},dataType:"json",method:"GET",success:function(e){e.fragments?(m.each(e.fragments,function(e,o){m(e).replaceWith(o)}),sessionStorage.setItem(r+"_fragments",JSON.stringify(e.fragments))):console.log("something wrong loading compare data ",e)},error:function(){console.log("We cant remove product compare. Something wrong with AJAX response. Probably some PHP conflict.")}})}function c(e){var o=e.data("added-text");(0<e.find("span").length?e.find("span"):e).text(o),e.addClass("added"),woodmartThemeModule.$document.trigger("added_to_compare"),woodmartThemeModule.$document.trigger("wdUpdateTooltip",e)}},woodmartThemeModule.woodmartCompareUpdateState=function(){var e,o;void 0!==woodmart_settings.compare_save_button_state&&"yes"===woodmart_settings.compare_save_button_state&&"undefined"!=typeof Cookies&&(o="woodmart_compare_list",e=[],woodmart_settings.is_multisite&&(o+="_"+woodmart_settings.current_blog_id),(e=void 0!==(o=Cookies.get(o))&&o?Object.values(JSON.parse(o)):e).length)&&m.each(e,function(e,o){var t,o=m(".wd-compare-btn a[data-id="+o+"]");o.length&&!o.hasClass("added")&&(o.addClass("added"),t=o.data("added-text"),(0<o.find("span").length?o.find("span"):o).text(t))})},m(document).ready(function(){woodmartThemeModule.woodmartCompare(),woodmartThemeModule.woodmartCompareUpdateState()})}(jQuery);