custom/plugins/XioniXconfig/src/Resources/views/storefront/component/delivery-information.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/component/delivery-information.html.twig' %}
  2. {% block component_delivery_information %}
  3.     {# @var product \Shopware\Core\Content\Product\ProductEntity #}
  4.     {% if page is defined and page.product is defined %}
  5.         {% set product = page.product %}
  6.     {% endif %}
  7.     <div class="product-delivery-information">
  8.         {% if product.shippingFree %}
  9.             {% block component_delivery_information_shipping_free %}
  10.                 <p class="delivery-information delivery-shipping-free">
  11.                     <span class="delivery-status-indicator bg-info"></span>
  12.                     {{ "general.deliveryShippingFree"|trans|sw_sanitize }}
  13.                 </p>
  14.             {% endblock %}
  15.         {% endif %}
  16.         {% if not product.active %}
  17.             {% block component_delivery_information_not_available %}
  18.                 <link itemprop="availability"
  19.                       href="http://schema.org/LimitedAvailability"/>
  20.                 <p class="delivery-information delivery-not-available">
  21.                     <span class="delivery-status-indicator bg-danger"></span>
  22.                     {{ "general.deliveryNotAvailable"|trans|sw_sanitize }}
  23.                 </p>
  24.             {% endblock %}
  25.         {% elseif product.releaseDate and product.releaseDate|date('U') > "now"|date('U') %}
  26.             {% block component_delivery_information_pre_order %}
  27.                 <link itemprop="availability"
  28.                       href="http://schema.org/PreOrder"/>
  29.                 <p class="delivery-information delivery-preorder">
  30.                     <span class="delivery-status-indicator bg-warning"></span>
  31.                     {{ "general.deliveryShipping"|trans|sw_sanitize }} {{ product.releaseDate|format_date('long', locale=app.request.locale) }}
  32.                 </p>
  33.             {% endblock %}
  34.         {% elseif product.availableStock >= product.minPurchase and product.deliveryTime %}
  35.             {% block component_delivery_information_available %}
  36.                 <link itemprop="availability" href="http://schema.org/InStock"/>
  37.                 <div class="delivery-headline">Lieferzeit</div>
  38.                 <p class="delivery-information delivery-available">
  39.                     <span class="delivery-status-indicator bg-success"></span>
  40.                     {{ product.deliveryTime.translation('name')|replace({ ("Tage"): "Werktage" }) }}
  41.                 </p>
  42.             {% endblock %}
  43.         {% elseif product.isCloseout and product.availableStock < product.minPurchase %}
  44.             {% block component_delivery_information_soldout %}
  45.                 <link itemprop="availability" href="http://schema.org/LimitedAvailability"/>
  46.                 <p class="delivery-information delivery-soldout">
  47.                     <span class="delivery-status-indicator bg-danger"></span>
  48.                     {{ "detail.soldOut"|trans|sw_sanitize }}
  49.                 </p>
  50.             {% endblock %}
  51.         {% elseif product.availableStock < product.minPurchase and product.deliveryTime and product.restockTime %}
  52.             {% block component_delivery_information_restock %}
  53.                 <link itemprop="availability" href="http://schema.org/LimitedAvailability"/>
  54.                 <p class="delivery-information delivery-restock">
  55.                     <span class="delivery-status-indicator bg-warning"></span>
  56.                     {{ "detail.deliveryTimeRestock"|trans({
  57.                         '%count%': product.restockTime,
  58.                         '%restockTime%': product.restockTime,
  59.                         '%name%': product.deliveryTime.translation('name')
  60.                     })|sw_sanitize }}
  61.                 </p>
  62.             {% endblock %}
  63.         {% else %}
  64.                 {% if product.deliveryTime %}
  65.                 <link itemprop="availability" href="http://schema.org/InStock"/>
  66.                 <div class="delivery-headline">Lieferzeit</div>
  67.                 <p class="delivery-information delivery-available">
  68.                     <span class="delivery-status-indicator bg-success"></span>
  69.                     {{ product.deliveryTime.translation('name')|replace({ ("Tage"): "Werktage" }) }}
  70.                 </p>    
  71.                 {% else %}
  72.                 <link itemprop="availability" href="http://schema.org/InStock"/>
  73.                 <div class="delivery-headline">Lieferzeit</div>
  74.                 <p class="delivery-information delivery-available">
  75.                     <span class="delivery-status-indicator bg-success"></span>
  76.                     5-7 Werktage
  77.                 </p>
  78.                 {% endif %}
  79.         {% endif %}
  80.     </div>
  81. {% endblock %}