custom/plugins/zenitPlatformHorizon/src/Resources/views/storefront/element/cms-element-product-slider.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/element/cms-element-product-slider.html.twig' %}
  2. {% block element_product_slider %}
  3.     {# TODO: Check again as soon as Shopware solves the bug in the original code itself. #}
  4.     {% if not config %}
  5.         {% set config = element.fieldConfig.elements %}
  6.     {% endif %}
  7.     {% if not sliderConfig %}
  8.         {% set sliderConfig = element.fieldConfig.elements %}
  9.     {% endif %}
  10.     {# ... in context of crossselling, they include this template with sliderConfig: config #}
  11.     {# however, config and sliderConfig are used in the mix. So I set both variables to the same value #}
  12.     {% if not config and sliderConfig %}
  13.         {% set config = sliderConfig %}
  14.     {% endif %}
  15.     {% if element.data.products.elements %}
  16.         <div class="cms-element-{{ element.type }}{% if sliderConfig.displayMode.value == "standard" and sliderConfig.verticalAlign.value %} has-vertical-alignment{% endif %}">
  17.             {{ block('element_product_slider_alignment') }}
  18.         </div>
  19.     {% endif %}
  20. {% endblock %}
  21. {% block element_product_slider_slider %}
  22.     {% set productSliderOptions = productSliderOptions|replace_recursive({
  23.         slider: {
  24.             gutter: theme_config('zen-product-listing-card-padding')
  25.         }
  26.     }) %}
  27.     {{ parent() }}
  28. {% endblock %}