custom/static-plugins/EfbStorefront/Resources/views/storefront/page/product-detail/buy-widget.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/page/product-detail/buy-widget.html.twig' %}
  2. {% block page_product_detail_price %}
  3.     {% if context.customer is not null %}
  4.         <div class="product-detail-price-container">
  5.             {% if config('EmzEfbExtension.config.freightProductPropertyGroup') %}
  6.                 {% set hasMatchingGroupId = false %}
  7.                 {% for element in page.product.properties.elements %}
  8.                     {% if element.groupId == config('EmzEfbExtension.config.freightProductPropertyGroup') %}
  9.                         {% set hasMatchingGroupId = true %}
  10.                         {% break %}
  11.                     {% endif %}
  12.                 {% endfor %}
  13.                 {% if hasMatchingGroupId %}
  14.                     {% sw_include '@Storefront/storefront/utilities/alert.html.twig' with {
  15.                         type: 'info',
  16.                         content: "freightInfo.alert"|trans|sw_sanitize
  17.                     } %}
  18.                 {% endif %}
  19.             {% endif %}
  20.             {% sw_include '@Storefront/storefront/page/product-detail/buy-widget-price.html.twig' %}
  21.         </div>
  22.     {% endif %}
  23. {% endblock %}
  24. {% block page_product_detail_tax %}
  25.     {% if context.customer is not null %}
  26.         {{ parent() }}
  27.         {% if context.salesChannel.customFields.custom_fields_sales_channel_pack_unit_info %}
  28.             {% set catId = context.salesChannel.customFields.custom_fields_sales_channel_pack_unit_info %}
  29.             {% set packUnitText = "detail.packUnitInfoLabel"|trans|sw_sanitize %}
  30.             <div class="product-detail-pack-unit-info-container">
  31.                 <p class="product-detail-pack-unit-info">
  32.                     <a class="product-detail-pack-unit-info-link"
  33.                        href="{{ path('frontend.cms.page',{ id: catId }) }}"
  34.                        title="{{ packUnitText }}"
  35.                        data-toggle="modal"
  36.                        data-url="{{ path('frontend.cms.page',{ id: catId }) }}">
  37.                         {{ packUnitText }}
  38.                     </a>
  39.                 </p>
  40.             </div>
  41.         {% endif %}
  42.     {% endif %}
  43. {% endblock %}
  44. {% block page_product_detail_delivery_informations %}
  45.     {% if context.customer is not null %}
  46.         {% set stockInfo = decodeStockInfo(page.product, context) %}
  47.         {% if stockInfo and stockInfo.stock is defined %}
  48.             <div class="product-detail-delivery-information">
  49.                 <div class="product-detail-delivery-information-stock">
  50.                     {% if stockInfo.stock > 0 %}
  51.                         <span class="delivery-status-indicator bg-success"></span>
  52.                     {% elseif stockInfo.restock is not empty or stockInfo.reorder %}
  53.                         <span class="delivery-status-indicator bg-warning"></span>
  54.                     {% else %}
  55.                         <span class="delivery-status-indicator bg-danger"></span>
  56.                     {% endif %}
  57.                     {% if stockInfo.stock > 0 %}
  58.                         {% if stockInfo.stock > 1000 %}
  59.                             {{ "detail.inStock"|trans({'%stock%': '1000+'})|sw_sanitize }}
  60.                         {% else %}
  61.                             {{ "detail.inStock"|trans({'%stock%': stockInfo.stock})|sw_sanitize }}
  62.                         {% endif %}
  63.                     {% else %}
  64.                         {{ "detail.noStock"|trans|sw_sanitize }}
  65.                     {% endif %}
  66.                 </div>
  67.                 {% if stockInfo.restock is defined and stockInfo.restock is iterable and stockInfo.restock|length > 0 %}
  68.                     <div class="product-detail-delivery-information-restock">
  69.                         <span class="product-detail-delivery-information-restock-info">
  70.                             {{ "detail.restockAvailable"|trans|sw_sanitize }}
  71.                         </span>
  72.                         {% for cw, amount in stockInfo.restock %}
  73.                             <span class="product-detail-delivery-information-restock-item">
  74.                                 {{ "detail.restock"|trans({'%cw%': cw, '%amount%': amount})|sw_sanitize }}
  75.                             </span>
  76.                         {% endfor %}
  77.                     </div>
  78.                 {% endif %}
  79.                 {% if stockInfo.reorder %}
  80.                     <div class="product-detail-delivery-information-reorder">
  81.                         {{ "detail.reorder"|trans({'%cw%': stockInfo.reorder})|sw_sanitize }}
  82.                     </div>
  83.                 {% endif %}
  84.             </div>
  85.         {% else %}
  86.             {{ parent() }}
  87.         {% endif %}
  88.     {% endif %}
  89. {% endblock %}
  90. {% block page_product_detail_configurator_include %}
  91.     {% set configuratorSettings = []|merge(page.configuratorSettings|filter(setting => setting.translated.name is not same as('fallback_model'))) %}
  92.     {% if page.product.parentId and configuratorSettings|length > 0 %}
  93.         <div class="product-detail-configurator-container">
  94.             {% sw_include '@Storefront/storefront/page/product-detail/configurator.html.twig' %}
  95.         </div>
  96.     {% endif %}
  97. {% endblock %}
  98. {% block page_product_detail_data %}
  99.     {{ parent() }}
  100.     {% if page.product.translated.name %}
  101.         <div class="product-detail-full-name-container">
  102.             <span class="product-detail-full-name">
  103.                 {{ page.product.translated.name }}
  104.             </span>
  105.         </div>
  106.     {% endif %}
  107.     {% if page.product.productNumber %}
  108.         <div class="product-detail-ordernumber-container">
  109.             <span class="product-detail-ordernumber-label">
  110.                 {{ "detail.productNumberLabel"|trans|sw_sanitize }}
  111.             </span>
  112.             <meta itemprop="productID"
  113.                   content="{{ page.product.id }}"/>
  114.             <span class="product-detail-ordernumber"
  115.                   itemprop="sku">
  116.                 {{ page.product.productNumber }}
  117.             </span>
  118.         </div>
  119.     {% endif %}
  120.     {% if page.product.ean %}
  121.         <div class="product-detail-ean-container">
  122.             <span class="product-detail-ean-label">
  123.                 {{ "detail.productEanLabel"|trans|sw_sanitize }}
  124.             </span>
  125.             <span class="product-detail-ean">
  126.                 {{ page.product.ean }}
  127.             </span>
  128.         </div>
  129.     {% endif %}
  130. {% endblock %}
  131. {% block page_product_detail_ordernumber_container %}
  132. {% endblock %}
  133. {% block page_product_detail_add_to_compare_button %}
  134. {% endblock %}
  135.  {% block page_product_detail_tax_link %}    
  136.         {{ taxText }}
  137. {% endblock %}