<% if (typeof recommendations === 'undefined') recommendations = []; if (recommendations.length > 0) { var widget = 'widget2'; var cerberus = "areaHP_recommendedZone_promo_product"; if (config.widgetKey == '59030b8acb58d47baaa31257') { widget = 'widget3'; cerberus = "areaHP_recommendedZone_top_product"; } %>
<% var endUrl = "#shoppingtool=smartrecoshp"; for(var i=0; i < recommendations.length && i < 16 ; i++) { var product = recommendations[i].product; %>
<% product.url = product.url.replace('http://www.laredoute.fr', ''); /* TEMP : debug var => not found pages */ var debug = 'HP'; if (tc_vars.env_template == 'PDP') { debug = 'PDP1'; if (config.widgetKey == '587ccd6d992fb50660fe8805') { debug = 'PDP2'; } } if (tc_vars.env_template == 'Add To Cart') { debug = 'addToCart'; } if (tc_vars.env_template == 'Search') { debug = 'search'; } if (tc_vars.env_template == 'Basket, Step 1') { debug = 'basket'; } if (tc_vars.env_template == 'Error') { debug = 'error'; } if (tc_vars.env_template == 'Landing') { debug = 'SHP'; } product.stickers = product.stickers ? product.stickers : []; product.stickers = _.indexBy(product.stickers, 'position'); %>
<% if (typeof product.photo !== 'undefined') {%> <% } %> <% if (product.discount > 0 && !window.eb.isMobile()) {%>
-<%= parseInt(product.discount) %>%
<%}%> <% if (product.discount > 0 && window.eb.isMobile()) {%>
-<%= parseInt(product.discount) %>%
<%}%> <% if (product.stickers.ImageInnerLeft && product.stickers.ImageInnerLeft.type == 'Image' && product.stickers.ImageInnerLeft.documentID === product.documentID) { %> <% } %> <% if (product.stickers.ImageInnerRight && product.stickers.ImageInnerRight.type == 'Image' && product.stickers.ImageInnerRight.documentID === product.documentID) { %> <% } %> <% if (product.stickers.ImageInnerLeft && product.stickers.ImageInnerLeft.type == 'HTML' && product.stickers.ImageInnerLeft.documentID === product.documentID) { %> <%= product.stickers.ImageInnerLeft.value %> <% } %> <% if (product.stickers.ImageInnerRight && product.stickers.ImageInnerRight.type == 'HTML' && product.stickers.ImageInnerRight.documentID === product.documentID) { %> <%= product.stickers.ImageInnerRight.value %> <% } %>
<%= product.brand %>
<% var title = typeof product.new_title !== 'undefined' ? product.new_title : product.title; %>
<%= title %>
<% var price = product.finalPrice ; var ecotax = parseFloat(product.ecotax); if (parseFloat(ecotax) > 0) { price = price + ecotax; } price = String(price.toFixed(2)); if (product.discount <= 0) { %> <% if(product.hasSeveralPrices) {%>à partir de<% } %> <%= price %>€ <% if (product.stickers.Descriptionbottom){ %> <% if (product.stickers.Descriptionbottom.type === 'HTML' && !window.eb.isMobile()) {%>
<%= product.stickers.Descriptionbottom.value %>
<% } %> <% if (product.stickers.Descriptionbottom.type === 'Image' && !window.eb.isMobile()) {%> <% } %> <% } %> <%} else { var stringCatalogPrice = String(product.priceCatalog); var promoPrice = parseFloat(stringCatalogPrice.replace(',','.')); if (parseFloat(product.ecotax) > 0) { promoPrice = promoPrice + parseFloat(product.ecotax) ; } promoPrice = String(promoPrice.toFixed(2)); %> <% if (!window.eb.isMobile()) { %>
<%= promoPrice.replace('.',',') %>€
<% if(product.hasSeveralPrices ) {%>à partir de<% } %> <%= price.replace('.',',') %>€ <% } %> <% if (window.eb.isMobile()) { %> <% if(product.hasSeveralPrices) {%>à partir de<% } %>
<%= price.replace('.',',') %>€
<%= promoPrice.replace('.',',') %>€
<% } %> <%}%> <% if (product.ecotax > 0) {%>
dont <%= String(product.ecotax).replace('.',',') %> € d'éco-participation
<%}%>
<% } %>
<% } %>