QUEL TYPE DE PRODUIT RECHERCHEZ-VOUS?
WCs lavants
trier par
Haut de page
Revenir aux filtres
'; } 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}")){ var infoArray = selected.split(" "); selected.replace(' {N} '+infoArray[2], ''); 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 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 : ''; //console.log('MIN/MAX: ' + filter.minValue + ' - ' + filter.maxValue); //console.log('SELECTED: ' + filter.selectedMinValue + ' - ' + filter.selectedMaxValue); 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 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 += '
' + '
' + // '
- ' + // '' + // '
' + '
'; if (!isSupramodel) {html += '';} html += '
' + ''; if (hoverImage) {html += '';}//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'; if (showActionsOnOver) { html +='
' + '' + texts.viewProduct + ''; html += ''; html += '
' if (!isSupramodel) { html += '
' + '
- '; if (r3url) { html += '
- ' + '' + ''+ '' + ' '; } html += '
- ' + '' + '
' + '' + '
' + ' - ' + '' + '
' + '' + '
' + '
' + '
'; } } html += '
'; html += '
'; if (product.category) { html += '
'; html += '
' + product.category + '
'; html += '
'; } if (!isSupramodel) { html += '
' + '
- '; if (r3url) { html += '
- ' + '' + ''+ '' + ' '; } html += '
- ' + '' + '
' + '' + '
' + ' - ' + '' + '
' + '' + '
' + '
' + '
'; } html += '
'; html += '
' + '' + product.name + ''; if ((!isSupramodel)&&(!isBundle)) { html += '' + texts.referenceLabel + ': ' + displayCode + ''; } html += '
'; html += '
'; let isLaufenISH = true; if ((product.finisheds)&&(product.finisheds.length)) { for (var i=0;i
'; html += '
'; if (product.dimensions) {html += '
' + product.dimensions + '
';} html += '
'; if (!finished || !finished.showPrettyPrices) { html += '
'; } else { 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 += '
' + '
' + '
' + '
' + '' + texts.viewProduct + ''; 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 productListChangeFinished(button, texts) { var code = button.dataset.product, sku = button.dataset.sku, dsku = button.dataset.dsku, image = button.dataset.image, price = button.dataset.price, pricePrefix = button.dataset.priceprefix, favorite = (button.dataset.favorite == 'true'), comparator = (button.dataset.comparator == 'true'), novelty = (button.dataset.novelty == 'true'), discontinued = (button.dataset.discontinued == 'true'), purchaseUrl = button.dataset.url, purchaseUrlText = button.dataset.urltext, rrpText = button.dataset.rrptext, rrpLabel = button.dataset.rrplabel, priceTextNoSub = button.dataset.pricetextnosub, alt = button.dataset.alt, priceStrikeThrough = button.dataset.pricestrikethrough, showPrettyPrices = button.dataset.showprettyprice, video = button.dataset.urlvideo; if ((code)&&(sku)) { var parent = button.parentNode; for (var child of parent.childNodes) { if (child.dataset.sku == sku) {child.className = 'fondo selected';} else if (child.classList.contains("color-overflow")) {/* skip color-overflow indicator */} else {child.className = 'fondo';} } var imageDiv = document.getElementById('productImageDiv' + code), priceP = document.getElementById('productPriceP' + code), codeSpan = document.getElementById('productCodeSpan' + code), rrpLabelP = document.getElementById('rrpLabel' + code), priceStrikethroughBlackP = document.getElementById('priceStrikethroughBlack' + code), priceBlueP = document.getElementById('priceBlue' + code), onlinePriceWrapperDiv = document.getElementById('js-online-price-wrapper' + code); if ((imageDiv)&&(image)) { imageDiv.style.backgroundImage = 'url(' + image + ')'; imageDiv.title = alt; } if (priceP) { if ((price)&&(price !== undefined)&&(!discontinued)) { priceP.innerHTML = pricePrefix + ' : ' + price + ''; 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 ((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;} var a3 = document.getElementById('productLink3' + code); if (a3) {a3.href = url;} } } var a4 = document.getElementById('productLink4' + code); if (a4) { 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 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 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.ch/fr-CH/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.ch/fr-CH/user-area?section=comparator'); } }); } } function productListGetInsertBefore(websort, container) { if ((websort)&&(container)&&(container.childNodes)&&(container.childNodes.length)) { for (var i=0;i