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

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/page/product-detail/tabs.html.twig' %}
  2. {% set crossSellings = page.crossSellings %}
  3. {% block page_product_detail_tabs_navigation %}
  4.     <div class="card-header product-detail-tab-navigation">
  5.         {% block page_product_detail_tabs_navigation_container %}
  6.             <ul class="nav nav-tabs product-detail-tab-navigation-list"
  7.                 id="product-detail-tabs"
  8.                 role="tablist">
  9.                 {% block page_product_detail_tabs_navigation_description %}
  10.                     <li class="nav-item">
  11.                         <a class="nav-link {% if (ratingSuccess != 1) and (ratingSuccess != -1) %}active{% endif %} product-detail-tab-navigation-link"
  12.                            id="description-tab"
  13.                            data-toggle="tab"
  14.                            data-offcanvas-tabs="true"
  15.                            href="#description-tab-pane"
  16.                            role="tab"
  17.                            aria-controls="description-tab-pane"
  18.                            aria-selected="true">
  19.                             <span>{{ "detail.tabsDescription"|trans|sw_sanitize }}</span>
  20.                             <span class="product-detail-tab-navigation-icon">
  21.                                         {% sw_icon 'arrow-medium-right' style {'pack':'solid'} %}
  22.                                     </span>
  23.                             {% if page.product.translated.description|length > 0 %}
  24.                                 <span class="product-detail-tab-preview">
  25.                                             {{ page.product.translated.description|raw|striptags|sw_sanitize|u.truncate(125, '…') }}
  26.                                     {% if page.product.translated.description|length >= 126 %}
  27.                                         <span class="product-detail-tab-preview-more">{{ "detail.tabsPreviewMore"|trans|sw_sanitize }}</span>
  28.                                     {% endif %}
  29.                                         </span>
  30.                             {% endif %}
  31.                         </a>
  32.                     </li>
  33.                 {% endblock %}
  34.                 {% block page_product_detail_tabs_navigation_review %}
  35.                     {% if config('core.listing.showReview') %}
  36.                         <li class="nav-item">
  37.                             <a class="nav-link {% if (ratingSuccess == 1) or (ratingSuccess == -1) %}active{% endif %} product-detail-tab-navigation-link"
  38.                                id="review-tab"
  39.                                data-toggle="tab"
  40.                                data-offcanvas-tabs="true"
  41.                                href="#review-tab-pane"
  42.                                role="tab"
  43.                                aria-controls="review-tab-pane"
  44.                                aria-selected="true">
  45.                                 {{ "detail.tabsReview"|trans|sw_sanitize }}
  46.                                 <span class="product-detail-tab-navigation-icon">
  47.                                             {% sw_icon 'arrow-medium-right' style {'pack':'solid'} %}
  48.                                         </span>
  49.                             </a>
  50.                         </li>
  51.                     {% endif %}
  52.                 {% endblock %}
  53.                 {% for item in crossSellings %}
  54.                     {% set id = item.crossSelling.id %}
  55.                     {% if item.crossSelling.active and item.getProducts().elements %}
  56.                         <li class="nav-item">
  57.                             <a class="nav-link product-detail-tab-navigation-link"
  58.                                id="cs-{{ id }}-tab"
  59.                                data-toggle="tab"
  60.                                data-offcanvas-tabs="true"
  61.                                href="#cs-{{ id }}-tab-pane"
  62.                                role="tab"
  63.                                aria-controls="cs-{{ id }}-tab-pane"
  64.                                aria-selected="true">
  65.                                 {{ item.crossSelling.translated.name }}
  66.                                 <span class="product-detail-tab-navigation-icon">
  67.                                             {% sw_icon 'arrow-medium-right' style {'pack':'solid'} %}
  68.                                         </span>
  69.                             </a>
  70.                         </li>
  71.                     {% endif %}
  72.                 {% endfor %}
  73.             </ul>
  74.         {% endblock %}
  75.     </div>
  76. {% endblock %}
  77.  {% block page_product_detail_tabs_content_container %}
  78.      <div class="tab-content">
  79.          {% block page_product_detail_tabs_content_description %}
  80.              <div class="tab-pane fade show {% if (ratingSuccess != 1) and (ratingSuccess != -1) %}active{% endif %}"
  81.                   id="description-tab-pane"
  82.                   role="tabpanel"
  83.                   aria-labelledby="description-tab">
  84.                  {% sw_include '@Storefront/storefront/page/product-detail/description.html.twig' %}
  85.              </div>
  86.          {% endblock %}
  87.          {% block page_product_detail_tabs_content_review %}
  88.              {% if config('core.listing.showReview') %}
  89.                  <div class="tab-pane fade show {% if (ratingSuccess == 1) or (ratingSuccess == -1) %}active{% endif %}"
  90.                       id="review-tab-pane"
  91.                       role="tabpanel"
  92.                       aria-labelledby="review-tab">
  93.                      {% sw_include '@Storefront/storefront/page/product-detail/review/review.html.twig' with {'reviews': page.reviews} %}
  94.                  </div>
  95.              {% endif %}
  96.          {% endblock %}
  97.          {% for item in crossSellings %}
  98.              {% set id = item.crossSelling.id %}
  99.              {% if item.crossSelling.active and item.getProducts().elements %}
  100.                  <div class="tab-pane fade show cross-selling-tab"
  101.                       id="cs-{{ id }}-tab-pane"
  102.                       role="tabpanel"
  103.                       aria-labelledby="cs-{{ id }}-tab">
  104.                      <h3>{{ item.crossSelling.translated.name }}</h3>
  105.                      <div class="row">
  106.                          {% for product in item.getProducts().elements %}
  107.                              <div class="col-12 col-md-6 col-lg-4 mt-3">
  108.                                  {% block element_product_listing_box %}
  109.                                      {% sw_include '@Storefront/storefront/component/product/card/box.html.twig' with {
  110.                                          'layout': boxLayout,
  111.                                          'displayMode': displayMode,
  112.                                          'product':product
  113.                                      } %}
  114.                                  {% endblock %}
  115.                              </div>
  116.                          {% endfor %}
  117.                      </div>
  118.                  </div>
  119.              {% endif %}
  120.          {% endfor %}
  121.      </div>
  122.  {% endblock %}