<% const onSale = typeof forceOnSale !== 'undefined' ? forceOnSale : (typeof isSaleActive === 'function' && isSaleActive(product)); const eff = typeof forceEffective !== 'undefined' ? forceEffective : (typeof effectivePrice === 'function' ? effectivePrice(product) : product.price_cents); const oldCents = product.price_cents; const pct = onSale && typeof salePercent === 'function' ? salePercent(product) : (onSale && oldCents ? Math.round(((oldCents - eff) / oldCents) * 100) : 0); const sizeMod = typeof priceSize !== 'undefined' ? ' price-block--' + priceSize : ''; %>
<% if (onSale) { %>
<%- include('partials/icon', { name: 'tag', iconSize: 12 }) %> Акция −<%= pct %>%
<%= formatPrice(oldCents) %> <%= formatPrice(eff) %>
<% if (typeof showSavings !== 'undefined' && showSavings) { %> Экономия <%= formatPrice(oldCents - eff) %> <% } %> <% } else { %> <%= formatPrice(oldCents) %> <% } %>