<% var todayDate = Math.round(new Date().getTime()) %>
<% if (recommendations[i].product.categories.indexOf('soldeshiver2020') > -1 && todayDate > Date.parse('2020-01-08 08:00:00') && todayDate < Date.parse('2020-02-04 23:59:00')) { %>
<% } %>
<%= recommendations[i].product.marque %>
<%= recommendations[i].product.title %>
<% if (typeof recommendations[i].product.price !== undefined) {
if (recommendations[i].product.typePromo === 'BRII') { %>
<%= recommendations[i].product.price.toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2}) %> €
<%= recommendations[i].product.oldPrice.toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2}) %> €
<% } else if (recommendations[i].product.typePromo === 'FID' && config.variables['$userLoyaltyCard'] === true) {
var newPrice = recommendations[i].product.price - ((recommendations[i].product.price * recommendations[i].product.promoPercent) / 100);
%>
<%= newPrice.toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2}) %> €
<%= recommendations[i].product.price.toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2}) %> €
<%} else {%>
<%= recommendations[i].product.price.toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2}) %> €
<% }
} %>
<%= recommendations[i].product.promoPercent%>
<% if (recommendations[i].product.promoUnit === 'P') { %>
%
<%} else if (recommendations[i].product.promoUnit === 'E') {%>
€
<%}%>
<% if (recommendations[i].product.typePromo === 'FID') { %>
de remise avec la carte E.Leclerc
<% } else if (recommendations[i].product.typePromo === 'BRII') { %>
de réduction immédiate
<%}%>