vendor/frosh/product-compare/src/Resources/views/storefront/element/cms-element-cross-selling.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/element/cms-element-cross-selling.html.twig' %}
  2. {% block cms_element_cross_selling_tabs_content_container %}
  3.     <div class="tab-content">
  4.         {% for item in element.data.crossSellings.elements|filter(item => item.total > 0 and item.crossSelling.active == true) %}
  5.             {% set crossSelling = item.crossSelling %}
  6.             {% set products = item.products %}
  7.             {% set id = crossSelling.id %}
  8.             {% set crossSellingComparable = item.crossSelling.extensions.crossSellingComparable %}
  9.             {% if crossSellingComparable and crossSellingComparable.isComparable %}
  10.                 {% set page = {
  11.                     products: products,
  12.                     properties: crossSelling.extensions.compareProperties
  13.                 } %}
  14.                 <div class="tab-pane fade show{% if loop.first %} active{% endif %}"
  15.                      id="cs-{{ id }}-tab-pane"
  16.                      role="tabpanel"
  17.                      aria-labelledby="cs-{{ id }}-tab">
  18.                     <span class="hidden" data-product-slider="true"></span>
  19.                     {% sw_include '@Storefront/storefront/component/compare/content.html.twig' with {
  20.                         page: page
  21.                     } %}
  22.                 </div>
  23.             {% else %}
  24.                 <div class="tab-pane fade show{% if loop.first %} active{% endif %}"
  25.                      id="cross-selling-tab-{{ id }}-pane"
  26.                      role="tabpanel"
  27.                      aria-labelledby="cross-selling-tab-{{ id }}">
  28.                     {% set config = {
  29.                         'title': {
  30.                             'value': crossSelling.name ?: crossSelling.translated.name
  31.                         },
  32.                         'border': {
  33.                             'value': false
  34.                         },
  35.                         'rotate': {
  36.                             'value': false
  37.                         },
  38.                         'products': {
  39.                             'value': products
  40.                         },
  41.                         'boxLayout': {
  42.                             'value': sliderConfig.boxLayout.value
  43.                         },
  44.                         'elMinWidth': {
  45.                             'value': sliderConfig.elMinWidth.value
  46.                         },
  47.                         'navigation': {
  48.                             'value': true
  49.                         },
  50.                         'displayMode': {
  51.                             'value': sliderConfig.displayMode.value
  52.                         },
  53.                         'verticalAlign': {
  54.                             'value': center
  55.                         }
  56.                     } %}
  57.                     {% block cms_element_cross_selling_tabs_content_container_slider %}
  58.                         {% sw_include "@Storefront/storefront/element/cms-element-product-slider.html.twig" with {
  59.                             sliderConfig: config,
  60.                             element: {
  61.                                 'data': {
  62.                                     'products': products
  63.                                 },
  64.                                 type: 'product-slider'
  65.                             }
  66.                         } %}
  67.                     {% endblock %}
  68.                 </div>
  69.             {% endif %}
  70.         {% endfor %}
  71.     </div>
  72. {% endblock %}