{% sw_extends '@Storefront/storefront/page/checkout/summary.html.twig' %}
{% block page_checkout_summary_inner %}
{% set sumPseudoDiscount = 0 %}
{% for lineItemPseudo in page.cart.lineItems %}
{% set sumPseudoDiscount = sumPseudoDiscount + (lineItemPseudo.price.listPrice.discount * lineItemPseudo.quantity) %}
{% endfor %}
{% sw_include '@Storefront/storefront/page/checkout/summary/summary-position.html.twig' with { 'summary': summary } %}
{% sw_include '@Storefront/storefront/page/checkout/summary/summary-shipping.html.twig' with { 'summary': summary } %}
{% if summary.price.taxStatus == 'gross' %}
{% sw_include '@Storefront/storefront/page/checkout/summary/summary-total.html.twig' with {
'total': total,
'decimals': decimals
} %}
{% if displayRounded %}
{% sw_include '@Storefront/storefront/page/checkout/summary/summary-total-rounded.html.twig' with {
'summary': summary,
'decimals': context.totalRounding.decimals
} %}
{% endif %}
{% if 'confirmPage' === controllerAction %}
<dt class="col-5 checkout-aside-summary-label"></dt>
<dd class="col-7 checkout-aside-summary-value ott-pseudo-price-discount">{{ 'ott.checkout.summaryDiscountSavings'|trans|striptags }} <span class="ott-pseudo-price-discount-value">{{ (sumPseudoDiscount * -1)|currency }}</span></dd>
{% endif %}
{% sw_include '@Storefront/storefront/page/checkout/summary/summary-net.html.twig' with { 'summary': summary } %}
{% sw_include '@Storefront/storefront/page/checkout/summary/summary-tax.html.twig' with { 'summary': summary } %}
{% else %}
{% sw_include '@Storefront/storefront/page/checkout/summary/summary-net.html.twig' with { 'summary': summary } %}
{% sw_include '@Storefront/storefront/page/checkout/summary/summary-tax.html.twig' with { 'summary': summary } %}
{% sw_include '@Storefront/storefront/page/checkout/summary/summary-total.html.twig' with {
'total': total,
'decimals': decimals
} %}
{% if displayRounded %}
{% sw_include '@Storefront/storefront/page/checkout/summary/summary-total-rounded.html.twig' with {
'summary': summary,
'decimals': context.totalRounding.decimals
} %}
{% endif %}
{% if 'confirmPage' === controllerAction %}
<dt class="col-5 checkout-aside-summary-label"></dt>
<dd class="col-7 checkout-aside-summary-value ott-pseudo-price-discount">{{ 'ott.checkout.summaryDiscountSavings'|trans|striptags }} <span class="ott-pseudo-price-discount-value">{{ (sumPseudoDiscount * -1)|currency }}</span></dd>
{% endif %}
{% endif %}
{% endblock %}