{% sw_extends '@Storefront/storefront/base.html.twig' %} {% block base_body_inner %} {# Runtime merchant-configured colors + border radii for the intercept page. Applied to `:root` so all descendants inherit; emitted here in (the standard HTML5 place for page-scoped stylesheets) so styles resolve on the first paint — no flash of unstyled content. Why an inline
{% if orderId %}
Order #{{ orderNumber }}
{% endif %}
{{ confirmationTitle|sw_sanitize }}
{{ confirmationLinkText|sw_sanitize }} ›

Order Confirmed

{% set bannerPct = discountPercent|default(0) %} {% if upsellProducts is defined and upsellProducts is iterable and upsellProducts|length > 0 %} {% set heroProduct = upsellProducts|first %} {% set heroId = heroProduct.id|default('')|lower|replace({'-': ''}) %} {% if productDiscounts is defined and productDiscounts[heroId] is defined and productDiscounts[heroId] is not null %} {% set bannerPct = productDiscounts[heroId] %} {% endif %} {% endif %} {% if countdownSeconds > 0 and expiresAt %} {% set bannerTpl = bubbleTextTemplate|default('') %} {% if bannerTpl is empty or '{countdown}' not in bannerTpl %} {% set bannerTpl = 'You can still add to your order – limited time: {countdown}' %} {% endif %} {% if customerFirstName %} {% set bannerTpl = bannerTpl|replace({'{name}': customerFirstName|sw_sanitize}) %} {% else %} {% set bannerTpl = bannerTpl|replace({'{name},': '', '{name}': ''}) %} {% endif %} {% if bannerPct > 0 %} {% set bannerTpl = bannerTpl|replace({'{discount}': bannerPct|round(0) ~ '%'}) %} {% else %} {% set bannerTpl = bannerTpl|replace({'{discount}% OFF': '', '{discount}%': '', '{discount}': ''}) %} {% endif %} {% set parts = bannerTpl|split('{countdown}') %}
{{ parts[0]|sw_sanitize|raw }}{% set m = (countdownSeconds / 60)|round(0, 'floor') %}{% set s = (countdownSeconds % 60) %}{{ m }}:{{ '%02d'|format(s) }}{{ parts[1]|default('')|sw_sanitize|raw }}
{% endif %}
{{ confirmationTitle|sw_sanitize }}
{{ confirmationLinkText|sw_sanitize }} ›
{% if countdownSeconds > 0 and expiresAt %}
{% set m = (countdownSeconds / 60)|round(0, 'floor') %}{% set s = (countdownSeconds % 60) %}{{ m }}:{{ '%02d'|format(s) }}
{% endif %}

{% set bubbleTpl = bubbleTextTemplate %} {% if customerFirstName %} {% set bubbleTpl = bubbleTpl|replace({'{name}': '' ~ customerFirstName|sw_sanitize ~ ','}) %} {% else %} {% set bubbleTpl = bubbleTpl|replace({'{name},': ''})|replace({'{name}': ''}) %} {% endif %} {% if bannerPct > 0 %} {% set bubbleTpl = bubbleTpl|replace({'{discount}%': '' ~ bannerPct|round(0) ~ '% OFF'}) %} {% set bubbleTpl = bubbleTpl|replace({'{discount}': bannerPct|round(0) ~ '%'}) %} {% else %} {% set bubbleTpl = bubbleTpl|replace({'{discount}% OFF': ''})|replace({'{discount}%': ''})|replace({'{discount}': ''}) %} {% endif %} {% if countdownSeconds > 0 and expiresAt and '{countdown}' in bubbleTpl %} {% set parts = bubbleTpl|split('{countdown}') %} {{ parts[0]|sw_sanitize|raw }} {% set m = (countdownSeconds / 60)|round(0, 'floor') %}{% set s = (countdownSeconds % 60) %}{{ m }}:{{ '%02d'|format(s) }} {{ parts[1]|sw_sanitize|raw }} {% else %} {% set bubbleTpl = bubbleTpl|replace({'{countdown}': ''}) %} {{ bubbleTpl|sw_sanitize|raw }} {% endif %}

✓ Continue to my order →
{% for product in upsellProducts %} {% if loop.first %}
{% elseif loop.index % 2 == 0 %}
OR
{% endif %} {% if not loop.first %}
{% endif %} {% set pid = product.id %} {% set isConfig = pid in configurableProductIds %} {% set variants = isConfig ? (variantsByProductId[pid] ?? []) : [] %} {% set unitPrice = product.calculatedPrice is not null ? product.calculatedPrice.unitPrice : 0 %} {% set pidKey = (pid|default(''))|lower|replace({'-': ''}) %} {% set effectivePct = (productDiscounts[pidKey] is defined and productDiscounts[pidKey] is not null) ? productDiscounts[pidKey] : discountPercent %} {% set dPrice = effectivePct > 0 ? (unitPrice * (1 - effectivePct / 100))|round(2) : unitPrice %} {% set dAmount = effectivePct > 0 ? (unitPrice - dPrice)|round(2) : 0 %} {% set cover = product.cover is not null and product.cover.media is not null ? product.cover.media.url : '' %} {% set imgs = [] %} {% if cover %}{% set imgs = [cover] %}{% endif %} {% if product.media is not empty %} {% for m in product.media %} {% if m.media is not null and m.media.url is not empty and m.media.url != cover %} {% set imgs = imgs|merge([m.media.url]) %} {% endif %} {% endfor %} {% endif %}
{% for img in imgs %} {{ product.translated.name|default('')|sw_sanitize }} {% endfor %} {% if imgs|length > 1 %}
{% for i in 1..imgs|length %} {% endfor %}
{% endif %}
{% if upsellProducts|length == 1 %} {{ (badgeText ?: 'New')|sw_sanitize }}
{{ badgeText|sw_sanitize }}
{% endif %}
{{ product.translated.name|default('')|sw_sanitize }}
{% if effectivePct > 0 %} {{ unitPrice|currency }} {% endif %} {{ dPrice|currency }} {% if effectivePct > 0 %} (Save {{ effectivePct|round(0) }}%) {% endif %}
{% set spDescRaw = product.translated.description ?? product.translated.metaDescription ?? '' %} {% set spDesc = spDescRaw|striptags|trim %} {% if spDesc %}
{{ spDesc }}
{% endif %} {% if isConfig and variants is not empty %} {% set varSimple = [] %} {% for v in variants %} {% set varSimple = varSimple|merge([{id: v.id, label: v.label, groups: v.groups ?? []}]) %} {% endfor %}
👆 Please select all options to continue.
{% endif %}
✓ Added to your order!
Ships with your current order.
{% if hasOneClick %} {% else %}
{% if effectivePct > 0 %} {% set spIsTimed = countdownSeconds > 0 and expiresAt %} {% set spEffExpiresAt = sellops_upsell_discount_expiry(spIsTimed ? expiresAt : 0) %} {% if spIsTimed %} {% endif %} {% endif %}
{% endif %}
{% if loop.first %}
{% else %}
{% if loop.index % 2 == 1 or loop.last %}
{% endif %} {% endif %} {% endfor %}
{% endblock %}