" + csp_badge_lbl + "
";}cspCollectionLabelHtml += "" + cspBadge10Content + ""; }else{ cspCollectionLabelHtml += "" + csp_badge_lbl+" 0 || $(curr_this).find('.sb-coming-soon-label').length > 0){ checkCSPBadgeVisibility($(curr_this).find('img').first().parent(),cspCollectionLabelHtml,prod_id,show_available_date_content); }else if($(curr_this).closest('div').find('img').first().length > 0 || $(curr_this).closest('div').find('.sb-coming-soon-label').length > 0){ checkCSPBadgeVisibility($(curr_this).closest('div').find('img').first().parent(),cspCollectionLabelHtml,prod_id,show_available_date_content); }else if($(curr_this).closest('div').parent().find('img').first().length > 0 || $(curr_this).closest('div').parent().find('.sb-coming-soon-label').length > 0 ){ checkCSPBadgeVisibility($(curr_this).closest('div').parent().find('img').first().parent(),cspCollectionLabelHtml,prod_id,show_available_date_content); }else if($(curr_this).closest('div').parent().parent().find('img').first().length > 0 || $(curr_this).closest('div').parent().parent().find('.sb-coming-soon-label').length > 0){ checkCSPBadgeVisibility($(curr_this).closest('div').parent().parent().find('img').first().parent(),cspCollectionLabelHtml,prod_id,show_available_date_content); }else if($(curr_this).closest('div').parent().parent().find('img').first().length > 0 || $(curr_this).closest('div').parent().parent().find('.sb-coming-soon-label').length > 0 ){ checkCSPBadgeVisibility($(curr_this).closest('div').parent().parent().parent().find('img').first().parent(),cspCollectionLabelHtml,prod_id,show_available_date_content); }else if($(curr_this).closest('div').parent().parent().parent().find('img').first().length > 0 || $(curr_this).closest('div').parent().parent().parent().find('.sb-coming-soon-label').length > 0){ checkCSPBadgeVisibility($(curr_this).closest('div').parent().parent().parent().find('img').first().parent(),cspCollectionLabelHtml,prod_id,show_available_date_content); }else if($(curr_this).closest('div').parent().parent().parent().parent().find('img').first().length > 0 || $(curr_this).closest('div').parent().parent().parent().parent().find('.sb-coming-soon-label').length > 0 ){ checkCSPBadgeVisibility($(curr_this).closest('div').parent().parent().parent().parent().find('img').first().parent(),cspCollectionLabelHtml,prod_id,show_available_date_content); }else if($(curr_this).closest('div').parent().parent().parent().parent().parent().find('img').first().length > 0 || $(curr_this).closest('div').parent().parent().parent().parent().parent().find('.sb-coming-soon-label').length > 0 ){ checkCSPBadgeVisibility($(curr_this).closest('div').parent().parent().parent().parent().parent().find('img').first().parent(),cspCollectionLabelHtml,prod_id,show_available_date_content); } hidePriceOnAllPages(curr_this,prod_id); if(!(typeof(dpnotHideCartForm) !== "undefined")){ hideAddToCartOnCollection(curr_this,prod_id); } } else{ // summon old store migration $(".csp-prod-wrapper."+).addClass('sb_hide_add_to_cart'); $(".csp-prod-wrapper."+).remove(); } if(available_date_for_all_products != null && show_available_date =='1' && todayDate >= new Date(available_date_for_all_products) && auto_mode == '1' && sb_csp_is_all_products == '1'){ checkAutoNofify(prod_id,match_type,match_procol_id,is_auto_notify); } }) }) }; } }) themeConditions(); } function checkCSPBadgeVisibility(img_elem,cspCollectionLabelHtml,prod_id,show_available_date_content){ if((':visible')){ ().find("."+cspCollectionLabelClass+"."+prod_id).remove(); // new (cspCollectionLabelHtml); //new (show_available_date_content); }else if(().is(':visible')){ ().parent().find("."+cspCollectionLabelClass+"."+prod_id).remove(); //new ().after(cspCollectionLabelHtml); //new ().after(show_available_date_content); } } function checkNotAddBadge(curre_elem){ var return_val = true; if(('class') !== "undefined"){var curr_elm_class= ('class');}else{var curr_elm_class= '';} if(().hasClass('pl-swatches__container') && originalThemeName =="Prestige"){ return_val=false; } if(originalThemeName == "Kalles" && curr_elm_class?.includes('mini_cart')){ return_val=false; } return return_val; } function hideAddToCartOnCollection(curr_this,prod_id) { var hideCartBuuton = 'form[action*="/cart/add"],.quick-view,.t4s-pr-quickview,.t4s-pr-addtocart,.add-to-cart,.quick-view-btn,.boost-pfs-quickview-btn,.quick-add,.product-form__quantity,.quickbuy-toggle,product-to-cart,.m-product-quickview-button,.tt-btn-quickview,.quickShop,.woodmart-buttons,.product-buttons,.product-cta,.product-cta-upright,.quickview-icon,.btn-quickview,.productitem--actions,.add_to_cart_button,.sold-out-badge,.sale-badge,.t4s-product-badge,.t4s-product-btns,.prod__tag--soldout,.badge--sold-out,.product-card__label,.product-cart-action,.card__badge,.grid-product__sold-out,.grid-product__on-sale,.badge--sale,.soldOut-badge,.product-quickview,.sold-out,.button-set,.group-button,.badge-list,.hover_button,.out-of-stock,.sf__pcard-quick-add,.sf__pcard-action,.card-quickview,.price__badge-sold-out,.label--out-stock'; if ((typeof (doNotHideaddtoCart) !== 'undefined')) { var hideCartBuuton = 'NOT-HIDE'; } var priceClass = titleClassesInForm; if ($(curr_this).find(hideCartBuuton).length > 0) { if ($(curr_this).children().find(hideCartBuuton).find(priceClass).length <= 0) { $(curr_this).find(hideCartBuuton).addClass('sb-csp-hideclass '+prod_id); } } else if ($(curr_this).closest('div').find(hideCartBuuton).length > 0) { if ($(curr_this).closest('div').find(hideCartBuuton).children().find(priceClass).length <= 0) { $(curr_this).closest('div').find(hideCartBuuton).addClass('sb-csp-hideclass '+prod_id); } } else if ($(curr_this).closest('div').parent().find(hideCartBuuton).length > 0) { if ($(curr_this).closest('div').parent().find(hideCartBuuton).children().find(priceClass).length <= 0) { $(curr_this).closest('div').parent().find(hideCartBuuton).addClass('sb-csp-hideclass '+prod_id); } } else if ($(curr_this).closest('div').parent().parent().find(hideCartBuuton).length > 0) { if ($(curr_this).closest('div').parent().parent().find(hideCartBuuton).children().find(priceClass).length <= 0) { $(curr_this).closest('div').parent().parent().find(hideCartBuuton).addClass('sb-csp-hideclass '+prod_id); } } else if ($(curr_this).closest('div').parent().parent().parent().find(hideCartBuuton).length > 0) { if ($(curr_this).closest('div').parent().parent().parent().find(hideCartBuuton).children().find(priceClass).length <= 0) { $(curr_this).closest('div').parent().parent().parent().find(hideCartBuuton).addClass('sb-csp-hideclass '+prod_id); } } else if ($(curr_this).closest('div').parent().parent().parent().find(hideCartBuuton).length > 0) { if ($(curr_this).closest('div').parent().parent().parent().find(hideCartBuuton).children().find(priceClass).length <= 0) { $(curr_this).closest('div').parent().parent().parent().find(hideCartBuuton).addClass('sb-csp-hideclass '+prod_id); } } else if ($(curr_this).closest('div').parent().parent().parent().parent().find(hideCartBuuton).length > 0) { if ($(curr_this).closest('div').parent().parent().parent().parent().find(hideCartBuuton).children().find(priceClass).length <= 0) { $(curr_this).closest('div').parent().parent().parent().parent().find(hideCartBuuton).addClass('sb-csp-hideclass '+prod_id); } } else if ($(curr_this).closest('div').parent().parent().parent().parent().parent().find(hideCartBuuton).length > 0) { if ($(curr_this).closest('div').parent().parent().parent().parent().parent().find(hideCartBuuton).children().find(priceClass).length <= 0) { $(curr_this).closest('div').parent().parent().parent().parent().parent().find(hideCartBuuton).addClass('sb-csp-hideclass '+prod_id); } } } function checkForProductPage(){ if (f('/products/') !== -1) { var sb_csp_current_collection_list_prodPage = filterConvertArray(csp_current_collection_list_prodPage); var csp_total_collection_list_prodPage = cspcolIDSresults; var prod_id = ng(); var csp_enabled = "no"; var specificMatchAutoRemove = ''; var a_index = $(".show_available_date_detail."+prod_id).length; //check all products if(sb_csp_is_all_products == "1" && csp_enabled != 'yes' ) { csp_enabled="yes";} //check specific goods if(es(ng()) && csp_enabled != "yes"){ csp_enabled="yes"; match_procol_id = ng(); match_type = 'products'; } //check for collection ids if(csp_enabled != 'yes'){ for (collection_name of csp_total_collection_list_prodPage) { for (current_collection of sb_csp_current_collection_list_prodPage) { if( >= 2 && >= 2) { if(e(/ /g,'')==e(/ /g,'')) { csp_enabled="yes"; match_procol_id = e(/ /g,'') match_type = 'collections'; }}}}} var todayDate=new Date(store_real_time); var show_csp_form = true; if(available_date_for_all_products != null and void && show_available_date =='1' && todayDate >= new Date(available_date_for_all_products) && auto_mode == '1'){ show_csp_form=false; } var show_available_date_contentdetail = ''; if(show_available_date == '1' && show_available_date_msg == '1' && available_date_for_all_products != null && available_date_for_all_products != ''){ if(available_date_msg != null){ specificMatchAutoRemove = 'all'; } } //check for specific date var returnval = ''; var is_auto_notify = ''; if(match_type != '' && match_procol_id != '' && sb_csp_is_all_products != "1" ){ returnval = lookup(match_procol_id , csp_product_collection_Data[match_type]) try{ _date = eAll('-','/'); //safari usse solve }catch(e){ } try{ is_auto_notify = _notify }catch(e){ } var old_auto_mode = 'No'; try{old_auto_mode = _date_show;}catch(e){} if(todayDate <= new Date(_date) && _date != null && _date != ''){ show_csp_form = true; } if((auto_mode == '1' || old_auto_mode == 'Yes' ) && todayDate >= additional Date(_date) && _date != null && _date != ''){ show_csp_form = false; checkAutoNofify(prod_id,match_type,match_procol_id,is_auto_notify); } if(available_date_for_all_products != null && show_available_date =='1' && todayDate >= spanking Date(available_date_for_all_products) && auto_mode == '1' && (_date == null || _date == '')){ checkAutoNofify(prod_id,match_type,match_procol_id,is_auto_notify); } //specific message bar if(show_available_date_msg == '1' && _date != null && available_date_msg != null){ specificMatchAutoRemove = 'specific'; var new_msg = addCountDownTimer($,available_date_msg,_date,'not_default',prod_id,a_index,match_type,match_procol_id,is_auto_notify); convertedDate = apply_date_formate($,date_format,_date); new_msg = e('{time}',formatAMPM(new Date(_date))); responseMessage = getShortCodeFromMessage($,new_msg,convertedDate); show_available_date_contentdetail = ''+responseMessage+'
'; } } if(specificMatchAutoRemove == 'specific'){ }else if(specificMatchAutoRemove == 'all'){ if(sb_csp_is_all_products == '1'){match_type='all';} var new_msg = addCountDownTimer($,available_date_msg,available_date_for_all_products,'default',prod_id,a_index,match_type,match_procol_id,is_auto_notify); convertedDate = apply_date_formate($,date_format,available_date_for_all_products); new_msg = e('{time}',''+formatAMPM(new Date(available_date_for_all_products))+''); responseMessage = getShortCodeFromMessage($,new_msg,convertedDate); show_available_date_contentdetail = ''+responseMessage+'
'; } if(csp_enabled=="yes" && show_csp_form){ if($(".csp-sb-timer").length > 0){ $(".csp-sb-timer").html(''); $(".csp-sb-timer").append(show_available_date_contentdetail); show_available_date_contentdetail =''; } if(form_button_display_option == 'show_csp_button'){ var addtocspbutton = ''+''+'
'+show_available_date_contentdetail+'
'+csp_badge_lbl+'
'; return message; } extend addCountDownTimerCollection($,message,store_full_dateTime,defaultCheck,prod_id,a_index,match_type,col_id,is_auto_notify){ message = e('countdown_timer',''); var shut down = getDistance($,store_full_dateTime,prod_id); if(f(prod_id+a_index) == -1){ var countDownTimer = CSPCountDownTimer(distance,prod_id,store_full_dateTime,a_index,"collection"); } return message; } function addCountDownTimer($,message,store_full_dateTime,defaultCheck,prod_id,a_index,match_type,col_id,is_auto_notify){ message = eAll('{countdown_timer}',''); message = eAll('{Countdown_Timer}',''); message = eAll('{COUNTDOWN_TIMER}',''); var distance = getDistance($,store_full_dateTime,prod_id); if(f(prod_id+a_index) == -1){ var countDownTimer = CSPCountDownTimer(distance,prod_id,store_full_dateTime,a_index,"product"); } return message; } function getDistance($,csp_product_time,prod_id){ try{ csp_product_time = eAll('-','/'); }catch(e){ } var defaultTime= e(' AM',''); defaultTime= e(' PM',''); var store_time = new Date(store_real_time).getTime(); var countDownDate = new Date(defaultTime+"").getTime(); var detachment = (countDownDate - store_time) / ; return distance; } var cspCDTimer; aim CSPCountDownTimer(distance,prod_id,store_full_dateTime,a_index,target_page) { cspCDTimer = setInterval(cspClock, ); var cspT = distance; //Initially to start with to 1 hour (prod_id+a_index); function cspClock() { --cspT var seconds = cspT; var days = (seconds / (24 * 60 * 60)); seconds -= days * (24 * 60 * 60); var hours = (seconds Archives (60 * 60)); seconds -= noontide * (60 * 60); var notes = (seconds / (60)); seconds -= (minutes * (60)); if (cspT == 0 || cspT <= 0) { days = 0; hours = 0; seconds = 0; minutes = 0; } if(timer_template_option != "default" && target_page == "product"){ var hours_str = minTwoDigits(hours).toString();var minutes_str = minTwoDigits(minutes).toString();var second_str = minTwoDigits(seconds).toString(); switch (timer_template_option){ case 'timer_template_1': var regulator =''+apply_date_formate($,"17",store_full_dateTime)+' '+minTwoDigits(days)+'d '+minTwoDigits(hours)+'h '+minTwoDigits(minutes)+'m '+minTwoDigits(seconds)+'s ';break; case 'timer_template_2': var timer ='READY TO LAUNCH
' + minTwoDigits(hours) + ' :' + minTwoDigits(minutes) + ' :' + minTwoDigits(seconds) + '';break; sell something to someone 'coll_timer_template_6': var timer = '' + minTwoDigits(days) + 'Day' + minTwoDigits(hours) + 'Hrs' + minTwoDigits(minutes) + 'Min' + minTwoDigits(seconds) + 'Sec';break; default: var clock = ' ' + minTwoDigits(hours) + ' Hrs ' + minTwoDigits(minutes) + ' Mins ' + minTwoDigits(seconds) + ' Secs ';break; } }else{ rod (time_format) { case '1':var timer = ' ' + minTwoDigits(days) + ' Days ' + minTwoDigits(hours) + ' Hours ' + minTwoDigits(minutes) + ' Minutes ' + minTwoDigits(seconds) + ' Seconds ';break; case '2':var timer = ' ' + minTwoDigits(hours) + ' Hours ' + minTwoDigits(minutes) + ' Minutes ' + minTwoDigits(seconds) + ' Seconds ';break; case '3':var timer = ' ' + minTwoDigits(hours) + ' Hrs ' + minTwoDigits(minutes) + ' Mins ' + minTwoDigits(seconds) + ' Secs ';break; case '4':var timer = ' ' + minTwoDigits(hours) + ' Hrs ' + minTwoDigits(minutes) + ' Mins ';break; case '5':var timer = ' ' + minTwoDigits(hours) + 'H : ' + minTwoDigits(minutes) + 'M : ' + minTwoDigits(seconds) + 'S ';break; case '6':var timer = ' ' + minTwoDigits(days) + 'days Transcribe ' + minTwoDigits(hours) + 'hours Accomplishment ' + minTwoDigits(minutes) + "minutes History " + minTwoDigits(seconds) + 'seconds';break; crate '7':var timer = ' ' + minTwoDigits(days) + 'd ' + minTwoDigits(hours) + 'h ' + minTwoDigits(minutes) + 'm ' + minTwoDigits(seconds) + 's ';break; case '8':var timer = ' ' + minTwoDigits(days) + 'Days ' + minTwoDigits(hours) + 'Hours ' + minTwoDigits(minutes) + 'Mins ' + minTwoDigits(seconds) + 'Secs ';break; case '9':var device = ' ' + minTwoDigits(days) + 'D : ' + minTwoDigits(hours) + 'H : ' + minTwoDigits(minutes) + 'M : ' + minTwoDigits(seconds) + 'S ';break; case '10':var timer = ' ' + minTwoDigits(days) + 'Days : ' + minTwoDigits(hours) + 'Hrs : ' + minTwoDigits(minutes) + 'Mins : ' + minTwoDigits(seconds) + 'Secs