custom/plugins/SwagCmsExtensions/src/Resources/views/storefront/element/cms-element-cross-selling.html.twig line 1

Open in your IDE?
  1. {# ToDo CMS-184 - (Core MinVersion 6.4.2.0) Remove this file #}
  2. {% sw_extends '@Storefront/storefront/element/cms-element-cross-selling.html.twig' %}
  3. {# This is an exact copy of the core (6.4.1.0) content with just the `only` parameter removed on `sw_include` #}
  4. {% block cms_element_cross_selling_tabs_content_container %}
  5.     <div class="tab-content">
  6.         {% for item in element.data.crossSellings.elements %}
  7.             {% set crossSelling = item.crossSelling %}
  8.             {% set products = item.products %}
  9.             {% set id = crossSelling.id %}
  10.             {% if crossSelling.active and products %}
  11.                 <div class="tab-pane fade show{% if loop.first %} active{% endif %}"
  12.                      id="cross-selling-tab-{{ id }}-pane"
  13.                      role="tabpanel"
  14.                      aria-labelledby="cross-selling-tab-{{ id }}">
  15.                     {% set config = {
  16.                         'title': {
  17.                             'value': null
  18.                         },
  19.                         'border': {
  20.                             'value': false
  21.                         },
  22.                         'rotate': {
  23.                             'value': false
  24.                         },
  25.                         'products': {
  26.                             'value': products
  27.                         },
  28.                         'boxLayout': {
  29.                             'value': sliderConfig.boxLayout.value
  30.                         },
  31.                         'elMinWidth': {
  32.                             'value': sliderConfig.elMinWidth.value
  33.                         },
  34.                         'navigation': {
  35.                             'value': true
  36.                         },
  37.                         'displayMode': {
  38.                             'value': sliderConfig.displayMode.value
  39.                         },
  40.                         'verticalAlign': {
  41.                             'value': center
  42.                         }
  43.                     } %}
  44.                     {% sw_include "@Storefront/storefront/element/cms-element-product-slider.html.twig" with {
  45.                         sliderConfig: config,
  46.                         element: {
  47.                             'data': {
  48.                                 'products': products
  49.                             },
  50.                             type: 'product-slider'
  51.                         }
  52.                     } %}
  53.                 </div>
  54.             {% endif %}
  55.         {% endfor %}
  56.     </div>
  57. {% endblock %}