custom/plugins/FuerstenbergPorzellan/src/Resources/views/storefront/page/checkout/_page.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/page/checkout/_page.html.twig' %}
  2. {% block page_checkout_aside_summary %}
  3.     {{parent()}}
  4.     {% set delivery = page.cart.deliveries.first %}
  5.     {% set displayDeliverInfo = 0 %}
  6.     {% for lineItem in page.cart.lineItems %}
  7.         
  8.         {% set deliveryPosition = delivery.positions.get(lineItem.id) %}
  9.         {% set earliest = deliveryPosition.deliveryDate.earliest|format_date('short', locale=app.request.locale) %}
  10.         {% set latest = deliveryPosition.deliveryDate.latest|format_date('short', locale=app.request.locale) %}
  11.         {% for lineItem2 in page.cart.lineItems %}
  12.             {% set deliveryPosition2 = delivery.positions.get(lineItem2.id) %}
  13.             {% set earliest2 = deliveryPosition2.deliveryDate.earliest|format_date('short', locale=app.request.locale) %}
  14.             {% set latest2 = deliveryPosition2.deliveryDate.latest|format_date('short', locale=app.request.locale) %}
  15.             {% if earliest != earliest2 or latest != latest2 %}
  16.                 {% set displayDeliverInfo = 1 %}
  17.             {% endif %}
  18.         {% endfor %}
  19.     {% endfor %}
  20.     
  21.     {% if displayDeliverInfo == 1 %}
  22.         {% sw_include '@Storefront/storefront/utilities/alert.html.twig' with {
  23.             type: 'info',
  24.             content: 'checkout.differentdelivery'|trans|sw_sanitize
  25.         } %}
  26.     {% endif %}
  27. {% endblock %}