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

Open in your IDE?
  1. {% sw_extends "@Storefront/storefront/page/product-detail/cross-selling/tabs.html.twig" %}
  2. {% block page_product_detail_cross_selling_tabs_inner %}
  3.     {% set counter = 0 %}
  4.     {% for item in crossSellings %}
  5.         {% if item.crossSelling.active and item.getProducts().elements and (item.crossSelling.display == "everywhere" or item.crossSelling.display == "sliderOnly" or not item.crossSelling.display) %}
  6.             {% set counter = counter + 1 %}
  7.         {% endif %}
  8.     {% endfor %}
  9.     {% if counter > 0 %}
  10.         {{ parent() }}
  11.     {% endif %}
  12. {% endblock %}
  13. {% block page_product_detail_cross_selling_tabs_navigation_container %}
  14.     <ul class="nav nav-tabs product-detail-tab-navigation-list"
  15.         id="product-detail-cross-selling-tabs"
  16.         role="tablist">
  17.         {% for item in crossSellings %}
  18.             {% set id = item.crossSelling.id %}
  19.             {% if item.crossSelling.active and item.getProducts().elements and (item.crossSelling.display == "everywhere" or item.crossSelling.display == "sliderOnly" or not item.crossSelling.display) %}
  20.                 <li class="nav-item">
  21.                     <a class="nav-link product-detail-tab-navigation-link{% if not isActiveTab and (item.crossSelling.display == "everywhere" or item.crossSelling.display == "sliderOnly" or not item.crossSelling.display) %} active{% set isActiveTab = true %}{% endif %}"
  22.                        id="cs-{{ id }}-tab"
  23.                        data-toggle="tab"
  24.                        href="#cs-{{ id }}-tab-pane"
  25.                        role="tab"
  26.                        aria-controls="cs-{{ id }}-tab-pane"
  27.                        aria-selected="true">
  28.                         {{ item.crossSelling.translated.name }}
  29.                         <span class="product-detail-tab-navigation-icon">
  30.                             {% sw_icon 'arrow-medium-right' style {'pack':'solid'} %}
  31.                         </span>
  32.                     </a>
  33.                 </li>
  34.             {% endif %}
  35.         {% endfor %}
  36.     </ul>
  37. {% endblock %}
  38. {% block page_product_detail_cross_selling_tabs_content_container %}
  39.     <div class="tab-content">
  40.         {% for item in crossSellings %}
  41.             {% set id = item.crossSelling.id %}
  42.             {% if item.crossSelling.active and item.getProducts().elements and (item.crossSelling.display == "everywhere" or item.crossSelling.display == "sliderOnly" or not item.crossSelling.display) %}
  43.                 <div class="tab-pane fade show{% if not isActiveContent and (item.crossSelling.display == "everywhere" or item.crossSelling.display == "sliderOnly" or not item.crossSelling.display) %} active{% set isActiveContent = true %}{% endif %}"
  44.                      id="cs-{{ id }}-tab-pane"
  45.                      role="tabpanel"
  46.                      aria-labelledby="cs-{{ id }}-tab">
  47.                     {% set config = {
  48.                         'title': {
  49.                             'value': item.crossSelling.name
  50.                         },
  51.                         'border': {
  52.                             'value': false
  53.                         },
  54.                         'rotate': {
  55.                             'value': false
  56.                         },
  57.                         'products': {
  58.                             'value': item.getProducts()
  59.                         },
  60.                         'boxLayout': {
  61.                             'value': 'standard'
  62.                         },
  63.                         'elMinWidth': {
  64.                             'value': '300px'
  65.                         },
  66.                         'navigation': {
  67.                             'value': true
  68.                         },
  69.                         'displayMode': {
  70.                             'value': 'minimal'
  71.                         },
  72.                         'verticalAlign': {
  73.                             'value': 'top'
  74.                         },
  75.                     } %}
  76.                     {% sw_include "@Storefront/storefront/element/cms-element-product-slider.html.twig" with {
  77.                         sliderConfig: config,
  78.                         element: {
  79.                             'data': {
  80.                                 'products': {
  81.                                     elements: item.getProducts()
  82.                                 }
  83.                             },
  84.                             type: 'product-slider'
  85.                         }
  86.                     } only %}
  87.                 </div>
  88.             {% endif %}
  89.         {% endfor %}
  90.     </div>
  91. {% endblock %}