<% for(var i=0; i < recommendations.length; i++) { %>
<% var soldesPicto = 'Soldes !'; var lang = 'FR'; if (window.location.href.indexOf('badminton-point.de/') > 0) { soldesPicto = 'Verkäufe!'; lang = 'DE'; } else if (window.location.href.indexOf('badminton-point.com/') > 0) { soldesPicto = 'Sales!'; lang = 'ENG'; } %> <% if ( recommendations[i].product.newstodate != null && recommendations[i].product.importDate != null && new Date(recommendations[i].product.newstodate) > new Date(recommendations[i].product.importDate) && recommendations[i].product.promoNew === 'PROMO' && Math.round((100 - recommendations[i].product.price * 100 / recommendations[i].product.publicprice)) > 15 ) { %>
<%= window.vars.pictoNew %>
<% if (typeof recommendations[i].product.goodDeal !== 'undefined' && recommendations[i].product.goodDeal !== null && recommendations[i].product.goodDeal.toLowerCase() === 'yes') { %>
<%= soldesPicto %>
<% } %> -<%= Math.round((100 - recommendations[i].product.price * 100 / recommendations[i].product.publicprice)) %>%
<% } else if ( recommendations[i].product.newstodate != null && recommendations[i].product.importDate != null && new Date(recommendations[i].product.newstodate) > new Date(recommendations[i].product.importDate) ) { %>
<%= window.vars.pictoNew %>
<% } else if ( recommendations[i].product.promoNew === 'PROMO' && Math.round((100 - recommendations[i].product.price * 100 / recommendations[i].product.publicprice)) > 15 ) { %>
<% if (typeof recommendations[i].product.goodDeal !== 'undefined' && recommendations[i].product.goodDeal !== null && recommendations[i].product.goodDeal.toLowerCase() === 'yes') { %>
<%= soldesPicto %>
<% } %> -<%= Math.round((100 - recommendations[i].product.price * 100 / recommendations[i].product.publicprice)) %>%
<% } %>
<%= recommendations[i].product.title %>
<% if (parseFloat(recommendations[i].product.price) < parseFloat(recommendations[i].product.publicprice)) { %>
<%= recommendations[i].product.publicprice.toLocaleString('fr', { minimumFractionDigits: 2 }) %>€
<%= recommendations[i].product.price.toLocaleString('fr', { minimumFractionDigits: 2 }) %>€
<% }else{ %>
<%= recommendations[i].product.price.toLocaleString('fr', { minimumFractionDigits: 2 }) %>€
<% } %>
<%}%>