vendor/shopware/storefront/Resources/views/storefront/page/product-detail/cross-selling/tabs.html.twig line 1

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