% 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 : ''; %>