custom/plugins/Itptheme/src/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_delivery_informations %}
  3.     {# CIO-AI-Driven: Delivery-Infos nur anzeigen, wenn "itp" in der kompletten URL vorkommt #}
  4.     {% set requestUrl = app.request ? (app.request.uri|lower) : '' %}
  5.     {% if 'itp' in requestUrl %}
  6.         {{ parent() }}
  7.     {% endif %}
  8. {% endblock %}
  9. {% block page_product_detail_buy_container %}
  10.     {% block page_product_detail_name_container %}
  11.         <div class="d-none d-lg-block product-detail-name-container">
  12.             {% block page_product_detail_name %}
  13.                 <h1 class="product-detail-name"
  14.                     itemprop="name">
  15.                     {{ page.product.translated.name }}
  16.                 </h1>
  17.                 {% if page.product.productNumber %}
  18.                     <div class="product-detail-ordernumber-container">
  19.                         {% block page_product_detail_ordernumber_label %}
  20.                             <span class="product-detail-ordernumber-label">
  21.                             {{ "detail.productNumberLabel"|trans|sw_sanitize }}
  22.                         </span>
  23.                         {% endblock %}
  24.                         {% block page_product_detail_ordernumber %}
  25.                             <meta itemprop="productID"
  26.                                   content="{{ page.product.id }}"/>
  27.                             <span class="product-detail-ordernumber"
  28.                                   itemprop="sku">
  29.                             {{ page.product.productNumber }}
  30.                         </span>
  31.                         {% endblock %}
  32.                     </div>
  33.                 {% endif %}
  34.             {% endblock %}
  35.             {# Anzeige und Tetra Funktion auskommentiert, das kommt erst später
  36.             {% set itpNumber = false %}
  37.             {% set headDiscount = false %}
  38.             {% if context.customer is null %}
  39.                 <div class="product-detail-ordernumber-container">
  40.                     {{ "detail.productPriceLoggedOut"|trans|sw_sanitize }}
  41.                 </div>
  42.             {% else %}
  43.                 {% set foo = context.customer.customFields %}
  44.                 {% for key,value in foo %}
  45.                     {% if key == "custom_customer_itpnumber" %}
  46.                         {% if value is not null %}
  47.                             {% set itpNumber = value %}
  48.                         {% endif %}
  49.                     {% endif %}
  50.                     {% if key == "custom_tetra_head_discount" %}
  51.                         {% if value is not null %}
  52.                             {% set headDiscount = value %}
  53.                         {% endif %}
  54.                     {% endif %}
  55.                 {% endfor %}
  56.                 {% if itpNumber == false and headDiscount == false %}
  57.                     <div class="product-detail-ordernumber-container">
  58.                         {{ "detail.noItpNumberAvailable"|trans|sw_sanitize }}
  59.                     </div>
  60.                 {% endif %}
  61.             {% endif %}
  62.             #}
  63.         </div>
  64.     {% endblock %}
  65.     {{ parent() }}
  66. {% endblock %}
  67. {% block page_product_detail_ordernumber_container %}
  68. {% endblock %}