<% if (klevu.dom.helpers.cleanUpPriceValue(dataLocal.salePrice, dataLocal.currency) < klevu.dom.helpers.cleanUpPriceValue(dataLocal.price, dataLocal.currency) && klevu.dom.helpers.cleanUpPriceValue(dataLocal.salePrice, dataLocal.currency) != 0) { %> <%= discountPercentage > 5 ? discountPercentage + '% off' : 'On Offer' %> <% } %> src="<%= dataLocal.image %>" <% } else { %> src="<%= defaultImageProduct %>" <% } %> alt="<%= dataLocal.name %>" <% if (index > 2) { %> loading="lazy" <% } %> sizes="427px" class="default-image card-image lazyautosizes ls-is-cached lazyloaded"> <% if (dataLocal["imageHover"] != undefined && dataLocal.imageHover !== "") {%> <% } %> <%= dataLocal.brand %> <%= dataLocal.name %> <% if (dataLocal.inStock && dataLocal.inStock != "yes") { %> <%= helper.render('landingProductStock', scope, data, dataLocal) %> <% } else { %> <% if (klevu.search.modules.kmcInputs.base.getShowPrices()) { %> <% var kuTotalVariants = klevu.dom.helpers.cleanUpPriceValue(dataLocal.totalVariants); var kuStartPrice = klevu.dom.helpers.cleanUpPriceValue(dataLocal.startPrice, dataLocal.currency); var kuSalePrice = klevu.dom.helpers.cleanUpPriceValue(dataLocal.salePrice, dataLocal.currency); var kuPrice = klevu.dom.helpers.cleanUpPriceValue(dataLocal.price, dataLocal.currency); %> <% if (!Number.isNaN(kuTotalVariants) && !Number.isNaN(kuStartPrice)) { %> <%= helper.translate("Starting at") %> <% if (kuStartPrice != 0) { %> <%= helper.processCurrency(dataLocal.currency, parseFloat(dataLocal.startPrice)).replace(/\s/g, '') %> <% } else { %> <%= helper.processCurrency(dataLocal.currency, parseFloat(dataLocal.price)).replace(/\s/g, '') %> <% } %> <% } else if (!Number.isNaN(kuSalePrice) && !Number.isNaN(kuPrice) && (kuPrice > kuSalePrice)) { %> <%= helper.processCurrency(dataLocal.currency, parseFloat(dataLocal.salePrice)).replace(/\s/g, '') %> <%= helper.translate("Was") %> <%= helper.processCurrency(dataLocal.currency, parseFloat(dataLocal.price)).replace(/\s/g, '') %> <% } else if (!Number.isNaN(kuSalePrice)) { %> <%= helper.processCurrency(dataLocal.currency, parseFloat(dataLocal.salePrice)).replace(/\s/g, '') %> <% } else if (!Number.isNaN(kuPrice)) { %> <%= helper.processCurrency(dataLocal.currency, parseFloat(dataLocal.price)).replace(/\s/g, '') %> <% } %> <%= helper.render('searchResultProductVATLabel', scope, data, dataLocal) %> <% } %> <% } %>