What type of product are you looking for?
Towel hooks (0)
sort by
Back to top
Back to filters
'; } html += '
'; bardiv.innerHTML = html; var products = 0, productsDiv = document.querySelectorAll('[id^="productDiv"]'); if (productsDiv) {products = productsDiv.length;} span.innerHTML = texts.nextLabel1 + ' ' + products + ' ' + texts.nextLabel2 + ' ' + maxProducts + ' ' + texts.nextLabel3; if (productListCurrentLastPage < productListCurrentMaxPage) {productListShowElement(div);} else {productListHideElement(div);} } var ndiv = document.getElementById('productsNumberDiv'); if (ndiv) {ndiv.innerHTML = texts.nextLabel4 + ' ' + maxProducts + ' ' + texts.nextLabel3;} } function productListUpdateSelectedFiltersBar(selected) { var h1 = document.getElementById('selectedFiltersH1'); if (h1) { if (selected) { if(selected.includes("{N}") || selected.includes("{T}")){ var infoArray = selected.split("||"); //selected.replace(' {N} '+infoArray[2], ''); var containerNoveltyTopSales = selected; h1.innerHTML = infoArray[0]; }else{ h1.innerHTML = selected; } productListShowElement(h1); } else { productListHideElement(h1); } } } function productListUpdateSortingCombo(field, order) { var combo = document.getElementById('productSortCombo'); if ((combo)&&(field)&&(order)) { var selected = field + '|' + order; for (var i=0;i
' + '
'; if (description) {html += '
' + description + '
';} if (addRow) {html += '
';} html += '
' + '
' + '
' + '
'; if (description) {html += '
' + description + '
';} html += '
'; html += '
'; } return html; } function addBtnFilter(filterGroups ){var options = document.getElementById('options'); var groupColeccion = filterGroups[0] for (var j = 0; j < filterGroups.length; j++) { var colections = filterGroups[j].filters;if (filterGroups[j].code == "167562") { for (var i = 0; i < colections.length; i++) { var code = colections[i].code; var name = colections[i].name; var opt = document.getElementById("Op"+ code); if(colections[i].checked){ if(!opt){ options.innerHTML +='' + name + '' } }else{ if(opt){ options.removeChild(opt); } } } } }} function onProductBtnFilter(code){ $("#filterCheck" + code ).prop('checked', false); onProductListFilterChanged(code); } function productListUpdateFilter(group, filter) { if ((filter)&&(filter.code)) { $('#filterDiv' + filter.code).data('count', filter.count); var active = ((filter.count > 0)||(group.conditionType == 'OR')) && (!filter.blocked), checked = filter.checked; if (active) {$('#filterActiveDiv' + filter.code).addClass('active');} else {$('#filterActiveDiv' + filter.code).removeClass('active');} $('#filterCheck' + filter.code).attr('disabled', !active);//$('#filterCheck' + filter.code).attr('checked', checked); if (checked) { $('#filterCheck' + filter.code).prop('checked', true); $('#filterCheckedDiv' + filter.code).addClass('active'); } else { $('#filterCheck' + filter.code).prop('checked', false); $('#filterCheckedDiv' + filter.code).removeClass('active'); } $('#filterSpan' + filter.code).html(filter.name + ((filter.count > 0) ? ' (' + filter.count + ')' : '')); $('#filterDisabledDiv' + filter.code).attr('disabled', !active); if (filter.ranged) { $('#filterP' + filter.code).html(filter.name); var allValues = $('#filterSliderDiv' + filter.code).data('array'), currency = (filter.code == 'PRICE') ? ' ' + document.currencySymbol : ''; var $rangeDiv = $('#rangeDiv' + filter.code); $rangeDiv.find('.slider').slider({'disabled' : false}); $rangeDiv.find('.slider').slider('values', [allValues.indexOf(filter.selectedMinValue), allValues.indexOf(filter.selectedMaxValue)]);//$rangeDiv.find('.slider').slider('option', 'min', filter.minValue);//$rangeDiv.find('.slider').slider('option', 'max', filter.maxValue); $rangeDiv.find('.min-input').val(filter.selectedMinValue); $rangeDiv.find('.max-input').val(filter.selectedMaxValue); if (filter.restrictedValues) { if (currencyBeforePrice){ var mintext = productListTexts.lessThan + ' ' + currency + filter.minValue; var maxtext = productListTexts.moreThan + ' ' + currency + filter.maxValue; } else { var mintext = productListTexts.lessThan + ' ' + filter.minValue + currency; var maxtext = productListTexts.moreThan + ' ' + filter.maxValue + currency; } $rangeDiv.find('.min-range-text').html(mintext); $rangeDiv.find('.max-range-text').html(maxtext); var text = productListGetRangedLabel(filter.minValue, filter.maxValue, filter.selectedMinValue, filter.selectedMaxValue, currency,currencyBeforePrice); $rangeDiv.find('.range-d').html(text); } else { if (currencyBeforePrice){ $rangeDiv.find('.min-range-text').html(currency +filter.minValue); $rangeDiv.find('.max-range-text').html(currency +filter.maxValue); var text = currency + filter.selectedMinValue + ' - ' + currency + filter.selectedMaxValue; $rangeDiv.find('.range-d').html(text); } else { $rangeDiv.find('.min-range-text').html(filter.minValue + currency); $rangeDiv.find('.max-range-text').html(filter.maxValue + currency); var text = filter.selectedMinValue + currency + ' - ' + filter.selectedMaxValue + currency; $rangeDiv.find('.range-d').html(text); } } } else { $('#filterP' + filter.code).html(filter.name + ((filter.count > 0) ? ' (' + filter.count + ')' : '')); } } } function productListGetFilterHTML(group, filter, texts) { var html = '', code = filter.code, count = filter.count, active = ((count > 0) || (group.conditionType == 'OR')) && (!filter.blocked), checked = filter.checked, image = filter.image, name = filter.name, description = filter.description; if (group.highlighted) { if (group.displayType == 'SEARCH') { html += '
' + '
' + '
' + '' + '' + '
' + '
' + '
'; } else if (group.displayType == 'THUMBNAILS') { html += '
' + '
' + '
'; } else if (group.displayType == 'MAC') { html += ''; } else if (group.displayType == 'ICONS') { html += '
' + '' + '' + name + ((count > 0) ? ' (' + count + ')' : '') + '' + '
'; } else if (group.displayType == 'CHECKS') { html += '
' + '' + '' + name + ((count > 0) ? ' (' + count + ')' : '') + '' + '
'; } else if (group.displayType == 'RANGES') { productListRangedToInitialize.push(code); var mintext = filter.minValue, maxtext = filter.maxValue, currency = (code == 'PRICE') ? ' ' + document.currencySymbol : '', rtext = filter.selectedMinValue + currency + ' - ' + filter.selectedMaxValue + currency; if (filter.currencyBeforePrice) { rtext = currency + filter.selectedMinValue + + ' - ' + currency + filter.selectedMaxValue; } if (filter.restrictedValues) { //TODO: a?adir la propiedad de mercado de currency anted de precio if (filter.currencyBeforePrice) { mintext = productListTexts.lessThan + ' ' + currency + filter.minValue; maxtext = productListTexts.moreThan + ' ' + currency + filter.maxValue; } else { mintext = productListTexts.lessThan + ' ' + filter.minValue + currency; maxtext = productListTexts.moreThan + ' ' + filter.maxValue + currency; } rtext = productListGetRangedLabel(filter.minValue, filter.maxValue, filter.selectedMinValue, filter.selectedMaxValue, currency,filter.currencyBeforePrice); } html += '
' + '
' + '
' + '
'; if (image) {html += '';} html += '
' + name + '
' + '
' + '
' + '' + rtext + '' + '' + '
' + '
' + '' + '' + '
' + '
' + '
' + '
' + '' + mintext + '' + '' + '
' + '
' + '' + maxtext + '' + '' + '
'; } } else { if (group.displayType == 'SEARCH') { html += '
' + '
' + '
' + '' + '' + '
' + '
' + '
'; } else if (group.displayType == 'RANGES') { productListRangedToInitialize.push(code); var mintext = filter.minValue, maxtext = filter.maxValue, currency = (code == 'PRICE') ? document.currencySymbol : '', rtext = filter.selectedMinValue + currency + ' - ' + filter.selectedMaxValue + currency; if (filter.currencyBeforePrice) { rtext = currency + ' ' + filter.selectedMinValue + ' - ' + currency + filter.selectedMaxValue ; } if (filter.restrictedValues) { if (filter.currencyBeforePrice) { mintext = productListTexts.lessThan + ' ' + currency + filter.minValue; maxtext = productListTexts.moreThan + ' ' + currency + filter.maxValue; } else { mintext = productListTexts.lessThan + ' ' + filter.minValue + currency; maxtext = productListTexts.moreThan + ' ' + filter.maxValue + currency; } rtext = productListGetRangedLabel(filter.minValue, filter.maxValue, filter.selectedMinValue, filter.selectedMaxValue, currency,filter.currencyBeforePrice); } html += '
' + '
' + '
' + '
'; if (image) {html += '';} html += '
' + name + '
'; if (description) {html += '
' + description + '
';} html += '
' + '
' + '' + rtext + '' + '' + '
' + '
' + '' + '' + '
' + '
' + '
' + '
' + '' + mintext + '' + '' + '
' + '
' + '' + maxtext + '' + '' + '
'; } else if (group.displayType == 'ICONS') { html += '
' + '' + '
' + '' + '
'; } else { var hasDescription = false; if ((group.filters)&&(group.filters.length)) { for (var i=0;i
' + '' + '
' + '' + ''; } else { html += ''; } } } return html; } function productListAddProductsParryware(products, before, texts) { var productsDiv = document.getElementById('productListDiv'); if (productsDiv) { if ((products) && (products.length)) { var noResultsDiv = document.getElementById('noResultsDiv'); if (noResultsDiv) { noResultsDiv.parentNode.removeChild(noResultsDiv); } var beforeDiv = null; if ((before) && (productsDiv.childNodes.length)) { beforeDiv = productsDiv.childNodes[0]; } let cuantity = document.getElementById('cuantity'); let cuantitym = document.getElementById('cuantitym'); if (cuantity) {cuantity.innerHTML = products.length;} if (cuantitym) {cuantitym.innerHTML ='(' + products.length + ')';} for (var i = 0; i < products.length; i++) { var product = products[i], div = document.createElement('DIV'); if (product.type == 'ProductRender') { div.setAttribute('id', 'productDiv' + product.code); div.setAttribute('class', 'col-6 col-md-6 col-lg-4 mb-3 m-2-col'); div.setAttribute('data-url', product.url); div.innerHTML = productListGetProductParrywareHTML(product, texts); productsDiv.insertBefore(div, beforeDiv); productCard.activateCard($('#productDiv' + product.code.replace(/\./g, '\\\$&') + ' .product-card')); } } } else { var filtersSection = document.getElementById('filtersSection'); if (filtersSection) { productsDiv.innerHTML = '
' + texts.noResults + '
'; } else { var anclaProductList = document.getElementById('anclaProductList'); if (anclaProductList) { anclaProductList.style.display = 'none'; } } } } }function productListAddProducts(products, before, texts) {var productsDiv = document.getElementById('productListDiv');if (productsDiv) {if ((products)&&(products.length)) {var noResultsDiv = document.getElementById('noResultsDiv');if (noResultsDiv) {noResultsDiv.parentNode.removeChild(noResultsDiv);}var beforeDiv = null;if ((before)&&(productsDiv.childNodes.length)) {beforeDiv = productsDiv.childNodes[0];}for (var i=0;i
';if ((product.videoUrl)&&(product.videoImage)) {html += '
'; html += '
';html +='
'; html += '
';} else if (product.image) {html += '
'; html += '';html +='
';}html += '
';if (product.themeText) {if (product.themeUrl) {html += '
' + product.themeText + '
';} else {html += '
' + product.themeText + '
';}}if (product.title) {html += '
' + product.title + '
';}if (product.content) {html += '
' + product.content + '
';}html += '
';html += '
';if ((product.buttonText)&&(product.buttonUrl)) {html += '' + product.buttonText + '';}html += '
'; html += '
' + ((product.category && !isTaps) ? product.category : product.name) +'
'; html += ''+'
' ; if (isCosmic){ html += '
' + '
- '; if (discountPercentage!== undefined && discountPercentage!== null && discountPercentage!== ''){ html += '' ; } html += ''; html += '
' + '
'; }else{ html += '
' + // '
- ' + // '' + // '
' + '
'; } if (!isSupramodel) {html += '';} html += '
' + ''; if (isLaufenISH) { if (hoverImage) {html += '';} } if (isCosmic){ if (hoverimagefinished) {html += '';} }else { html += ''; } html += ''; html +=''; var showActionsOnOver = false; var purchase = ((finishedUrl != null)&&(finishedUrl != '')&&(!finishedDiscontinued)); var favText = (finishedFavorite) ? texts.removeFavorite : texts.addFavorite; var favIcon = (finishedFavorite) ? '/icons/favon-18.svg' : '/icons/favoff-18.svg'; var cmpText = (finishedComparator) ? texts.removeComparator : texts.addComparator; var cmpIcon = (finishedComparator) ? '/icons/comparador_on-18.svg' : '/icons/comparador_off-18.svg'; var is100Shoppers = false; var iconCardIs100Shoper = 'https://www.laufen.com/o/laufen-theme/images/icons/carrito.svg'; var iconlocationIs100Shoper = 'https://www.laufen.com/o/laufen-theme/images/icons/mapa.svg'; //TODO Cambio si es 100Shoppers is100Shoppers = false; if (showActionsOnOver) { if(is100Shoppers){ html += '
'; html += ''; html += ''; html += 'Buy online'; html += ''; }else{ html += '
' + '' + texts.viewProduct + ''; html += ''; } html += '
' if (!isSupramodel) { html += '
' + '
- '; if (r3url) { html += '
- ' + '' + ''+ '' + ' '; } html += '
- ' + '' + '' + '' + ' ' + '
- ' + '' + '' + '' + ' ' + '
' + '
'; } } html += '
'; if (isLaufenISH) { html += '
';} var htmllistMatTech = ''; if ((product.finisheds)&&(product.finisheds.length)) { if(product.finisheds.length >= 1){ var listMatTech = product.finisheds[0].listMatTech; var listMatTechStr =''; if(listMatTech){ listMatTechStr = listMatTech.toString(); } htmllistMatTech = technologiesMaterialsRenderPList(listMatTechStr); } } if (isRoca) { html += '
'; html += '
'; html += '
'; html += '
'; } if (product.category) { html += '
'; var selected = false; if (isRoca) { html += '
'; } html += '
' + product.category + '
'; if (isRoca) { html += '
'; } html += '
'; } if (isLaufenISH) { if (!isSupramodel) { html += '
' + '
- '; if (r3url) { html += '
- ' + '' + ''+ '' + ' '; } html += '
- ' + '' + '' + '' + ' ' + '
- ' + '' + '' + '' + ' ' + '
' + '
'; } html += '
'; } html += '
' + '' + finishedDescription + ''; if ((!isSupramodel)&&(!isBundle)) { if ((isAlape) && (displayCode!=null) && (displayCode!="") && (displayCode.trim().startsWith("VA"))) { displayCode = displayCode.replace("VA",""); } html += '' + texts.referenceLabel + ': ' + displayCode + ''; } html += '' + htmllistMatTech + ''; html += '
'; if (product.dimensions) { } html += '
'; if ((product.finisheds)&&(product.finisheds.length)) { for (var i=0;i
'; html += '
'; if ((product.dimensions)&&(product.dimensions !== '1 x 1 x 1')) { html += '
' + product.dimensions + '
'; } html += '
'; if(!isCelite){ if (isCosmic){ html += '
'; if((!isEcommerce)&&(isShowPrice)&&((finished.pricePrefix !== undefined)&&(finished.pricePrefix !== null)&&(finished.pricePrefix !== ''))){ html += '
'+ finished.pricePrefix + '
'; html += ''; html += '
'; $(document).ready(function() { $('[data-toggle="popover"]').popover(); }); } var classPriceCosmic = (typeof finishedPriceStrikethrough !== "undefined")?"price-red":""; html += '
'; html += '
'; if(typeof finishedPriceStrikethrough !== "undefined"){ html += '
'; } html += '
'; if (product.extendedDescription) { html += '
' + product.extendedDescription + '
' } }else{ if(typeof finishedPriceStrikethrough !== "undefined"){html += '
';} if (!finished || !finished.showPrettyPrices) { html += '
'; }else{ html += '
'; html += '
'; } if(typeof finishedPrice !== "undefined"){ if(typeof finishedPriceStrikethrough === "undefined"){ html += '
' + '' + finishedPrice + '' + '
'; html += '
'; }else{ html += '
'; } var financingPriceP = getFinancingPriceP(finishedPrice); if(financingPriceP.finalShare != '0'){ html += '
' + 'ou ' + financingPriceP.numShare + 'x de R$ ' + financingPriceP.finalShare + ' sem juros' + '
'; } } } html += '
'; html += '
'; if (finished && finished.showPrettyPrices) { html += '
' + '
'; if (finishedPricePrefix) {html += finishedPricePrefix + ': ';} html += '
' + ''; if (finishedPriceStrikethrough) {html += finishedPriceStrikethrough;} html += ''; html += ''; if (finished.price) {html += finished.price;} html += ''; html += '
'; } html += '
'; // TODO: formularios html += '
'; if (isLaufenISH) { html += '
' + '
' + '
' + '
' + '' + texts.viewProduct + ''; }else{ html += '
' + '
'; if(is100Shoppers){ html += '
'; html += '
'; html += ''; html += ''; html += 'Buy online'; html += ''; }else{ if (isCosmic) { html += '
'; html += '
'; if (purchase && isEcommerce){ html += '' + texts.buyNow + '' ; }else{ html += '' + texts.viewProduct + '' ; } } else { html += '
'; html += '
'; html += '' + texts.viewProduct + ''; } } } if(!is100Shoppers){ if (!isCosmic) { html += ''; }else{ html += ''; } } html += '
' + '
'; if (!isLaufenISH) { if(is100Shoppers){ html += '
'; }else{ html += '
'; } if (!isSupramodel) { html += '
' + '
- '; if (r3url) { html += '
- ' + '' + ''+ '' + ' '; } html += '
- ' + '' + '' + '' + ' ' + '
- ' + '' + '' + '' + ' ' + '
' + '
'; } html += '
'; } html += '
'; html += '
'; html += '
'; return html; } function productListGetNotificationData(code, notificationIcon, notificationText, texts, typeUrl) { var data = {}; var imageDiv = document.getElementById('productImageDiv' + code); if ((imageDiv)&&(imageDiv.style.backgroundImage)) { data.image = imageDiv.style.backgroundImage.slice(4, -1).replace(/['"]/g, ''); } var collectionName = '', collectionUrl = '', productName = '', productUrl = '', productReference = '', finishedName = '', finishedImage = '', productDimensions = '', productPrice = '', finishedPriceStrikethrough = '', rrpLabel = '', priceTextNoSub = ''; var collectionLink = document.getElementById('productCollectionLink' + code); if (collectionLink) { collectionName = collectionLink.innerHTML; collectionUrl = collectionLink.href; } var productLink = document.getElementById('productLink2' + code); if (productLink) { productName = productLink.innerHTML; productUrl = productLink.href; } var productSpan = document.getElementById('productCodeSpan' + code); if (productSpan) {productReference = productSpan.innerHTML;} var sku = productListSelectedFinisheds[code]; if (sku) { var finishedButton = document.getElementById('finishedButton' + sku); if (finishedButton) { finishedName = finishedButton.title; if (finishedButton.childNodes.length > 0) { finishedImage = finishedButton.childNodes[0].style.backgroundImage.slice(4, -1).replace(/['"]/g, ''); } } } var productSizeP = document.getElementById('productSizeP' + code); if (productSizeP) {productDimensions = productSizeP.innerHTML;} var productPriceP = document.getElementById('productPriceP' + code); if ((productPriceP)&&($(productPriceP).is(":visible"))) {productPrice = productPriceP.innerHTML;} var finishedPriceStrikethroughP = document.getElementById('priceStrikethroughBlack' + code); if (finishedPriceStrikethroughP) {finishedPriceStrikethrough = finishedPriceStrikethroughP.text;} var rrpLabelP = document.getElementById('rrpLabel' + code); if (rrpLabelP) {rrpLabel = rrpLabelP.text;} var priceTextNoSubP = document.getElementById('priceBlue' + code); if (priceTextNoSubP) {priceTextNoSub = priceTextNoSubP.text;} data.content = ''; if (collectionName) { data.content += '
' + '' + collectionName + '' + '
'; } if (productName) { data.content += '
' + '' + productName + '' + '
'; } if (productReference) { data.content += '
' + productReference + '
'; } if (finishedName) { data.content += '
' + '
' + '' + '
' + '
'; } data.content += '
'; if (productDimensions) {data.content += '
' + productDimensions + '
';} // if (productPrice) {data.content += '
' + productPrice + '
';} if (productPrice) {data.content += '
' + productPrice + '
';} data.content += '
'; // data.content += '
' +// '
';// if (rrpLabel) {data.content += rrpLabel + ': ';}// data.content += '
' +// '';// if (finishedPriceStrikethrough) {data.content += finishedPriceStrikethrough;}// data.content += '';// data.content += '';// if (priceTextNoSub) {data.content += priceTextNoSub;}// data.content += '';// data.content += '
'; data.icon = ''; if (notificationIcon) {data.icon += '';} if (notificationText) {data.icon += '' + notificationText + '';} data.url = typeUrl; data.text = texts.goToProduct; return data; } function productListShowNotification(code, icon, action, texts, typeUrl) { var data = productListGetNotificationData(code, icon, action, texts, typeUrl); displayNotification(data.image, data.content, data.icon, data.url, data.text); } function productListChangeFavoriteButton(code, sku, favorite, texts) { var button = document.getElementById('finishedButton' + sku); if (button) { button.dataset.favorite = favorite; button.setAttribute('data-favorite', favorite); } var favoriteLink = document.getElementById('productFavoriteLink' + code); if (favoriteLink) { var favText = (favorite) ? texts.removeFavorite : texts.addFavorite; favoriteLink.title = favText; } var favoriteIcon = document.getElementById('productFavoriteIcon' + code); if (favoriteIcon) { var favIcon = (favorite) ? '/icons/favon-18.svg' : '/icons/favoff-18.svg'; favoriteIcon.setAttribute('src', texts.imagesPath + favIcon); } updateHeaderFavoritesIcon(favorite) } function productListChangeComparatorButton(code, sku, comparator, texts) { var button = document.getElementById('finishedButton' + sku); if (button) { button.dataset.comparator = comparator; button.setAttribute('data-comparator', comparator); } var comparatorLink = document.getElementById('productComparatorLink' + code); if (comparatorLink) { var cmpText = (comparator) ? texts.removeComparator : texts.addComparator; comparatorLink.title = cmpText; } var comparatorIcon = document.getElementById('productComparatorIcon' + code); if (comparatorIcon) { var cmpIcon = (comparator) ? '/icons/comparador_on-18.svg' : '/icons/comparador_off-18.svg'; comparatorIcon.setAttribute('src', texts.imagesPath + cmpIcon); } updateHeaderComparatorIcon(comparator) } function technologiesMaterialsRenderPList(materialsTechnologies){ var lista = ''; if(materialsTechnologies && materialsTechnologies != ''){ lista = materialsTechnologies; } var htmlRender = ''; if(lista != ''){ var arrayTM = lista.split(","); for(var i=0;i
' + '' + price + '' + '
'; contentPrice.innerHTML += ''; } if(typeof price !== "undefined"){ var financingPriceP = getFinancingPriceP(price); if(financingPriceP.finalShare != '0'){ contentPrice.innerHTML += '' + 'ou ' + financingPriceP.numShare + 'x de R$ ' + financingPriceP.finalShare + ' sem juros' + '
'; } } priceP = document.getElementById('productPriceP' + code); productListShowElement(priceP); } } else { productListHideElement(priceP); } } var videoLink = document.getElementById('productVideoLink' + code); if (videoLink) { if (video) { videoLink.dataset.video = video; videoLink.style.display = 'block'; } else { videoLink.dataset.video = ''; videoLink.style.display = 'none'; } } if (showPrettyPrices === 'true') { if (priceP && rrpLabel && rrpText) {priceP.innerHTML = rrpLabel + ' : ' + rrpText + ''; productListShowElement(priceP);} if (rrpLabelP && pricePrefix) {rrpLabelP.innerHTML = pricePrefix + ": ";} if (priceStrikethroughBlackP) { if (priceStrikeThrough && (priceStrikeThrough!= 'undefined')) { priceStrikethroughBlackP.innerHTML = priceStrikeThrough; priceStrikethroughBlackP.style.display = 'inline'; priceBlueP.style.display = 'block' } else { priceStrikethroughBlackP.style.display = 'none'; priceBlueP.style.display = 'inline' } } if (priceBlueP && priceTextNoSub) {priceBlueP.innerHTML = priceTextNoSub;} if (onlinePriceWrapperDiv) {onlinePriceWrapperDiv.style.display = 'block';} } else { if (onlinePriceWrapperDiv) {onlinePriceWrapperDiv.style.display = 'none';} } if ((isAlape) && (dsku!=null) && (dsku!="") && (dsku.trim().startsWith("VA"))) { dsku = dsku.replace("VA",""); } if ((codeSpan)&&(sku != 'PUB')) {codeSpan.innerHTML = texts.referenceLabel + ': ' + dsku;} var productDiv = document.getElementById('productDiv' + code); if (productDiv) { var baseUrl = productDiv.dataset.url; if (baseUrl) { var url = productListSetURLParameter(baseUrl, 'sku', sku); var a1 = document.getElementById('productLink1' + code); if (a1) {a1.href = url;} var a2 = document.getElementById('productLink2' + code); if (a2) { a2.href = url; a2.innerHTML = ((description) ? description : ''); } var a3 = document.getElementById('productLink3' + code); if (a3) { a3.href = url; if (isCosmic){ a3.className = (!discontinued) && (purchaseUrl) && (isEcommerce) ? "cart-btn" : "ver"; } } } } var a4 = document.getElementById('productLink4' + code); if (a4) { if (!isCosmic) { a4.style.display = (((discontinued) || (!purchaseUrl)) ? 'none' : ''); } a4.href = purchaseUrl; a4.title = purchaseUrlText; }// var noveltyLi = document.getElementById('productNoveltyLi' + code);// if (noveltyLi) {noveltyLi.style.display = ((novelty) ? '' : 'none');} var noveltySpan = document.getElementById('productNoveltySpan' + code); if (noveltySpan) {noveltySpan.style.display = ((novelty) ? '' : 'none');} var topsalesSpan = document.getElementById('productTopSalesSpan' + code); if (topsalesSpan) {topsalesSpan.style.display = ((topsales) ? '' : 'none');} var discontinuedDiv = document.getElementById('productDiscontinuedDiv' + code); if (discontinuedDiv) {discontinuedDiv.style.display = ((discontinued) ? '' : 'none');} productListChangeFavoriteButton(code, sku, favorite, texts); productListChangeComparatorButton(code, sku, comparator, texts); productListSelectedFinisheds[code] = sku; } } function getDiscountPercentage (priceOld , priceNew) { priceOld = priceOld.replace(/[^0-9,]+/g, ""); priceOld = parseFloat(priceOld.replace(/,/g,".")); priceNew = priceNew.replace(/[^0-9,]+/g, ""); priceNew = parseFloat(priceNew.replace(/,/g,".")); let percentageDiscount = null; if (priceOld !== 0 && priceNew !== priceOld && priceNew !== 0) { percentageDiscount = (((100 * ( priceNew - priceOld) / priceOld)) ).toFixed(); } return percentageDiscount; } function productListChangeFavorite(code, texts) { var sku = productListSelectedFinisheds[code]; if (sku) { var data = {}; data[texts.namespace + 'resourceAction'] = 'resourceSetFavorite'; data[texts.namespace + 'resourceSku'] = sku; $.ajax({ url : texts.resourceURL, method : 'post', data : data }).done(function(result) { if (result.success) { productListChangeFavoriteButton(code, sku, result.favorite, texts); var text = (result.favorite) ? texts.favoriteAdded : texts.favoriteRemoved; var icon = (result.favorite) ? 'favon-18.svg' : 'favoff-18.svg' productListShowNotification(code, icon, text, texts, 'https://www.laufen.com/user-area?section=favorites'); } }); } } function productListChangeComparator(code, texts) { var sku = productListSelectedFinisheds[code]; if (sku) { var data = {}; data[texts.namespace + 'resourceAction'] = 'resourceSetComparator'; data[texts.namespace + 'resourceSku'] = sku; $.ajax({ url : texts.resourceURL, method : 'post', data : data }).done(function(result) { if (result.success) { productListChangeComparatorButton(code, sku, result.comparator, texts); var text = (result.comparator) ? texts.comparatorAdded : texts.comparatorRemoved; var icon = (result.comparator) ? 'comparador_on-18.svg' : 'comparador_off-18.svg' productListShowNotification(code, icon, text, texts, 'https://www.laufen.com/user-area?section=comparator'); } }); } } function productListGetInsertBefore(websort, container) { if ((websort)&&(container)&&(container.childNodes)&&(container.childNodes.length)) { for (var i=0;i