custom/plugins/Wingsacademy/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_head %}
  3.     {% sw_include '@Storefront/storefront/page/product-detail/meta.html.twig' %}
  4. {% endblock %}
  5. {% block base_content %}
  6.     {% block page_product_detail %}
  7.         <div class="product-detail row"
  8.              itemscope
  9.              itemtype="https://schema.org/Product">
  10.             {% block page_product_detail_inner %}
  11.                 {% block page_product_detail_content %}
  12.                     <div class="product-detail-content col-12">
  13.                         {% block page_product_detail_headline %}
  14.                             <div class="row align-items-center product-detail-headline wa-mb-11">
  15.                                 {% sw_include '@Storefront/storefront/page/product-detail/headline.html.twig' %}
  16.                             </div>
  17.                         {% endblock %}
  18.                         {% set mediaItems = page.product.media.media %}
  19.                         {% block page_product_detail_main %}
  20.                             <div class="row product-detail-main">
  21.                                 {% block page_product_detail_media %}
  22.                                     <div class="col-lg-4 product-detail-media">
  23.                                         {% if page.product.media %}
  24.                                             {% sw_include '@Storefront/storefront/element/cms-element-image-gallery.html.twig' with {
  25.                                                 'mediaItems': mediaItems,
  26.                                                 'zoom': true,
  27.                                                 'zoomModal': true,
  28.                                                 'displayMode': 'contain',
  29.                                                 'gutter': 5,
  30.                                                 'minHeight': '130px',
  31.                                                 'navigationArrows': 'inside',
  32.                                                 'navigationDots': 'inside',
  33.                                                 'galleryPosition': 'left',
  34.                                                 'isProduct': true,
  35.                                                 'fallbackImageTitle': page.product.translated.name,
  36.                                                 'startIndexThumbnails': 1,
  37.                                                 'startIndexSlider': 1,
  38.                                                 'keepAspectRatioOnZoom': false
  39.                                             } %}
  40.                                         {% endif %}
  41.                                     </div>
  42.                                 {% endblock %}
  43.                                 {% block page_product_detail_information %}
  44.                                 {# Meta info #}
  45.                                     {# {% set lastCalculatedPrice = page.product.calculatedPrices|last %} #}
  46.                                     {# <div itemtype="https://schema.org/Product" itemscope>
  47.                                         <meta itemprop="name" content="{{ page.product.translated.name }}">
  48.                                         <meta itemprop="price" content="Ab {{ lastCalculatedPrice.unitPrice }}">
  49.                                         <div itemprop="offers" itemtype="https://schema.org/AggregateOffer" itemscope>
  50.                                             <meta itemprop="lowPrice" content="{{ lastCalculatedPrice.unitPrice }}" />
  51.                                             <meta itemprop="offerCount" content="ab {{ lastCalculatedPrice.quantity }}" />
  52.                                             <meta itemprop="priceCurrency" content="EUR" />
  53.                                         </div>
  54.                                      </div> #}
  55.                                     {# --------- #}
  56.                                     <div class="col-lg-4 product-detail-information">
  57.                                         <div class="wa-fs-22 wa-lh-30 wa-fw-medium wa-mb-17">Preisstaffelung nach Lizenzen</div>
  58.                                         <ul class="list-unstyled">
  59.                                             {% set qtyIndexStarter = 1 %}
  60.                                             {% for price in page.product.calculatedPrices %}
  61.                                                 <li class="col-xs-12 col-sm-7 col-md-7 col-lg-10 col-xl-8 mb-1 mt-1 wa-border-bottom-gray-1">
  62.                                                     <div class="row justify-content-between wa-fs-14 wa-lh-28">
  63.                                                         <span class="mr-1">
  64.                                                             {{qtyIndexStarter}}{% if qtyIndexStarter != 'ab ' %}-{% endif %}{{price.quantity}}
  65.                                                         </span>
  66.                                                         <span>
  67.                                                             <strong>{{ price.unitPrice|currency }}</strong>/pro Lizenz
  68.                                                         </span>
  69.                                                     </div>
  70.                                                 </li>
  71.                                                 {% if loop.revindex == 2 %}
  72.                                                     {% set qtyIndexStarter = 'ab ' %}
  73.                                                     {% else %}
  74.                                                     {% set qtyIndexStarter = price.quantity + 1 %}
  75.                                                 {% endif %}
  76.                                             {% endfor %}
  77.                                         </ul>
  78.                                     </div>
  79.                                 {% endblock %}
  80.                                 {% block page_product_detail_buy %}
  81.                                     <div class="col-lg-4 product-detail-buy">
  82.                                         {% sw_include '@Storefront/storefront/page/product-detail/buy-widget.html.twig' %}
  83.                                     </div>
  84.                                 {% endblock %}
  85.                             </div>
  86.                         {% endblock %}
  87.                     </div>
  88.                 {% endblock %}
  89.                 {% block page_product_detail_tabs %}
  90.                     <div class="product-detail-tabs col-12 col-lg-8">
  91.                         {% sw_include '@Storefront/storefront/page/product-detail/tabs.html.twig' %}
  92.                     </div>
  93.                 {% endblock %}
  94.                 <div class="col-12 col-lg-4 product-detail-extra-content">
  95.                     {% block page_product_detail_tabs_properties %}
  96.                         <div class="product-detail-properties d-flex flex-column">
  97.                             <p class="m-0 mb-2 product-detail-properties-short-info wa-fw-semibold text-center">
  98.                                 {{ 'component.product.info.short_info'|trans|sw_sanitize }}
  99.                             </p>
  100.                             {% if page.product.customFields.custom_product_official_title %}
  101.                                 <p class="my-1 product-detail-properties-official-title">
  102.                                     <span class="wa-fw-semibold mr-1">{{ 'component.product.info.official_title'|trans|sw_sanitize }}:</span>
  103.                                     <span>{{ page.product.customFields.custom_product_official_title|raw }}</span>
  104.                                 </p>
  105.                             {% endif %}
  106.                             {% for group in page.product.sortedProperties %}
  107.                                 {% if group.id != "9ffabc4362c24478a348c6ed88da897d" %}
  108.                                     {% block page_product_detail_properties_table_row %}
  109.                                     <p class="my-1">
  110.                                         {% block page_product_detail_properties_item_label %}
  111.                                             <span class="wa-fw-semibold mr-1">{{ group.translated.name|e }}:</span>
  112.                                         {% endblock %}
  113.                                         {% block page_product_detail_properties_item_value %}
  114.                                             <span>
  115.                                                 {% apply spaceless %}
  116.                                                     {% for option in group.options %}
  117.                                                         {% set i = ( i | default(0) ) + 1 %}
  118.                                                         <span>{% if i > 1 %}, {% endif %}{{ option.translated.name|e }}</span>
  119.                                                     {% endfor %}
  120.                                                 {% endapply %}
  121.                                             </span>
  122.                                         {% endblock %}
  123.                                     </p>
  124.                                     {% endblock %}
  125.                                 {% endif %}
  126.                             {% endfor %}  
  127.                         </div>
  128.                     {% endblock %}
  129.                     {% block page_product_detail_cross_selling %}
  130.                         {% if page.crossSellings.elements is defined and page.crossSellings.elements|filter(item => item.total > 0)|length > 0 %}
  131.                             <div class="product-detail-cross-selling">
  132.                                 {% sw_include '@Storefront/storefront/page/product-detail/cross-selling/tabs.html.twig' with {
  133.                                     crossSellings: page.crossSellings
  134.                                 } %}
  135.                             </div>
  136.                         {% endif %}
  137.                     {% endblock %}
  138.                 </div>
  139.                 {#TODO: If the products downloaded contain, than make here looping #}
  140.                 {# {% block page_product_detail_downloads %}
  141.                     {% set fileContents = [{name: "File 1", link: "#"},{name: "File 2", link: "#"}] %}
  142.                     {% if fileContents|length > 0 %}
  143.                             <div>
  144.                                 <p class="wa-fs-24 wa-text-gray text-center text-md-left">Downloads</p>
  145.                             {% for file in fileContents %}
  146.                                 <div class="row ml-2">
  147.                                     <div class="col-12 my-2">
  148.                                         <a href="{{ file.link }}" target="_blank">
  149.                                              <img src="{{ asset('bundles/wingsacademy/file-icon.svg', 'asset') }}">
  150.                                             <span class="ml-2 wa-fs-14 wa-text-gray">{{ file.name }}</span>
  151.                                         </a>
  152.                                     </div>
  153.                                 </div>
  154.                             {% endfor %}
  155.                             </div>
  156.                         {% endif %}
  157.                 {% endblock %} #}
  158.                 {#TODO If the product contain reviews, than make here template for reviews #}
  159.                 {# {% block  page_product_detail_review %}
  160.                         <div id="wa_page_product_detail_review" data-product-id="{{ page.product.id }}" class="product-detail-review-item">
  161.                             TEST
  162.                         </div>
  163.                 {% endblock %} #}
  164.             {% endblock %}
  165.         </div>
  166.     {% endblock %}
  167. {% endblock %}