custom/plugins/MadBodymedTheme/src/Resources/views/storefront/page/product-detail/index.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/page/product-detail/index.html.twig' %}
  2. {% block base_main %}
  3.     {% set categoryColor = "" %}
  4.     {% for item in page.header.navigation.tree %}
  5.         {% if item.category.uniqueIdentifier in page.product.categoryTree and item.category.uniqueIdentifier != 'a7c5001cdb8d4ad99479e16ce2f1b97b' and item.category.childCount == 0 %}
  6.             {% set categoryColor = item.category.translated.customFields.custom_category_info_color %}
  7.         {% endif %}
  8.         {# is in subcategory #}
  9.         {% if item.category.childCount > 0 %}
  10.             {% set child = item.children %}
  11.             {% for item in child %}
  12.                 {% if item.category.uniqueIdentifier in page.product.categoryTree and item.category.uniqueIdentifier != 'a7c5001cdb8d4ad99479e16ce2f1b97b' %}
  13.                     {% set categoryColor = item.category.translated.customFields.custom_category_info_color %}
  14.                 {% endif %}
  15.             {% endfor %}
  16.         {% endif %}
  17.     {% endfor %}
  18.     <div class="product-detail-hero-banner" style="--category-color: {{ categoryColor }};"></div>
  19.     {{ parent() }}
  20.     <div class="modal fade pricelist-modal"
  21.          id="pricelistModal"
  22.          tabindex="-1"
  23.          role="dialog">
  24.         <div class="modal-dialog modal-lg modal-dialog-scrollable modal-dialog-centered"
  25.              role="document">
  26.             <div class="modal-content">
  27.                 <div class="modal-header">
  28.                     <div class="modal-title h5">
  29.                         Preisliste
  30.                     </div>
  31.                     <button type="button"
  32.                             class="modal-close close"
  33.                             data-dismiss="modal"
  34.                             aria-label="Close">
  35.                         <span aria-hidden="true">
  36.                             {% sw_icon 'x' style { 'size': 'sm' } %}
  37.                         </span>
  38.                     </button>
  39.                 </div>
  40.                 <div class="modal-body">
  41.                     {% for price in page.product.calculatedPrices %}
  42.                         <div class="product-block-prices-row"
  43.                              itemprop="offers" itemscope
  44.                              data-quantity="{{ price.quantity }}"
  45.                              itemtype="https://schema.org/Offer">
  46.                             <div class="product-block-prices-cell product-block-prices-cell-thin">
  47.                                 <meta itemprop="priceCurrency" content="{{ page.header.activeCurrency.translated.shortName }}" />
  48.                                 <meta itemprop="price" content="{{ price.unitPrice }}" />
  49.                                 <link itemprop="availability" href="https://schema.org/InStock" />
  50.                                 {% if loop.last %}
  51.                                     <span class="product-block-prices-quantity"> {{ "detail.priceDataInfoFrom"|trans|sw_sanitize }} {{ price.quantity }} {{ "detail.bodymed.quantity"|trans|sw_sanitize }}</span>
  52.                                 {% else %}
  53.                                     <span class="product-block-prices-quantity">{{ "detail.priceDataInfoUntil"|trans|sw_sanitize }} {{ price.quantity }} {{ "detail.bodymed.quantity"|trans|sw_sanitize }}</span>
  54.                                 {% endif %}
  55.                             </div>
  56.                             <div class="product-block-prices-cell">
  57.                                 {% sw_include '@Storefront/storefront/component/product/block-price.html.twig' with {
  58.                                     price: price
  59.                                 } only %}
  60.                             </div>
  61.                             {% if price.referencePrice is not null %}
  62.                                 <div class="product-block-prices-cell product-block-prices-cell-thin">
  63.                                     {{ price.referencePrice.price|currency }}{{ "general.star"|trans|sw_sanitize }} / {{ price.referencePrice.referenceUnit }} {{ price.referencePrice.unitName }}
  64.                                 </div>
  65.                             {% endif %}
  66.                         </div>
  67.                     {% endfor %}
  68.                 </div>
  69.             </div>
  70.         </div>
  71.     </div>
  72.     </div>
  73. {% endblock %}
  74. {% block page_product_detail_media %}
  75.     <div class="col-lg-7 product-detail-media" style="--category-color: {{ categoryColor }};">
  76.         {% sw_include '@Storefront/storefront/page/product-detail/badges.html.twig' %}
  77.         {% if page.product.media %}
  78.             {% sw_include '@Storefront/storefront/element/cms-element-image-gallery.html.twig' with {
  79.                 'mediaItems': mediaItems,
  80.                 'zoom': true,
  81.                 'zoomModal': true,
  82.                 'displayMode': 'contain',
  83.                 'gutter': 5,
  84.                 'minHeight': '500px',
  85.                 'navigationArrows': 'inside',
  86.                 'navigationDots': 'inside',
  87.                 'galleryPosition': 'left',
  88.                 'isProduct': true,
  89.                 'fallbackImageTitle': page.product.translated.name,
  90.                 'startIndexThumbnails': page.product.cover.position + 1,
  91.                 'startIndexSlider': page.product.cover.position + 1
  92.             } %}
  93.         {% endif %}
  94.         <div class="row no-gutters product-detail-highlight-row">
  95.             <div class="col-auto product-detail-highlighted-properties-col">
  96.                 {% sw_include '@Storefront/storefront/page/product-detail/highlighted-properties.html.twig' %}
  97.             </div>
  98.             <div class="col-auto product-detail-bbd-col">
  99.                 {# @todo: MHD nur für Partner #}
  100.                 {% if page.product.translated.customFields.custom_product_configuration_mhd %}
  101.                     <div class="product-detail-bbd">
  102.                         {{ "detail.productMHD"|trans }} {{ page.product.translated.customFields.custom_product_configuration_mhd|date("m/Y") }}
  103.                     </div>
  104.                 {% endif %}
  105.             </div>
  106.         </div>
  107.     </div>
  108. {% endblock %}
  109. {% block page_product_detail_buy %}
  110.     <div class="col-lg-5 product-detail-buy" style="--category-color: {{ categoryColor }};">
  111.         {% sw_include '@Storefront/storefront/page/product-detail/buy-widget.html.twig' %}
  112.     </div>
  113. {% endblock %}
  114. {% block page_product_detail_tabs %}
  115. {% endblock %}
  116. {% block page_product_detail_cross_selling %}
  117.     {% if page.product.extensions.webinarProduct %}
  118.         <div class="detail-webinar-product">
  119.             {% sw_include '@Storefront/storefront/page/product-detail/webinar-product.html.twig' %}
  120.         </div>
  121.     {% endif %}
  122.     {{ parent() }}
  123. {#{% if is_mykey_product(page.product) %}
  124.         {% if is_mykey_available() %}
  125.             mykey available
  126.         {% endif %}
  127.         {% if is_mykey_allowed(page.product) %}
  128.             mykey allowed
  129.         {% endif %}
  130.     {% endif %}#}
  131. {% endblock %}