vendor/shopware/storefront/Resources/views/storefront/component/delivery-information.html.twig line 1

Open in your IDE?
  1. {% block component_delivery_information %}
  2.     {# @var product \Shopware\Core\Content\Product\ProductEntity #}
  3.     {% set product = page.product %}
  4.     <div class="product-delivery-information">
  5.         {% if product.shippingFree %}
  6.             {% block component_delivery_information_shipping_free %}
  7.                 <p class="delivery-information delivery-shipping-free">
  8.                     <span class="delivery-status-indicator bg-info"></span>
  9.                     {{ "general.deliveryShippingFree"|trans|sw_sanitize }}
  10.                 </p>
  11.             {% endblock %}
  12.         {% endif %}
  13.         {% if not product.active %}
  14.             {% block component_delivery_information_not_available %}
  15.                 <link itemprop="availability"
  16.                       href="http://schema.org/LimitedAvailability"/>
  17.                 <p class="delivery-information">
  18.                     <span class="delivery-status-indicator bg-danger"></span>
  19.                     {{ "general.deliveryNotAvailable"|trans|sw_sanitize }}
  20.                 </p>
  21.             {% endblock %}
  22.         {% elseif product.releaseDate and product.releaseDate|date('U') > "now"|date('U') %}
  23.             {% block component_delivery_information_pre_order %}
  24.                 <link itemprop="availability"
  25.                       href="http://schema.org/PreOrder"/>
  26.                 <p class="delivery-information">
  27.                     <span class="delivery-status-indicator bg-warning"></span>
  28.                     {{ "general.deliveryShipping"|trans|sw_sanitize }} {{ product.releaseDate|format_date('long', locale=app.request.locale) }}
  29.                 </p>
  30.             {% endblock %}
  31.         {% elseif product.availableStock >= product.minPurchase and product.deliveryTime %}
  32.             <link itemprop="availability" href="http://schema.org/InStock"/>
  33.             <p class="delivery-information">
  34.                 <span class="delivery-status-indicator bg-success"></span>
  35.                 {{ "detail.deliveryTimeAvailable"|trans({
  36.                     '%name%': product.deliveryTime.translation('name')
  37.                 })|sw_sanitize }}
  38.             </p>
  39.         {% elseif product.isCloseout and product.availableStock < product.minPurchase %}
  40.             <link itemprop="availability" href="http://schema.org/LimitedAvailability"/>
  41.             <p class="delivery-information">
  42.                 <span class="delivery-status-indicator bg-danger"></span>
  43.                 {{ "detail.soldOut"|trans|sw_sanitize }}
  44.             </p>
  45.         {% elseif product.availableStock < product.minPurchase and product.deliveryTime and product.restockTime %}
  46.             <link itemprop="availability" href="http://schema.org/LimitedAvailability"/>
  47.             <p class="delivery-information">
  48.                 <span class="delivery-status-indicator bg-warning"></span>
  49.                 {{ "detail.deliveryTimeRestock"|trans({
  50.                     '%restockTime%': product.restockTime,
  51.                     '%name%': product.deliveryTime.translation('name')
  52.                 })|sw_sanitize }}
  53.             </p>
  54.         {% endif %}
  55.     </div>
  56. {% endblock %}