{% sw_extends '@Storefront/storefront/element/cms-element-cross-selling.html.twig' %}
{% block cms_element_cross_selling_tabs_inner %}
{% if not sliderConfig %}
{% set sliderConfig = element.fieldConfig.elements %}
{% endif %}
{% if element.data.crossSellings.elements is not null %}
<div class="bottomPageCut2"></div>
<div class="bottomPageCut3"></div>
<div id="CrossSellingWrapper">
<div id="CrossSellingInner">
{% if page.header.activeLanguage.translationCode.code == 'en-GB' %}
<h1>More products</h1>
{% elseif page.header.activeLanguage.translationCode.code == 'nl-NL' %}
<h1>Meer producten</h1>
{% elseif page.header.activeLanguage.translationCode.code == 'es-ES' %}
<h1>Más productos</h1>
{% elseif page.header.activeLanguage.translationCode.code == 'fr-FR' %}
<h1>Plus de produits</h1>
{% elseif page.header.activeLanguage.translationCode.code == 'it-IT' %}
<h1>Più prodotti</h1>
{% else %}
<h1>Weitere Produkte</h1>
{% endif %}
<div id="leftSliderArrow" class="sliderarrow">
<span class="icon icon-arrow-head-left">
<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>
</span>
</div>
<div id="CrossSellingSlider">
<div id="SliderRoll">
<div class="line1topdown dekoline2"></div>
<div class="line1topdown dekoline2" style="right: 0; left: unset;"></div>
{% for item in element.data.crossSellings.elements %}
{% for Product in item.products.elements %}
{% set imageurl = "" %}
{% for Item in Product.cover.media.thumbnails.elements %}
{% if imageurl == "" %}
{% if Item.url != "" %}
{% set imageurl = Item.url %}
{% endif %}
{% endif %}
{% endfor %}
<a href="{{ seoUrl('frontend.detail.page', {'productId': Product.id}) }}">
<div class="singleProductSlideClone noactiveclone">
<div class="line1topdown dekoline2"></div>
<div class="product-image-wrapper">
{% if imageurl == "" %}
{% set imageurl = Product.cover.media.url %}
{% endif %}
{% if imageurl == "" %}
<img class="sliderimage placeholderimg hier " src="https://shop.schutzkleidung.de/bundles/theme3s/images/3S-Ritter_schwarz.svg" style="max-width: 145px;">
{% else %}
<img class="sliderimage hier" src="{{ imageurl }}">
{% endif %}
</div>
<div class="wappenbox">
{% for PropId in Product.propertyIds %}
{% if PropId == "e755c9070e7d41469f9a1dad62db875a" %}<div class="variantwappen EN11491"></div>{% endif %}
{% if PropId == "fa76425d7f2a400099d925d591e3be9f" %}<div class="variantwappen EN10732"></div>{% endif %}
{% if PropId == "a581943fd430489598f209896e7bbb56" %}<div class="variantwappen EN11495"></div>{% endif %}
{% if PropId == "b1fc6928266347428bd6b74c0268dad4" %}<div class="variantwappen EN14126"></div>{% endif %}
{% if PropId == "0be6549f03d142c785c97b05ba9f1faa" %}<div class="variantwappen KatIII"></div>{% endif %}
{% if PropId == "3842201e22984368bcc0d3125cf2827c" %}<div class="variantwappen Typ1"></div>{% endif %}
{% if PropId == "9efff3bbbd234ebfbee64bd903067f6b" %}<div class="variantwappen Typ2"></div>{% endif %}
{% if PropId == "fce6da51bcce4345a2fa0a44d88f249b" %}<div class="variantwappen Typ3"></div>{% endif %}
{% if PropId == "f0f15d19683a4fa0a16901a8f6e9f1af" %}<div class="variantwappen Typ4"></div>{% endif %}
{% if PropId == "778dfd9f51044a54a60cbd945b5b2762" %}<div class="variantwappen Typ5"></div>{% endif %}
{% if PropId == "ca28fcc57c924b8e925c2bef5893fafa" %}<div class="variantwappen Typ6"></div>{% endif %}
{% endfor %}
</div>
<div class="clearingItem"></div>
{% set variation = Product.variation %}
{% set sizeoption = variation[0].option %}
{% set coloroption = variation[1].option %}
{% set blank = " " %}
{% set gloveoption = variation[2].option %}
{% set size = " " ~ sizeoption ~ " " %}
{% if page.header.activeLanguage.translationCode.code == 'de-DE' %}
{% set newname = Product.name %}
{% else %}
{% set newname = Product.translated.name %}
{% endif %}
{% if size != "" %}
{% set newname = newname|replace({(size): blank}) %}
{% endif %}
{% if coloroption != "" %}
{% set newname = newname|replace({(coloroption): blank}) %}
{% endif %}
{% if gloveoption != "" %}
{% set newname = newname|replace({(gloveoption): blank}) %}
{% endif %}
<div class="colorbox {{ productname }} test">
{% if Product.translated.customFields.custom_colors_ != "" %}
{% set colors = Product.translated.customFields.custom_colors_ | split(',') %}
{% for color in colors %}
{% if color == "grün" %}
<div class='variantcolor gruen'></div>
{% elseif color == "weiß/blau" %}
<div class='variantcolor' style="background: linear-gradient(to bottom left, #ffffff 50%, #395f98 50%);"></div>
{% else %}
<div class='variantcolor {{ color }}'></div>
{% endif %}
{% endfor %}
{% endif %}
</div>
<div class="product-price-info">
<p class="product-price-unit"></p>
<div class="product-price-wrapper">
<div class="product-cheapest-price"></div>
<span class="product-price">
{% if Product.calculatedPrices|length > 1 %}
{{ "detail.dataColumnQuantity"|trans|sw_sanitize }}
{{ "detail.dataColumnPrice"|trans|sw_sanitize }}
{% if Product.calculatedPrice.referencePrice %}
{{ "detail.dataColumnReferencePrice"|trans|sw_sanitize }}
{% endif %}
{% for price in Product.calculatedPrices %}
{% if loop.last %}
{{ "detail.priceDataInfoFrom"|trans|sw_sanitize }}
{% else %}
{{ "detail.priceDataInfoUntil"|trans|sw_sanitize }}
{% endif %}
{% sw_include '@Storefront/storefront/component/product/block-price.html.twig' with {
price: price
} only %}
{% if price.referencePrice is not null %}
{{ price.referencePrice.price|currency }}{{ "general.star"|trans|sw_sanitize }} / {{ price.referencePrice.referenceUnit }} {{ price.referencePrice.unitName }}
{% endif %}
{% endfor %}
{% else %}
{% set price = Product.calculatedPrice %}
{% if Product.calculatedPrices|length == 1 %}
{% set price = Product.calculatedPrices.first %}
{% endif %}
{% set listPrice = price.listPrice %}
{% set isListPrice = price.listPrice.percentage > 0 %}
{% set isRegulationPrice = price.regulationPrice != null %}
{{ price.unitPrice|currency }}{{ "general.star"|trans|sw_sanitize }}
{% if isListPrice %}
{% set afterListPriceSnippetExists = "listing.afterListPrice"|trans|length > 0 %}
{% set beforeListPriceSnippetExists = "listing.beforeListPrice"|trans|length > 0 %}
{% if beforeListPriceSnippetExists %}{{"listing.beforeListPrice"|trans|trim}}{% endif %}
{{ listPrice.price|currency }}{{ "general.star"|trans|sw_sanitize }}
{% if afterListPriceSnippetExists %}
{{"listing.afterListPrice"|trans|trim}}
{% endif %}
{{ "detail.listPricePercentage"|trans({'%price%': listPrice.percentage })|sw_sanitize }}
{% endif %}
{% if isRegulationPrice %}
{{ "general.listPricePreviously"|trans({'%price%': price.regulationPrice.price|currency }) }}{{ "general.star"|trans|sw_sanitize }}
{% endif %}
{% if Product.purchaseUnit %}
{{ "detail.priceUnitName"|trans|sw_sanitize }}
{{ Product.purchaseUnit }} {{ Product.unit.translated.name }}
{% if price.referencePrice is not null %}
({{ price.referencePrice.price|currency }}{{ "general.star"|trans|sw_sanitize }} / {{ price.referencePrice.referenceUnit }} {{ price.referencePrice.unitName }})
{% endif %}
{% endif %}
{% endif %}
</span>
</div>
</div>
<div class="BoxCardName">
{% if newname|length > 0 %}
{% if newname|length >= 71 %}
{{ newname|u.truncate(70, '…') }}
{% else %}
{{ newname }}
{% endif %}
{% endif %}
</div>
</div>
</a>
{% endfor %}
{% endfor %}
{% for item in element.data.crossSellings.elements %}
{% for Product in item.products.elements %}
{% set imageurl = "" %}
{% set activeclass = "" %}
{% if loop.index <= 4 %}
{% set activeclass = "activeslide" %}
{% else %}
{% set activeclass = "noactiveslide" %}
{% endif %}
{% for Item in Product.cover.media.thumbnails.elements %}
{% if imageurl == "" %}
{% if Item.url != "" %}
{% set imageurl = Item.url %}
{% endif %}
{% endif %}
{% endfor %}
<a href="{{ seoUrl('frontend.detail.page', {'productId': Product.id}) }}">
<div class="singleProductSlide {{ activeclass }} slide-{{ loop.index }}">
<div class="line1topdown dekoline2"></div>
<div class="product-image-wrapper">
{% if imageurl == "" %}
{% set imageurl = Product.cover.media.url %}
{% endif %}
{% if imageurl == "" %}
<img class="sliderimage placeholderimg da" src="https://shop.schutzkleidung.de/bundles/theme3s/images/3S-Ritter_schwarz.svg" style="max-width: 145px;">
{% else %}
<img class="sliderimage da" src="{{ imageurl }}">
{% endif %}
</div>
<div class="wappenbox">
{% for PropId in Product.propertyIds %}
{% if PropId == "e755c9070e7d41469f9a1dad62db875a" %}<div class="variantwappen EN11491"></div>{% endif %}
{% if PropId == "fa76425d7f2a400099d925d591e3be9f" %}<div class="variantwappen EN10732"></div>{% endif %}
{% if PropId == "a581943fd430489598f209896e7bbb56" %}<div class="variantwappen EN11495"></div>{% endif %}
{% if PropId == "b1fc6928266347428bd6b74c0268dad4" %}<div class="variantwappen EN14126"></div>{% endif %}
{% if PropId == "0be6549f03d142c785c97b05ba9f1faa" %}<div class="variantwappen KatIII"></div>{% endif %}
{% if PropId == "3842201e22984368bcc0d3125cf2827c" %}<div class="variantwappen Typ1"></div>{% endif %}
{% if PropId == "9efff3bbbd234ebfbee64bd903067f6b" %}<div class="variantwappen Typ2"></div>{% endif %}
{% if PropId == "fce6da51bcce4345a2fa0a44d88f249b" %}<div class="variantwappen Typ3"></div>{% endif %}
{% if PropId == "f0f15d19683a4fa0a16901a8f6e9f1af" %}<div class="variantwappen Typ4"></div>{% endif %}
{% if PropId == "778dfd9f51044a54a60cbd945b5b2762" %}<div class="variantwappen Typ5"></div>{% endif %}
{% if PropId == "ca28fcc57c924b8e925c2bef5893fafa" %}<div class="variantwappen Typ6"></div>{% endif %}
{% endfor %}
</div>
<div class="clearingItem"></div>
{% set variation = Product.variation %}
{% set sizeoption = variation[0].option %}
{% set coloroption = variation[1].option %}
{% set blank = " " %}
{% set gloveoption = variation[2].option %}
{% set size = " " ~ sizeoption ~ " " %}
{% if page.header.activeLanguage.translationCode.code == 'de-DE' %}
{% set newname = Product.name %}
{% else %}
{% set newname = Product.translated.name %}
{% endif %}
{% if size != "" %}
{% set newname = newname|replace({(size): blank}) %}
{% endif %}
{% if coloroption != "" %}
{% set newname = newname|replace({(coloroption): blank}) %}
{% endif %}
{% if gloveoption != "" %}
{% set newname = newname|replace({(gloveoption): blank}) %}
{% endif %}
<div class="colorbox">
{% if Product.translated.customFields.custom_colors_ != "" %}
{% set colors = Product.translated.customFields.custom_colors_ | split(',') %}
{% for color in colors %}
{% if color == "grün" %}
<div class='variantcolor gruen'></div>
{% elseif color == "weiß/blau" %}
<div class='variantcolor' style="background: linear-gradient(to bottom left, #ffffff 50%, #395f98 50%);"></div>
{% else %}
<div class='variantcolor {{ color }}'></div>
{% endif %}
{% endfor %}
{% endif %}
</div>
<div class="product-price-info">
<p class="product-price-unit"></p>
<div class="product-price-wrapper">
<div class="product-cheapest-price"></div>
<span class="product-price">
{% if Product.calculatedPrices|length > 1 %}
{{ "detail.dataColumnQuantity"|trans|sw_sanitize }}
{{ "detail.dataColumnPrice"|trans|sw_sanitize }}
{% if Product.calculatedPrice.referencePrice %}
{{ "detail.dataColumnReferencePrice"|trans|sw_sanitize }}
{% endif %}
{% for price in Product.calculatedPrices %}
{% if loop.last %}
{{ "detail.priceDataInfoFrom"|trans|sw_sanitize }}
{% else %}
{{ "detail.priceDataInfoUntil"|trans|sw_sanitize }}
{% endif %}
{% sw_include '@Storefront/storefront/component/product/block-price.html.twig' with {
price: price
} only %}
{% if price.referencePrice is not null %}
{{ price.referencePrice.price|currency }}{{ "general.star"|trans|sw_sanitize }} / {{ price.referencePrice.referenceUnit }} {{ price.referencePrice.unitName }}
{% endif %}
{% endfor %}
{% else %}
{% set price = Product.calculatedPrice %}
{% if Product.calculatedPrices|length == 1 %}
{% set price = Product.calculatedPrices.first %}
{% endif %}
{% set listPrice = price.listPrice %}
{% set isListPrice = price.listPrice.percentage > 0 %}
{% set isRegulationPrice = price.regulationPrice != null %}
{{ price.unitPrice|currency }}{{ "general.star"|trans|sw_sanitize }}
{% if isListPrice %}
{% set afterListPriceSnippetExists = "listing.afterListPrice"|trans|length > 0 %}
{% set beforeListPriceSnippetExists = "listing.beforeListPrice"|trans|length > 0 %}
{% if beforeListPriceSnippetExists %}{{"listing.beforeListPrice"|trans|trim}}{% endif %}
{{ listPrice.price|currency }}{{ "general.star"|trans|sw_sanitize }}
{% if afterListPriceSnippetExists %}
{{"listing.afterListPrice"|trans|trim}}
{% endif %}
{{ "detail.listPricePercentage"|trans({'%price%': listPrice.percentage })|sw_sanitize }}
{% endif %}
{% if isRegulationPrice %}
{{ "general.listPricePreviously"|trans({'%price%': price.regulationPrice.price|currency }) }}{{ "general.star"|trans|sw_sanitize }}
{% endif %}
{% if Product.purchaseUnit %}
{{ "detail.priceUnitName"|trans|sw_sanitize }}
{{ Product.purchaseUnit }} {{ Product.unit.translated.name }}
{% if price.referencePrice is not null %}
({{ price.referencePrice.price|currency }}{{ "general.star"|trans|sw_sanitize }} / {{ price.referencePrice.referenceUnit }} {{ price.referencePrice.unitName }})
{% endif %}
{% endif %}
{% endif %}
</span>
</div>
</div>
<div class="BoxCardName">
{% if newname|length > 0 %}
{% if newname|length >= 71 %}
{{ newname|u.truncate(70, '…') }}
{% else %}
{{ newname }}
{% endif %}
{% endif %}
</div>
</div>
</a>
{% endfor %}
{% endfor %}
</div>
</div>
<div id="rightSliderArrow" class="sliderarrow">
<span class="icon icon-arrow-head-right">
<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-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>
</svg>
</span>
</div>
</div>
</div>
<script>
var ClickCount = 0;
var VisibleSlides = 4;
var MaxSlides = $('.singleProductSlide').length;
var TileWidth = -400;
var CalcMoves = MaxSlides - VisibleSlides;
if(MaxSlides <= VisibleSlides){
$( "#rightSliderArrow" ).hide();
$( "#leftSliderArrow" ).hide();
}
$( window ).resize(function() {
if($( window ).width() >= 1700){
VisibleSlides = 4;
CalcMoves = MaxSlides - VisibleSlides;
}
if($( window ).width() < 1700){
VisibleSlides = 3;
CalcMoves = MaxSlides - VisibleSlides;
}
if($( window ).width() < 1300){
VisibleSlides = 2;
CalcMoves = MaxSlides - VisibleSlides;
}
if($( window ).width() < 900){
var TileWidth = -300;
VisibleSlides = 1;
CalcMoves = MaxSlides - VisibleSlides;
}
if(MaxSlides == VisibleSlides){
$( "#rightSliderArrow" ).hide();
$( "#leftSliderArrow" ).hide();
} else {
$( "#rightSliderArrow" ).show();
$( "#leftSliderArrow" ).show();
}
});
$( "#rightSliderArrow" ).click(function() {
if(ClickCount >= 0){
if(ClickCount >= CalcMoves){
ClickCount = CalcMoves;
} else {
$(".activeslide").first().css( "margin-left", TileWidth);
$( ".activeslide" ).first().addClass("noactiveslide");
$( ".activeslide" ).first().removeClass("activeslide");
ClickCount++;
}
} else {
$(".activeclone").first().css( "margin-left", TileWidth);
$(".activeclone").first().addClass( "noactiveclone");
$(".activeclone").first().removeClass( "activeclone");
ClickCount++;
}
});
$( "#leftSliderArrow" ).click(function() {
if(ClickCount <= 0){
//ClickCount = 0;
if(ClickCount <= -Math.abs(MaxSlides)){
ClickCount = -Math.abs(MaxSlides);
} else {
$(".noactiveclone").last().css( "margin-left", "0px");
$(".noactiveclone").last().addClass( "activeclone");
$(".noactiveclone").last().removeClass( "noactiveclone");
ClickCount--;
}
} else {
$( ".slide-" + ClickCount).first().css( "margin-left", "0px" );
$( ".slide-" + ClickCount).addClass("activeslide");
$( ".slide-" + ClickCount).removeClass("noactiveslide");
ClickCount--;
}
});
//TO START 1 PRODUCT BEFORE
if(ClickCount <= 0 && CalcMoves > 0){
//ClickCount = 0;
if(ClickCount <= -Math.abs(MaxSlides)){
ClickCount = -Math.abs(MaxSlides);
} else {
$(".noactiveclone").last().css( "margin-left", "0px");
$(".noactiveclone").last().addClass( "activeclone");
$(".noactiveclone").last().removeClass( "noactiveclone");
ClickCount--;
}
} else {
$( ".slide-" + ClickCount).first().css( "margin-left", "0px" );
$( ".slide-" + ClickCount).addClass("activeslide");
$( ".slide-" + ClickCount).removeClass("noactiveslide");
ClickCount--;
}
</script>
{% endif %}
<div class="product-detail-cross-selling" style="display: none;">
<div class="card card-tabs" data-cross-selling="true">
{% block cms_element_cross_selling_tabs_navigation %}
<div class="card-header product-detail-tab-navigation product-cross-selling-tab-navigation">
{% block cms_element_cross_selling_tabs_navigation_container %}
<ul class="nav nav-tabs product-detail-tab-navigation-list"
id="product-detail-cross-selling-tabs"
role="tablist">
{% if element.data.crossSellings.elements is defined %}
{% for item in element.data.crossSellings.elements|filter(item => item.total > 0 and item.crossSelling.active == true) %}
{% set crossSelling = item.crossSelling %}
{% set products = item.products %}
{% set id = crossSelling.id %}
<li class="nav-item">
<a class="nav-link product-detail-tab-navigation-link{% if loop.first %} active{% endif %}"
id="cross-selling-tab-{{ id }}"
{{ dataBsToggleAttr }}="tab"
href="#cross-selling-tab-{{ id }}-pane"
role="tab"
aria-controls="cross-selling-tab-{{ id }}-pane"
aria-selected="true">
{{ crossSelling.translated.name }}
<span class="product-detail-tab-navigation-icon">
{% sw_icon 'arrow-medium-right' style {'pack':'solid'} %}
</span>
</a>
</li>
{% endfor %}
{% endif %}
</ul>
{% endblock %}
</div>
{% endblock %}
{% block cms_element_cross_selling_tabs_content %}
<div class="product-detail-tabs-content card-body">
{% block cms_element_cross_selling_tabs_content_container %}
<div class="tab-content">
{% if element.data.crossSellings.elements is defined %}
{% for item in element.data.crossSellings.elements|filter(item => item.total > 0 and item.crossSelling.active == true) %}
{% set crossSelling = item.crossSelling %}
{% set products = item.products %}
{% set id = crossSelling.id %}
<div class="tab-pane fade show{% if loop.first %} active{% endif %}"
id="cross-selling-tab-{{ id }}-pane"
role="tabpanel"
aria-labelledby="cross-selling-tab-{{ id }}">
{% set config = {
'title': {
'value': crossSelling.name ?: crossSelling.translated.name
},
'border': {
'value': false
},
'rotate': {
'value': false
},
'products': {
'value': products
},
'boxLayout': {
'value': sliderConfig.boxLayout.value
},
'elMinWidth': {
'value': sliderConfig.elMinWidth.value
},
'navigation': {
'value': true
},
'displayMode': {
'value': sliderConfig.displayMode.value
},
'verticalAlign': {
'value': center
}
} %}
{% block cms_element_cross_selling_tabs_content_container_slider %}
{% sw_include "@Storefront/storefront/element/cms-element-product-slider.html.twig" with {
sliderConfig: config,
element: {
'data': {
'products': products
},
type: 'product-slider'
}
} %}
{% endblock %}
</div>
{% endfor %}
{% endif %}
</div>
{% endblock %}
</div>
{% endblock %}
</div>
</div>
{% endblock %}