¿Qué tipo de producto estás buscando?
Tapas y asientos para inodoro
'; } 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; containerNoveltyTopSales = containerNoveltyTopSales.replaceAll("||", ""); if(containerNoveltyTopSales.includes("{N}")){ containerNoveltyTopSales = containerNoveltyTopSales.replace('{N}', '
Novedad
'); } if(containerNoveltyTopSales.includes("{T}")){ if(selected.includes("{N}")){ containerNoveltyTopSales = containerNoveltyTopSales.replace('{T}', '
Top Ventas
'); }else{ containerNoveltyTopSales = containerNoveltyTopSales.replace('{T}', '
Top Ventas
'); } } h1.innerHTML = infoArray[0]; containerNoveltyTopSales = containerNoveltyTopSales.replace(infoArray[1],""); containerNoveltyTopSales = containerNoveltyTopSales.replace(infoArray[0],""); containerNoveltyTopSales = containerNoveltyTopSales + '
'; var indexFilters = containerNoveltyTopSales.indexOf(" - ");if(indexFilters>0){var filtrosStr = containerNoveltyTopSales.substring(indexFilters);containerNoveltyTopSales=containerNoveltyTopSales.replace(filtrosStr,"");h1.innerHTML = infoArray[0]+filtrosStr;}if( $(".prod-list-title").length){$(".prod-list-title .salesNoveltyContainer").remove(); $(".prod-list-title").append(containerNoveltyTopSales); }else{ h1.insertAdjacentHTML("beforebegin",'
'); $(".prod-list-title").html(containerNoveltyTopSales); $("#selectedFiltersH1").prependTo(".prod-list-title");} }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
0) ? ' (' + cat.count + ')' : '');} var check = document.getElementById('categoryCheck' + cat.code); if (check) {check.checked = cat.checked;} } } function productListUpdateFilterGroups(groups, update, hasProducts, texts) { var section = document.getElementById('filtersSection'); if (section) { var highlighted = document.getElementById('highlightedFilterGroupsUL'), more = document.getElementById('moreFilterGroupsUL'); if ((groups)&&(groups.length)) { for (var i=0;i ' + group.selected.selectedMin + ')'; } else if (group.selected.selectedMax) { selected += ' ( < ' + group.selected.selectedMax + ')'; } } } if (selected) { span.innerHTML = selected; productListShowElement(span); } else { productListHideElement(span); } } } } function productListGetFilterGroupHTML(group, texts) { var code = group.code, name = group.name, description = group.description, selected = '', highlighted = group.highlighted, display = group.displayType, menuClass = '', addRow = true, isSearch = false; if (group.selected) { if (group.selected.selectedNumber) { selected = texts.some + ' (' + group.selected.selectedNumber + ')'; } else if (group.selected.selectedString) { selected = group.selected.selectedString; if ((group.selected.selectedMin)&&(group.selected.selectedMax)) { selected += ' (' + group.selected.selectedMin + ' - ' + group.selected.selectedMax + ')'; } else if (group.selected.selectedMin) { selected += ' ( > ' + group.selected.selectedMin + ')'; } else if (group.selected.selectedMax) { selected += ' ( < ' + group.selected.selectedMax + ')'; } } } var html = ''; if (highlighted) { if (display == 'THUMBNAILS') {menuClass = 'menu-image-filter';} else if (display == 'MAC') {menuClass = 'menu-material-filter';} else if (display == 'ICONS') {menuClass = 'menu-finish-filter';} else if (display == 'CHECKS') {menuClass = 'menu-colleccion-filter';} else if (display == 'RANGES') {menuClass = 'menu-measures-filter'; addRow = false;} else if (display == 'SEARCH') {menuClass = 'menu-material-filter'; isSearch = true;} html += '' + '' + '
'; if (description) {html += '
' + description + '
';} if (addRow) {html += '
';} html += '
' + '
'; } else { if (display == 'RANGES') {menuClass = 'menu-price-filter-2';} else if (display == 'ICONS') {menuClass = 'menu-cubetas-filter';} else if (display == 'SEARCH') {menuClass = 'menu-price-filter-2';} else { var hasDescription = false; if ((group.filters)&&(group.filters.length)) { for (var i=0;i' + '' + name + ' ' + ' ' + '
' + '
'; 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 += '
' + '
' + '' + '' + ' ' + ''; if (image) { html += '
'; } html += '
' + name + ((count > 0) ? ' (' + count + ')' : '') + '
' + '
'; } else if (group.displayType == 'MAC') { html += '' + '' + name + ((count > 0) ? ' (' + count + ') ' : '') + ' ' + '' + '' + ' ' + ' ' + ' '; } 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 += '
' + '' + '' + ' ' + '
' + '' + name + ' ' + '
'; } else { var hasDescription = false; if ((group.filters)&&(group.filters.length)) { for (var i=0;i
' + '' + '' + '' + name + ((count > 0) ? ' (' + count + ')' : '') + ' '; if (description) {html += '' + description + ' ';} html += ' ' + '
' + '' + '' + '' + ' ' + ' ' + ' ' + ' '; } else { html += '' + '' + name + ((count > 0) ? ' (' + count + ')' : '') + ' ' + '' + '' + ' ' + ' ' + ' '; } } } 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
';}} }function productListGetPurchaseGuideCardHTML(product) {var html = '';if ((product.videoUrl)&&(product.videoImage)) {html += '
'; html += '
';html += '
';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 += '
'; return html;} function productListGetProductParrywareHTML(product, texts) { var code = product.code, displayCode = ((product.displayCode) ? product.displayCode : code), finished = null, first = null, productUrl = product.url, fselected = false; if ((product.finisheds)&&(product.finisheds.length)) { for (var i=0;i'; html += '' + ((product.category && !isTaps) ? product.category : product.name) +'
'; html += ' '; return html; } function productListGetProductHTML(product, texts) { let isCosmic = false; let isLaufenISH = false; let isCelite = false; let isEcommerce = true; let isRoca = true; let isShowPrice = true; let isAlape = false; var codeDiv = product.code.replaceAll(".",""); var code = product.code, displayCode = ((product.displayCode) ? product.displayCode : code), finished = null, first = null, isSupramodel = product.isSupramodel, isBundle = product.isBundle, isDiscontinued = product.isDiscontinued, productUrl = product.url, r3url = product.r3url, fselected = false, rrpText = product.rrpText, rrpLabel = product.rrpLabel, priceTextNoSub = product.priceTextNoSub, normalPrice = product.normalPrice, hoverImage = product.hoverImage, hoverimagefinished = hoverImage, containsNovelty = product.containsNovelty, containsTopSales = product.containsTopSales; if ((product.finisheds)&&(product.finisheds.length)) { for (var i=0;i