custom/plugins/ChiliCustom/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.                 <p class="delivery-information delivery-available">
  38.                     <span class="delivery-status-indicator bg-success"></span>
  39.                     {{ "Auf Lager"|upper}}
  40.                 </p>
  41.             {% endblock %}
  42.         {% elseif product.isCloseout and product.availableStock < product.minPurchase %}
  43.             {% block component_delivery_information_soldout %}
  44.                 <link itemprop="availability" href="http://schema.org/LimitedAvailability"/>
  45.                 <p class="delivery-information delivery-soldout">
  46.                     <span class="delivery-status-indicator bg-danger"></span>
  47.                     {{ "detail.soldOut"|trans|sw_sanitize }}
  48.                 </p>
  49.             {% endblock %}
  50.         {% elseif product.availableStock < product.minPurchase and product.deliveryTime and product.restockTime %}
  51.             {% block component_delivery_information_restock %}
  52.                 <link itemprop="availability" href="http://schema.org/LimitedAvailability"/>
  53.                 <p class="delivery-information delivery-restock">
  54.                     <span class="delivery-status-indicator bg-warning"></span>
  55.                     {{ "detail.deliveryTimeRestock"|trans({
  56.                         '%count%': product.restockTime,
  57.                         '%restockTime%': product.restockTime,
  58.                         '%name%': product.deliveryTime.translation('name')
  59.                     })|sw_sanitize }}
  60.                 </p>
  61.             {% endblock %}
  62.         {% endif %}
  63.     </div>
  64. {% endblock %}