custom/plugins/Theme3S/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_inner %}
  3.     {% if not sliderConfig %}
  4.         {% set sliderConfig = element.fieldConfig.elements %}
  5.     {% endif %}
  6.     {% if element.data.crossSellings.elements is not null %}
  7.         <div class="bottomPageCut2"></div>
  8.         <div class="bottomPageCut3"></div>
  9.         <div id="CrossSellingWrapper">
  10.             <div id="CrossSellingInner">
  11.                 {% if page.header.activeLanguage.translationCode.code == 'en-GB' %}
  12.                     <h1>More products</h1>
  13.                 {% elseif page.header.activeLanguage.translationCode.code == 'nl-NL'  %}
  14.                     <h1>Meer producten</h1>
  15.                 {% elseif page.header.activeLanguage.translationCode.code == 'es-ES'  %}
  16.                     <h1>Más productos</h1>
  17.                 {% elseif page.header.activeLanguage.translationCode.code == 'fr-FR'  %}
  18.                     <h1>Plus de produits</h1>
  19.                 {% elseif page.header.activeLanguage.translationCode.code == 'it-IT'  %}
  20.                     <h1>Più prodotti</h1>
  21.                 {% else %}
  22.                     <h1>Weitere Produkte</h1>
  23.                 {% endif %}
  24.                 <div id="leftSliderArrow" class="sliderarrow">
  25.                          <span class="icon icon-arrow-head-left">
  26.                         <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24" height="24" viewBox="0 0 24 24"><defs><path id="icons-default-arrow-head-left" d="m12.5 7.9142 10.2929 10.293c.3905.3904 1.0237.3904 1.4142 0 .3905-.3906.3905-1.0238 0-1.4143l-11-11c-.3905-.3905-1.0237-.3905-1.4142 0l-11 11c-.3905.3905-.3905 1.0237 0 1.4142.3905.3905 1.0237.3905 1.4142 0L12.5 7.9142z"></path></defs><use transform="matrix(0 1 1 0 .5 -.5)" xlink:href="#icons-default-arrow-head-left" fill="#758CA3" fill-rule="evenodd"></use></svg>
  27.                         </span>
  28.                 </div>
  29.                 <div id="CrossSellingSlider">
  30.                     <div id="SliderRoll">
  31.                         <div class="line1topdown dekoline2"></div>
  32.                         <div class="line1topdown dekoline2" style="right: 0; left: unset;"></div>
  33.                         {% for item in element.data.crossSellings.elements %}
  34.                             {% for Product in item.products.elements %}
  35.                                 {% set imageurl = "" %}
  36.                                 {% for Item in Product.cover.media.thumbnails.elements %}
  37.                                     {% if imageurl == "" %}
  38.                                         {% if Item.url != "" %}
  39.                                             {% set imageurl = Item.url %}
  40.                                         {% endif %}
  41.                                     {% endif %}
  42.                                 {% endfor %}
  43.                                 <a  href="{{ seoUrl('frontend.detail.page', {'productId': Product.id}) }}">
  44.                                     <div class="singleProductSlideClone noactiveclone">
  45.                                         <div class="line1topdown dekoline2"></div>
  46.                                         <div class="product-image-wrapper">
  47.                                             {% if imageurl == "" %}
  48.                                                 {% set imageurl = Product.cover.media.url %}
  49.                                             {% endif %}
  50.                                             {% if imageurl == "" %}
  51.                                                 <img class="sliderimage placeholderimg hier " src="https://shop.schutzkleidung.de/bundles/theme3s/images/3S-Ritter_schwarz.svg"  style="max-width: 145px;">
  52.                                             {% else %}
  53.                                                 <img class="sliderimage hier" src="{{ imageurl }}">
  54.                                             {% endif %}
  55.                                         </div>
  56.                                         <div class="wappenbox">
  57.                                             {% for PropId in Product.propertyIds %}
  58.                                                 {% if PropId == "e755c9070e7d41469f9a1dad62db875a" %}<div class="variantwappen EN11491"></div>{% endif %}
  59.                                                 {% if PropId == "fa76425d7f2a400099d925d591e3be9f" %}<div class="variantwappen EN10732"></div>{% endif %}
  60.                                                 {% if PropId == "a581943fd430489598f209896e7bbb56" %}<div class="variantwappen EN11495"></div>{% endif %}
  61.                                                 {% if PropId == "b1fc6928266347428bd6b74c0268dad4" %}<div class="variantwappen EN14126"></div>{% endif %}
  62.                                                 {% if PropId == "0be6549f03d142c785c97b05ba9f1faa" %}<div class="variantwappen KatIII"></div>{% endif %}
  63.                                                 {% if PropId == "3842201e22984368bcc0d3125cf2827c" %}<div class="variantwappen Typ1"></div>{% endif %}
  64.                                                 {% if PropId == "9efff3bbbd234ebfbee64bd903067f6b" %}<div class="variantwappen Typ2"></div>{% endif %}
  65.                                                 {% if PropId == "fce6da51bcce4345a2fa0a44d88f249b" %}<div class="variantwappen Typ3"></div>{% endif %}
  66.                                                 {% if PropId == "f0f15d19683a4fa0a16901a8f6e9f1af" %}<div class="variantwappen Typ4"></div>{% endif %}
  67.                                                 {% if PropId == "778dfd9f51044a54a60cbd945b5b2762" %}<div class="variantwappen Typ5"></div>{% endif %}
  68.                                                 {% if PropId == "ca28fcc57c924b8e925c2bef5893fafa" %}<div class="variantwappen Typ6"></div>{% endif %}
  69.                                             {% endfor %}
  70.                                         </div>
  71.                                         <div class="clearingItem"></div>
  72.                                         {% set variation = Product.variation %}
  73.                                         {% set sizeoption = variation[0].option %}
  74.                                         {% set coloroption = variation[1].option %}
  75.                                         {% set blank = " " %}
  76.                                         {% set gloveoption = variation[2].option %}
  77.                                         {% set size = " " ~ sizeoption ~ " " %}
  78.                                         {% if page.header.activeLanguage.translationCode.code == 'de-DE' %}
  79.                                             {% set newname = Product.name %}
  80.                                         {% else %}
  81.                                             {% set newname = Product.translated.name %}
  82.                                         {% endif %}
  83.                                         {% if size != "" %}
  84.                                             {% set newname = newname|replace({(size): blank}) %}
  85.                                         {% endif %}
  86.                                         {% if coloroption != "" %}
  87.                                             {% set newname = newname|replace({(coloroption): blank}) %}
  88.                                         {% endif %}
  89.                                         {% if gloveoption != "" %}
  90.                                             {% set newname = newname|replace({(gloveoption): blank}) %}
  91.                                         {% endif %}
  92.                                         <div class="colorbox {{ productname }} test">
  93.                                             {% if Product.translated.customFields.custom_colors_ != "" %}
  94.                                                 {% set colors = Product.translated.customFields.custom_colors_ | split(',') %}
  95.                                                 {% for color in colors %}
  96.                                                     {% if color == "grün" %}
  97.                                                         <div class='variantcolor gruen'></div>
  98.                                                     {% elseif color == "weiß/blau" %}
  99.                                                         <div class='variantcolor' style="background: linear-gradient(to bottom left, #ffffff 50%, #395f98 50%);"></div>
  100.                                                     {% else %}
  101.                                                         <div class='variantcolor {{ color }}'></div>
  102.                                                     {% endif %}
  103.                                                 {% endfor %}
  104.                                             {% endif %}
  105.                                         </div>
  106.                                         <div class="product-price-info">
  107.                                             <p class="product-price-unit"></p>
  108.                                             <div class="product-price-wrapper">
  109.                                                 <div class="product-cheapest-price"></div>
  110.                                                 <span class="product-price">
  111.                                                 {% if Product.calculatedPrices|length > 1 %}
  112.                                                     {{ "detail.dataColumnQuantity"|trans|sw_sanitize }}
  113.                                                     {{ "detail.dataColumnPrice"|trans|sw_sanitize }}
  114.                                                     {% if Product.calculatedPrice.referencePrice %}
  115.                                                         {{ "detail.dataColumnReferencePrice"|trans|sw_sanitize }}
  116.                                                     {% endif %}
  117.                                                     {% for price in Product.calculatedPrices %}
  118.                                                         {% if loop.last %}
  119.                                                             {{ "detail.priceDataInfoFrom"|trans|sw_sanitize }}
  120.                                                         {% else %}
  121.                                                             {{ "detail.priceDataInfoUntil"|trans|sw_sanitize }}
  122.                                                         {% endif %}
  123.                                                         {% sw_include '@Storefront/storefront/component/product/block-price.html.twig' with {
  124.                                                             price: price
  125.                                                         } only %}
  126.                                                         {% if price.referencePrice is not null %}
  127.                                                             {{ price.referencePrice.price|currency }}{{ "general.star"|trans|sw_sanitize }} / {{ price.referencePrice.referenceUnit }} {{ price.referencePrice.unitName }}
  128.                                                         {% endif %}
  129.                                                     {% endfor %}
  130.                                                 {% else %}
  131.                                                     {% set price = Product.calculatedPrice %}
  132.                                                     {% if Product.calculatedPrices|length == 1 %}
  133.                                                         {% set price = Product.calculatedPrices.first %}
  134.                                                     {% endif %}
  135.                                                     {% set listPrice = price.listPrice %}
  136.                                                     {% set isListPrice = price.listPrice.percentage > 0 %}
  137.                                                     {% set isRegulationPrice = price.regulationPrice != null %}
  138.                                                     {{ price.unitPrice|currency }}{{ "general.star"|trans|sw_sanitize }}
  139.                                                     {% if isListPrice %}
  140.                                                         {% set afterListPriceSnippetExists = "listing.afterListPrice"|trans|length > 0 %}
  141.                                                         {% set beforeListPriceSnippetExists = "listing.beforeListPrice"|trans|length > 0 %}
  142.                                                         {% if beforeListPriceSnippetExists %}{{"listing.beforeListPrice"|trans|trim}}{% endif %}
  143.                                                         {{ listPrice.price|currency }}{{ "general.star"|trans|sw_sanitize }}
  144.                                                         {% if afterListPriceSnippetExists %}
  145.                                                             {{"listing.afterListPrice"|trans|trim}}
  146.                                                         {% endif %}
  147.                                                         {{ "detail.listPricePercentage"|trans({'%price%': listPrice.percentage })|sw_sanitize }}
  148.                                                     {% endif %}
  149.                                                     {% if isRegulationPrice %}
  150.                                                         {{ "general.listPricePreviously"|trans({'%price%': price.regulationPrice.price|currency }) }}{{ "general.star"|trans|sw_sanitize }}
  151.                                                     {% endif %}
  152.                                                     {% if Product.purchaseUnit %}
  153.                                                         {{ "detail.priceUnitName"|trans|sw_sanitize }}
  154.                                                         {{ Product.purchaseUnit }} {{ Product.unit.translated.name }}
  155.                                                         {% if price.referencePrice is not null %}
  156.                                                             ({{ price.referencePrice.price|currency }}{{ "general.star"|trans|sw_sanitize }} / {{ price.referencePrice.referenceUnit }} {{ price.referencePrice.unitName }})
  157.                                                         {% endif %}
  158.                                                     {% endif %}
  159.                                                 {% endif %}
  160.                                         </span>
  161.                                             </div>
  162.                                         </div>
  163.                                         <div class="BoxCardName">
  164.                                             {% if newname|length > 0 %}
  165.                                                 {% if newname|length >= 71 %}
  166.                                                     {{ newname|u.truncate(70, '…') }}
  167.                                                 {% else %}
  168.                                                     {{ newname }}
  169.                                                 {% endif %}
  170.                                             {% endif %}
  171.                                         </div>
  172.                                     </div>
  173.                                 </a>
  174.                             {% endfor %}
  175.                         {% endfor %}
  176.                         {% for item in element.data.crossSellings.elements %}
  177.                             {% for Product in item.products.elements %}
  178.                                 {% set imageurl = "" %}
  179.                                 {% set activeclass = "" %}
  180.                                 {% if loop.index <= 4 %}
  181.                                     {% set activeclass = "activeslide" %}
  182.                                 {% else %}
  183.                                     {% set activeclass = "noactiveslide" %}
  184.                                 {% endif %}
  185.                                 {% for Item in Product.cover.media.thumbnails.elements %}
  186.                                     {% if imageurl == "" %}
  187.                                         {% if Item.url != "" %}
  188.                                             {% set imageurl = Item.url %}
  189.                                         {% endif %}
  190.                                     {% endif %}
  191.                                 {% endfor %}
  192.                                 <a href="{{ seoUrl('frontend.detail.page', {'productId': Product.id}) }}">
  193.                                     <div class="singleProductSlide {{ activeclass }} slide-{{ loop.index }}">
  194.                                         <div class="line1topdown dekoline2"></div>
  195.                                         <div class="product-image-wrapper">
  196.                                             {% if imageurl == "" %}
  197.                                                 {% set imageurl = Product.cover.media.url %}
  198.                                             {% endif %}
  199.                                             {% if imageurl == "" %}
  200.                                                 <img class="sliderimage placeholderimg da" src="https://shop.schutzkleidung.de/bundles/theme3s/images/3S-Ritter_schwarz.svg" style="max-width: 145px;">
  201.                                             {% else %}
  202.                                                 <img class="sliderimage da" src="{{ imageurl }}">
  203.                                             {% endif %}
  204.                                         </div>
  205.                                         <div class="wappenbox">
  206.                                             {% for PropId in Product.propertyIds %}
  207.                                                 {% if PropId == "e755c9070e7d41469f9a1dad62db875a" %}<div class="variantwappen EN11491"></div>{% endif %}
  208.                                                 {% if PropId == "fa76425d7f2a400099d925d591e3be9f" %}<div class="variantwappen EN10732"></div>{% endif %}
  209.                                                 {% if PropId == "a581943fd430489598f209896e7bbb56" %}<div class="variantwappen EN11495"></div>{% endif %}
  210.                                                 {% if PropId == "b1fc6928266347428bd6b74c0268dad4" %}<div class="variantwappen EN14126"></div>{% endif %}
  211.                                                 {% if PropId == "0be6549f03d142c785c97b05ba9f1faa" %}<div class="variantwappen KatIII"></div>{% endif %}
  212.                                                 {% if PropId == "3842201e22984368bcc0d3125cf2827c" %}<div class="variantwappen Typ1"></div>{% endif %}
  213.                                                 {% if PropId == "9efff3bbbd234ebfbee64bd903067f6b" %}<div class="variantwappen Typ2"></div>{% endif %}
  214.                                                 {% if PropId == "fce6da51bcce4345a2fa0a44d88f249b" %}<div class="variantwappen Typ3"></div>{% endif %}
  215.                                                 {% if PropId == "f0f15d19683a4fa0a16901a8f6e9f1af" %}<div class="variantwappen Typ4"></div>{% endif %}
  216.                                                 {% if PropId == "778dfd9f51044a54a60cbd945b5b2762" %}<div class="variantwappen Typ5"></div>{% endif %}
  217.                                                 {% if PropId == "ca28fcc57c924b8e925c2bef5893fafa" %}<div class="variantwappen Typ6"></div>{% endif %}
  218.                                             {% endfor %}
  219.                                         </div>
  220.                                         <div class="clearingItem"></div>
  221.                                         {% set variation = Product.variation %}
  222.                                         {% set sizeoption = variation[0].option %}
  223.                                         {% set coloroption = variation[1].option %}
  224.                                         {% set blank = " " %}
  225.                                         {% set gloveoption = variation[2].option %}
  226.                                         {% set size = " " ~ sizeoption ~ " " %}
  227.                                         {% if page.header.activeLanguage.translationCode.code == 'de-DE' %}
  228.                                             {% set newname = Product.name %}
  229.                                         {% else %}
  230.                                             {% set newname = Product.translated.name %}
  231.                                         {% endif %}
  232.                                         {% if size != "" %}
  233.                                             {% set newname = newname|replace({(size): blank}) %}
  234.                                         {% endif %}
  235.                                         {% if coloroption != "" %}
  236.                                             {% set newname = newname|replace({(coloroption): blank}) %}
  237.                                         {% endif %}
  238.                                         {% if gloveoption != "" %}
  239.                                             {% set newname = newname|replace({(gloveoption): blank}) %}
  240.                                         {% endif %}
  241.                                         <div class="colorbox">
  242.                                             {% if Product.translated.customFields.custom_colors_ != "" %}
  243.                                                 {% set colors = Product.translated.customFields.custom_colors_ | split(',') %}
  244.                                                 {% for color in colors %}
  245.                                                     {% if color == "grün" %}
  246.                                                         <div class='variantcolor gruen'></div>
  247.                                                     {% elseif color == "weiß/blau" %}
  248.                                                         <div class='variantcolor' style="background: linear-gradient(to bottom left, #ffffff 50%, #395f98 50%);"></div>
  249.                                                     {% else %}
  250.                                                         <div class='variantcolor {{ color }}'></div>
  251.                                                     {% endif %}
  252.                                                 {% endfor %}
  253.                                             {% endif %}
  254.                                         </div>
  255.                                         <div class="product-price-info">
  256.                                             <p class="product-price-unit"></p>
  257.                                             <div class="product-price-wrapper">
  258.                                                 <div class="product-cheapest-price"></div>
  259.                                                 <span class="product-price">
  260.                                                 {% if Product.calculatedPrices|length > 1 %}
  261.                                                     {{ "detail.dataColumnQuantity"|trans|sw_sanitize }}
  262.                                                     {{ "detail.dataColumnPrice"|trans|sw_sanitize }}
  263.                                                     {% if Product.calculatedPrice.referencePrice %}
  264.                                                         {{ "detail.dataColumnReferencePrice"|trans|sw_sanitize }}
  265.                                                     {% endif %}
  266.                                                     {% for price in Product.calculatedPrices %}
  267.                                                         {% if loop.last %}
  268.                                                             {{ "detail.priceDataInfoFrom"|trans|sw_sanitize }}
  269.                                                         {% else %}
  270.                                                             {{ "detail.priceDataInfoUntil"|trans|sw_sanitize }}
  271.                                                         {% endif %}
  272.                                                         {% sw_include '@Storefront/storefront/component/product/block-price.html.twig' with {
  273.                                                             price: price
  274.                                                         } only %}
  275.                                                         {% if price.referencePrice is not null %}
  276.                                                             {{ price.referencePrice.price|currency }}{{ "general.star"|trans|sw_sanitize }} / {{ price.referencePrice.referenceUnit }} {{ price.referencePrice.unitName }}
  277.                                                         {% endif %}
  278.                                                     {% endfor %}
  279.                                                 {% else %}
  280.                                                     {% set price = Product.calculatedPrice %}
  281.                                                     {% if Product.calculatedPrices|length == 1 %}
  282.                                                         {% set price = Product.calculatedPrices.first %}
  283.                                                     {% endif %}
  284.                                                     {% set listPrice = price.listPrice %}
  285.                                                     {% set isListPrice = price.listPrice.percentage > 0 %}
  286.                                                     {% set isRegulationPrice = price.regulationPrice != null %}
  287.                                                     {{ price.unitPrice|currency }}{{ "general.star"|trans|sw_sanitize }}
  288.                                                     {% if isListPrice %}
  289.                                                         {% set afterListPriceSnippetExists = "listing.afterListPrice"|trans|length > 0 %}
  290.                                                         {% set beforeListPriceSnippetExists = "listing.beforeListPrice"|trans|length > 0 %}
  291.                                                         {% if beforeListPriceSnippetExists %}{{"listing.beforeListPrice"|trans|trim}}{% endif %}
  292.                                                         {{ listPrice.price|currency }}{{ "general.star"|trans|sw_sanitize }}
  293.                                                         {% if afterListPriceSnippetExists %}
  294.                                                             {{"listing.afterListPrice"|trans|trim}}
  295.                                                         {% endif %}
  296.                                                         {{ "detail.listPricePercentage"|trans({'%price%': listPrice.percentage })|sw_sanitize }}
  297.                                                     {% endif %}
  298.                                                     {% if isRegulationPrice %}
  299.                                                         {{ "general.listPricePreviously"|trans({'%price%': price.regulationPrice.price|currency }) }}{{ "general.star"|trans|sw_sanitize }}
  300.                                                     {% endif %}
  301.                                                     {% if Product.purchaseUnit %}
  302.                                                         {{ "detail.priceUnitName"|trans|sw_sanitize }}
  303.                                                         {{ Product.purchaseUnit }} {{ Product.unit.translated.name }}
  304.                                                         {% if price.referencePrice is not null %}
  305.                                                             ({{ price.referencePrice.price|currency }}{{ "general.star"|trans|sw_sanitize }} / {{ price.referencePrice.referenceUnit }} {{ price.referencePrice.unitName }})
  306.                                                         {% endif %}
  307.                                                     {% endif %}
  308.                                                 {% endif %}
  309.                                         </span>
  310.                                             </div>
  311.                                         </div>
  312.                                         <div class="BoxCardName">
  313.                                             {% if newname|length > 0 %}
  314.                                                 {% if newname|length >= 71 %}
  315.                                                     {{ newname|u.truncate(70, '…') }}
  316.                                                 {% else %}
  317.                                                     {{ newname }}
  318.                                                 {% endif %}
  319.                                             {% endif %}
  320.                                         </div>
  321.                                     </div>
  322.                                 </a>
  323.                             {% endfor %}
  324.                         {% endfor %}
  325.                     </div>
  326.                 </div>
  327.                 <div id="rightSliderArrow" class="sliderarrow">
  328.                         <span class="icon icon-arrow-head-right">
  329.                         <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24" height="24" viewBox="0 0 24 24"><defs>
  330.                                 <path id="icons-default-arrow-head-right" d="m11.5 7.9142 10.2929 10.293c.3905.3904 1.0237.3904 1.4142 0 .3905-.3906.3905-1.0238 0-1.4143l-11-11c-.3905-.3905-1.0237-.3905-1.4142 0l-11 11c-.3905.3905-.3905 1.0237 0 1.4142.3905.3905 1.0237.3905 1.4142 0L11.5 7.9142z"></path></defs><use transform="rotate(90 11.5 12)" xlink:href="#icons-default-arrow-head-right" fill="#758CA3" fill-rule="evenodd"></use>
  331.                         </svg>
  332.                         </span>
  333.                 </div>
  334.             </div>
  335.         </div>
  336.         <script>
  337.             var ClickCount = 0;
  338.             var VisibleSlides = 4;
  339.             var MaxSlides = $('.singleProductSlide').length;
  340.             var TileWidth = -400;
  341.             var CalcMoves = MaxSlides - VisibleSlides;
  342.             if(MaxSlides <= VisibleSlides){
  343.                 $( "#rightSliderArrow" ).hide();
  344.                 $( "#leftSliderArrow" ).hide();
  345.             }
  346.             $( window ).resize(function() {
  347.                 if($( window ).width() >= 1700){
  348.                     VisibleSlides = 4;
  349.                     CalcMoves = MaxSlides - VisibleSlides;
  350.                 }
  351.                 if($( window ).width() < 1700){
  352.                     VisibleSlides = 3;
  353.                     CalcMoves = MaxSlides - VisibleSlides;
  354.                 }
  355.                 if($( window ).width() < 1300){
  356.                     VisibleSlides = 2;
  357.                     CalcMoves = MaxSlides - VisibleSlides;
  358.                 }
  359.                 if($( window ).width() < 900){
  360.                     var TileWidth = -300;
  361.                     VisibleSlides = 1;
  362.                     CalcMoves = MaxSlides - VisibleSlides;
  363.                 }
  364.                 if(MaxSlides == VisibleSlides){
  365.                     $( "#rightSliderArrow" ).hide();
  366.                     $( "#leftSliderArrow" ).hide();
  367.                 } else {
  368.                     $( "#rightSliderArrow" ).show();
  369.                     $( "#leftSliderArrow" ).show();
  370.                 }
  371.             });
  372.             $( "#rightSliderArrow" ).click(function() {
  373.                 if(ClickCount >= 0){
  374.                     if(ClickCount >= CalcMoves){
  375.                         ClickCount = CalcMoves;
  376.                     } else {
  377.                         $(".activeslide").first().css( "margin-left", TileWidth);
  378.                         $( ".activeslide" ).first().addClass("noactiveslide");
  379.                         $( ".activeslide" ).first().removeClass("activeslide");
  380.                         ClickCount++;
  381.                     }
  382.                 } else {
  383.                     $(".activeclone").first().css( "margin-left", TileWidth);
  384.                     $(".activeclone").first().addClass( "noactiveclone");
  385.                     $(".activeclone").first().removeClass( "activeclone");
  386.                     ClickCount++;
  387.                 }
  388.             });
  389.             $( "#leftSliderArrow" ).click(function() {
  390.                 if(ClickCount <= 0){
  391.                     //ClickCount = 0;
  392.                     if(ClickCount <= -Math.abs(MaxSlides)){
  393.                         ClickCount = -Math.abs(MaxSlides);
  394.                     } else {
  395.                         $(".noactiveclone").last().css( "margin-left", "0px");
  396.                         $(".noactiveclone").last().addClass( "activeclone");
  397.                         $(".noactiveclone").last().removeClass( "noactiveclone");
  398.                         ClickCount--;
  399.                     }
  400.                 } else {
  401.                     $( ".slide-" +  ClickCount).first().css( "margin-left", "0px" );
  402.                     $( ".slide-" +  ClickCount).addClass("activeslide");
  403.                     $( ".slide-" +  ClickCount).removeClass("noactiveslide");
  404.                     ClickCount--;
  405.                 }
  406.             });
  407.             //TO START 1 PRODUCT BEFORE
  408.             if(ClickCount <= 0 && CalcMoves > 0){
  409.                 //ClickCount = 0;
  410.                 if(ClickCount <= -Math.abs(MaxSlides)){
  411.                     ClickCount = -Math.abs(MaxSlides);
  412.                 } else {
  413.                     $(".noactiveclone").last().css( "margin-left", "0px");
  414.                     $(".noactiveclone").last().addClass( "activeclone");
  415.                     $(".noactiveclone").last().removeClass( "noactiveclone");
  416.                     ClickCount--;
  417.                 }
  418.             } else {
  419.                 $( ".slide-" +  ClickCount).first().css( "margin-left", "0px" );
  420.                 $( ".slide-" +  ClickCount).addClass("activeslide");
  421.                 $( ".slide-" +  ClickCount).removeClass("noactiveslide");
  422.                 ClickCount--;
  423.             }
  424.         </script>
  425.     {% endif %}
  426.     <div class="product-detail-cross-selling" style="display: none;">
  427.         <div class="card card-tabs" data-cross-selling="true">
  428.             {% block cms_element_cross_selling_tabs_navigation %}
  429.                 <div class="card-header product-detail-tab-navigation product-cross-selling-tab-navigation">
  430.                     {% block cms_element_cross_selling_tabs_navigation_container %}
  431.                         <ul class="nav nav-tabs product-detail-tab-navigation-list"
  432.                             id="product-detail-cross-selling-tabs"
  433.                             role="tablist">
  434.                             {% if element.data.crossSellings.elements is defined %}
  435.                                 {% for item in element.data.crossSellings.elements|filter(item => item.total > 0 and item.crossSelling.active == true) %}
  436.                                     {% set crossSelling = item.crossSelling %}
  437.                                     {% set products = item.products %}
  438.                                     {% set id = crossSelling.id %}
  439.                                     <li class="nav-item">
  440.                                         <a class="nav-link product-detail-tab-navigation-link{% if loop.first %} active{% endif %}"
  441.                                            id="cross-selling-tab-{{ id }}"
  442.                                         {{ dataBsToggleAttr }}="tab"
  443.                                         href="#cross-selling-tab-{{ id }}-pane"
  444.                                         role="tab"
  445.                                         aria-controls="cross-selling-tab-{{ id }}-pane"
  446.                                         aria-selected="true">
  447.                                         {{ crossSelling.translated.name }}
  448.                                         <span class="product-detail-tab-navigation-icon">
  449.                                                     {% sw_icon 'arrow-medium-right' style {'pack':'solid'} %}
  450.                                                 </span>
  451.                                         </a>
  452.                                     </li>
  453.                                 {% endfor %}
  454.                             {% endif %}
  455.                         </ul>
  456.                     {% endblock %}
  457.                 </div>
  458.             {% endblock %}
  459.             {% block cms_element_cross_selling_tabs_content %}
  460.                 <div class="product-detail-tabs-content card-body">
  461.                     {% block cms_element_cross_selling_tabs_content_container %}
  462.                         <div class="tab-content">
  463.                             {% if element.data.crossSellings.elements is defined %}
  464.                                 {% for item in element.data.crossSellings.elements|filter(item => item.total > 0 and item.crossSelling.active == true) %}
  465.                                     {% set crossSelling = item.crossSelling %}
  466.                                     {% set products = item.products %}
  467.                                     {% set id = crossSelling.id %}
  468.                                     <div class="tab-pane fade show{% if loop.first %} active{% endif %}"
  469.                                          id="cross-selling-tab-{{ id }}-pane"
  470.                                          role="tabpanel"
  471.                                          aria-labelledby="cross-selling-tab-{{ id }}">
  472.                                         {% set config = {
  473.                                             'title': {
  474.                                                 'value': crossSelling.name ?: crossSelling.translated.name
  475.                                             },
  476.                                             'border': {
  477.                                                 'value': false
  478.                                             },
  479.                                             'rotate': {
  480.                                                 'value': false
  481.                                             },
  482.                                             'products': {
  483.                                                 'value': products
  484.                                             },
  485.                                             'boxLayout': {
  486.                                                 'value': sliderConfig.boxLayout.value
  487.                                             },
  488.                                             'elMinWidth': {
  489.                                                 'value': sliderConfig.elMinWidth.value
  490.                                             },
  491.                                             'navigation': {
  492.                                                 'value': true
  493.                                             },
  494.                                             'displayMode': {
  495.                                                 'value': sliderConfig.displayMode.value
  496.                                             },
  497.                                             'verticalAlign': {
  498.                                                 'value': center
  499.                                             }
  500.                                         } %}
  501.                                         {% block cms_element_cross_selling_tabs_content_container_slider %}
  502.                                             {% sw_include "@Storefront/storefront/element/cms-element-product-slider.html.twig" with {
  503.                                                 sliderConfig: config,
  504.                                                 element: {
  505.                                                     'data': {
  506.                                                         'products': products
  507.                                                     },
  508.                                                     type: 'product-slider'
  509.                                                 }
  510.                                             } %}
  511.                                         {% endblock %}
  512.                                     </div>
  513.                                 {% endfor %}
  514.                             {% endif %}
  515.                         </div>
  516.                     {% endblock %}
  517.                 </div>
  518.             {% endblock %}
  519.         </div>
  520.     </div>
  521. {% endblock %}