vendor/shopware/storefront/Resources/views/storefront/element/cms-element-cross-selling.html.twig line 1

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