{% sw_extends '@Storefront/storefront/base.html.twig' %}
{% block base_head %}
{% sw_include '@Storefront/storefront/page/product-detail/meta.html.twig' %}
{% endblock %}
{% block base_header %}
<div class="header-main-wrapper">
<header class="header-main">
<div class="top-bar-container">
<div class="container">
{% sw_include '@Storefront/storefront/layout/header/top-bar.html.twig' %}
</div>
</div>
{% block base_header_inner %}
<div class="container">
{% sw_include '@Storefront/storefront/layout/header/header.html.twig' %}
</div>
{% endblock %}
</header>
{% endblock %}
{% block base_navigation %}
<div class="nav-main">
{% block base_navigation_inner %}
{% sw_include '@Storefront/storefront/layout/navigation/navigation.html.twig' %}
{% endblock %}
</div>
</div>
{% endblock %}
{#
{% block base_main_inner %}
{% block page_product_detail_breadcrumb %}
<div class="breadcrumb-container container-fluid">
<div class="breadcrumb product-breadcrumb container">
{% sw_include '@Storefront/storefront/component/product/breadcrumb.html.twig' with {
navigationTree: page.header.navigation.tree,
categoryTree: page.product.categoryTree|last,
product: page.product
} only %}
</div>
</div>
{% endblock %}
{{ parent() }}
{% endblock %}
#}
{% block base_content %}
{% block page_product_detail %}
<div id="sticky-cart">
<div class="container">
<div class="row">
<div class="col-lg-2 smll-none">
<div data-wi-id="wi-button-container"></div>
<div class="product-title">
{#{ page.product.translated.name }#}
</div>
{#
<div class="product-price">
{% sw_include '@Storefront/storefront/page/product-detail/buy-widget-price.html.twig' %}
</div>#}
</div>
{% set category = page.header.navigation.active %}
<div class="col-lg-2 smll-none">
{% if page.extensions['amMactradeap1'].get('keyApi') %}
<div class="stiky-cart-new-wrap
{% if category %}
{% set breadcrumbCategories = sw_breadcrumb_full(category, context.context) %}
{% for breadcrumbCategory in breadcrumbCategories %}
{% set key = breadcrumbCategory.id %}
{% set name = breadcrumbCategory.translated.name %}
{% if loop.index == 1 %}
{% if name == 'Zubehör' %}
d-none
{% endif %}
{% endif %}
{% endfor %}
{% endif %}
">
<h3>Gutschrift für Ihr Altgerät</h3>
<div class="price-mc"><p>zw.</p><h2 class="price_range"> 30 € - 735* </h2> <p>
{{ page.extensions['amMactradeap1'].get('keyApiText') }}
</p></div>
<a class="small-link" target="_blank" href="https://mactrade.kauft-an.de/mactrade_c/hilfe/">Mehr Infos</a>
</div>
{% endif %}
</div>
<div class="col-lg-12 col-xl-8 d-flex justify-content-lg-between justify-content-xl-end align-items-center">
<div class="edu-information">
<div class="edu-price-container">
{% if context.salesChannel.id !='45be9f42765d42e8ae1137d1812040f4' && context.salesChannel.id !='4faca3b6a7f149cea7ade06ee340ce19' %}
{% if page.product.customFields.product_custom_fields_edu_discount %}
{% set eduPrice = page.product.calculatedPrice.unitPrice / 100 * (100 - page.product.customFields.product_custom_fields_edu_discount) %}
EDU: {{ eduPrice|number_format(2, ',', '.') }} € *
{% endif %}
{% endif %}
{% if context.salesChannel.id =='45be9f42765d42e8ae1137d1812040f4' || context.salesChannel.id =='4faca3b6a7f149cea7ade06ee340ce19' %}
{% set price = page.product.calculatedPrices.first %}
{% if page.product.customFields.product_custom_fields_edu_discount %}
{% set eduPrice = price.unitPrice / 100 * (100 - page.product.customFields.product_custom_fields_edu_discount) %}
EDU: {{ eduPrice|number_format(2, ',', '.') }} € *
{% endif %}
{% endif %}
</div>
<div class="delivery-container">
{% sw_include '@Storefront/storefront/component/delivery-information.html.twig' %}
</div>
</div>
<div class="price-information">
<div class="price-container">{% sw_include '@Storefront/storefront/page/product-detail/buy-widget-price.html.twig' %}</div>
<div class="tax-container">
{% if context.taxState == "gross" %}
{% set taxText = "general.grossTaxInformation"|trans|sw_sanitize %}
{% else %}
{% set taxText = "general.netTaxInformation"|trans|sw_sanitize %}
{% endif %}
<p class="product-detail-tax">
{% block page_product_detail_tax_link %}
<a class="product-detail-tax-link"
href="/kundenservice/versandkosten/"
title="{{ taxText }}" target="_blank">
{{ taxText }}
</a>
{% endblock %}
</p>
</div>
</div>
<div id="sticky-cart-form">
{% sw_include '@Storefront/storefront/page/product-detail/buy-widget-form.html.twig' %}
</div>
</div>
</div>
</div>
</div>
{# {% if page.product.seoCategory.parentId == '08c95ea3cfc346cdadd32ee1d5f8a408' %}
<div class="detail-banner" data-category="{{ page.product.seoCategory.translated.name }}" data-parent-category="{{ page.product.seoCategory.parentId }}">
<div class="hidden-phone">
<a href="/blackweek-mac" target="_blank">
<img src="https://www.mactrade.de/media/23/9b/ba/1637868262/BW_bannerproduktseite.webp" alt="">
</a>
</div>
<div class="hidden-tablet hidden-desktop">
<a href="/blackweek-mac" target="_blank">
<img src="https://www.mactrade.de/media/92/42/82/1637868262/BW_bannerproduktseite_mobil.webp" alt="">
</a>
</div>
</div>
{% endif %} #}
<div class="product-detail"
itemscope
itemtype="https://schema.org/Product">
{% block page_product_detail_inner %}
{% block page_product_detail_content %}
<div class="product-detail-content">
{% block page_product_detail_headline %}
<div class="row align-items-start product-detail-headline">
{% sw_include '@Storefront/storefront/page/product-detail/headline.html.twig' %}
{% if page.product.customFields.product_custom_fields_pdp_promobanner_macbook_air == true %}
<div class="product-detail-promotion-banderole">
{{ "detail.promotion-banner.macbook-air"|trans|raw }}
</div>
{% elseif page.product.customFields.product_custom_fields_pdp_promobanner_macbook_pro13 == true %}
<div class="product-detail-promotion-banderole">
{{ "detail.promotion-banner.macbook-pro13"|trans|raw }}
</div>
{% elseif page.product.customFields.product_custom_fields_pdp_promobanner_macbook_pro14 == true %}
<div class="product-detail-promotion-banderole">
{{ "detail.promotion-banner.macbook-pro14"|trans|raw }}
</div>
{% elseif page.product.customFields.product_custom_fields_pdp_promobanner_macbook_pro_16 == true %}
<div class="product-detail-promotion-banderole">
{{ "detail.promotion-banner.macbook-pro16"|trans|raw }}
</div>
{% elseif page.product.customFields.product_custom_fields_pdp_promobanner_imac24 == true %}
<div class="product-detail-promotion-banderole">
{{ "detail.promotion-banner.imac24"|trans|raw }}
</div>
{% elseif page.product.customFields.product_custom_fields_pdp_promobanner_imac27 == true %}
<div class="product-detail-promotion-banderole">
{{ "detail.promotion-banner.imac27"|trans|raw }}
</div>
{% elseif page.product.customFields.product_custom_fields_pdp_promobanner_ipad == true %}
<div class="product-detail-promotion-banderole">
{{ "detail.promotion-banner.ipad"|trans|raw }}
</div>
{% elseif page.product.customFields.product_custom_fields_pdp_promobanner_ipad_pro == true %}
<div class="product-detail-promotion-banderole">
{{ "detail.promotion-banner.ipad-pro"|trans|raw }}
</div>
{% elseif page.product.customFields.product_custom_fields_pdp_promobanner_mac_mini == true %}
<div class="product-detail-promotion-banderole">
{{ "detail.promotion-banner.mac-mini"|trans|raw }}
</div>
{% elseif page.product.customFields.product_custom_fields_pdp_promobanner_mac_studio == true %}
<div class="product-detail-promotion-banderole">
{{ "detail.promotion-banner.mac-studio"|trans|raw }}
</div>
{% endif %}
</div>
{% endblock %}
{% set mediaItems = page.product.media.media %}
{% block page_product_detail_main %}
<div class="row product-detail-main">
{% block page_product_detail_media %}
<div class="col-lg-6 product-detail-media">
{#{% if page.product.customFields.product_custom_fields_subscription == true and page.product.restockTime <= 10 %}#}
{% if page.product.customFields.product_custom_fields_subscription == true and (page.product.customFields.product_custom_fields_subscription_productType != 'ACCESSORY') and page.product.customFields.product_custom_fields_subscription_monthlyPriceGross > 0 %}
<div class="abo-badge">
<img src="{{ asset('assets/images/badge_abo.svg', "@AmMacTrade") }}" alt="Abo" height="50" width="50">
</div>
{% endif %}
{% if page.product.customFields.product_custom_fields_batch_protect == true %}
<div class="protect-badge">
<a class="link-new-window" href="/garantiepaket">
<img src="https://www.mactrade.de/media/a1/g0/f0/1644231456/stoerer-garantie.png" alt="">
</a>
</div>
{% endif %}
{% if page.product.media %}
{% sw_include '@Storefront/storefront/element/cms-element-image-gallery.html.twig' with {
'mediaItems': mediaItems,
'zoom': true,
'zoomModal': true,
'displayMode': 'contain',
'gutter': 5,
'minHeight': '430px',
'navigationArrows': 'inside',
'navigationDots': 'inside',
'galleryPosition': 'left',
'isProduct': true,
'fallbackImageTitle': page.product.translated.name,
'startIndexThumbnails': page.product.cover.position,
'startIndexSlider': page.product.cover.position
} %}
{% endif %}
</div>
{% endblock %}
{% block page_product_detail_buy %}
<div class="col-lg-5 offset-lg-1 product-detail-buy">
{% sw_include '@Storefront/storefront/page/product-detail/buy-widget.html.twig' %}
</div>
{% endblock %}
</div>
{% endblock %}
</div>
{% endblock %}
{% block page_product_detail_tabs %}
{# start tabs #}
<div class="m1 menu">
<div id="menu-center">
<ul>
<li class="active"><a href="#kombinierbare">Kombinierbare Aktionen</a></li>
<li><a href="#produktbeschreibung">Produktbeschreibung</a></li>
<li><a href="#technische">Technische Daten</a></li>
</ul>
</div>
</div>
{# end tabs #}
{# start tab js #}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script>
let onScroll = function(event){
var scrollPos = $(document).scrollTop();
$('#menu-center a').each(function () {
var currLink = $(this);
var refElement = $(currLink.attr("href"));
scrollPos += 150;
if (refElement.position().top <= scrollPos && refElement.position().top + refElement.height() > scrollPos) {
$('#menu-center ul a').parent().removeClass("active");
currLink.parent().addClass("active");
}
else{
currLink.parent().removeClass("active");
}
});
}
$(document).ready(function () {
$(document).on("scroll.custom", onScroll);
//smoothscroll
$('a[href^="#"]').on('click', function (e) {
e.preventDefault();
$(document).off("scroll.custom");
$('a').each(function () {
$(this).parent().removeClass('active');
})
$(this).parent().addClass('active');
var target = this.hash;
e.preventDefault();
var pos = $(this).attr('href');
doScrolling(pos, 1000);
});
});
function doScrolling(element, duration) {
var startingY = window.pageYOffset
var elementY = getElementY(element) + 70
var targetY = document.body.scrollHeight - elementY < window.innerHeight ? document.body.scrollHeight - window.innerHeight : elementY
var diff = (targetY - (130 + 85)) - startingY
var easing = function(t) {
return t < .5 ? 4 * t * t * t : (t - 1) * (2 * t - 2) * (2 * t - 2) + 1
}
var start
if (!diff)
return
window.requestAnimationFrame(function step(timestamp) {
if (!start)
start = timestamp
var time = timestamp - start
var percent = Math.min(time / duration, 1)
percent = easing(percent)
window.scrollTo(0, startingY + diff * percent)
if (time < duration) {
window.requestAnimationFrame(step);
} else {
$(element).parent().addClass("active").siblings().removeClass("active");
$(document).on("scroll.custom", onScroll);
}
})
}
function getElementY(query) {
return window.pageYOffset + document.querySelector(query).getBoundingClientRect().top
}
</script>
{# end tab js #}
<div class="product-detail-tabs tb-pd d-none">
{% sw_include '@Storefront/storefront/page/product-detail/tabs.html.twig' %}
</div>
<div class="product-detail-tabs">
{% sw_include '@Storefront/storefront/page/product-detail/tabs.html.twig' %}
</div>
{#<div class="product-detail-tabs properties">
{% sw_include '@Storefront/storefront/page/product-detail/tabs-properties.html.twig' %}
</div>#}
{% endblock %}
{% block page_product_detail_cross_selling %}
{% if page.product.extensions.netiProductCms and page.product.extensions.netiProductCms.getReplaceProductDetailDescriptionContent() %}
<div class="product-detail-description-text 6666666666" itemprop="description">
{% for content in page.product.extensions.netiProductCms.getReplaceProductDetailDescriptionContent() %}
<div id="{%if 'Kombinierbare' in content %}kombinierbare{% endif %}{%if 'Technische' in content %}technische{% endif %}" class="is--neti-next-productdetailcms is--replace-product_detail_description {{ config('NetiNextProductDetailCms.config.replaceProductDetailDescriptionIndention') }}" {% if config('NetiNextProductDetailCms.config.replaceProductDetailDescriptionInlineStyle') %} style="{{ config('NetiNextProductDetailCms.config.replaceProductDetailDescriptionInlineStyle') }}" {% endif %}>
{{ content|raw }}
</div>
{% endfor %}
</div>
{% endif %}
{% if page.product.extensions.netiProductCms and page.product.extensions.netiProductCms.getAboveProductDetailDescriptionContent() %}
{% for content in page.product.extensions.netiProductCms.getAboveProductDetailDescriptionContent() %}
<div id="{%if 'Kombinierbare' in content %}kombinierbare{% endif %}{%if 'Technische' in content %}technische{% endif %}" class="is--neti-next-productdetailcms is--above-product_detail_description {{ config('NetiNextProductDetailCms.config.aboveProductDetailDescriptionIndention') }}" {% if config('NetiNextProductDetailCms.config.aboveProductDetailDescriptionInlineStyle') %} style="{{ config('NetiNextProductDetailCms.config.aboveProductDetailDescriptionInlineStyle') }}" {% endif %}>
{{ content|raw }}
</div>
{% endfor %}
{% endif %}
{% if page.product.extensions.netiProductCms and page.product.extensions.netiProductCms.getAboveProductDescriptionContent() %}
{% for content in page.product.extensions.netiProductCms.getAboveProductDescriptionContent() %}
<div id="{%if 'Kombinierbare' in content %}kombinierbare{% endif %}{%if 'Technische' in content %}technische{% endif %}" class="is--neti-next-productdetailcms is--above-product_description {{ config('NetiNextProductDetailCms.config.aboveDescriptionIndention') }}" {% if config('NetiNextProductDetailCms.config.aboveDescriptionInlineStyle') %} style="{{ config('NetiNextProductDetailCms.config.aboveDescriptionInlineStyle') }}" {% endif %}>
{{ content|raw }}
</div>
{% endfor %}
{% endif %}
{% if page.product.customFields.custom_pdp_content_file_path is empty %}
<div id="produktbeschreibung" >
<div class="more-text-btn show-more-height">
<h3 class="d-flex justify-content-center">{{ "detail.descriptionTitle"|trans|sw_sanitize }} </h3>
{{ page.product.translated.description|raw }}
</div>
</div>
{% endif %}
{% if page.product.customFields.custom_pdp_content_file_path is not empty %}
{#<div class="h3 product-detail-description-title">
{{ "detail.descriptionTitle"|trans|sw_sanitize }} "{{ page.product.translated.name }}"
</div> #}
{% endif %}
{% if page.product.customFields.custom_pdp_content_file_path is not empty %}
<div id="produktbeschreibung" class="is--neti-next-productdetailcms is--below-product_detail_description noindent">
<div class="more-text-btn show-more-height">
<h2 class="d-flex justify-content-center"> {{ "detail.descriptionTitle"|trans|sw_sanitize }} </h2>
<iframe frameborder="0" id="child-iframe" src="{{ page.product.customFields.custom_pdp_content_file_path }}" name="iframe_a" width="100%" style="height: 8260px; width: 1360px;"></iframe>
{# {{ productpdp|raw }} #}
</div>
</div>
{% endif %}
<div class="text-center more-btn"> <a class="button mc-show-more" style="--focus-color: rgba(0, 125, 250, 0.6);">Mehr anzeigen</a> </div>
<!--BEGIN > SCRIPTS:BASE -->
<script type="text/javascript">"use strict";const reorderDOM={selectorEls:null,headerEl:null,capturedEls:null,capturedElsQuery:null,clonedEls:[],cOrder:null,cMax:null,useStatic:null,selectorElsQuery:null,staticEl:null,staticElQuery:null,addListeners(){window.addEventListener("channel:reorder-dom",e=>{if(this.useStatic=e.detail.useStatic,this.cOrder=e.detail.order,this.cMax=e.detail.max,this.updateElements(),void 0!==e.detail.selectorIndex){document.querySelectorAll(this.selectorElsQuery).item(e.detail.selectorIndex).focus()}})},updateElements(){!this.useStatic&&this.updateSelectors(),!this.useStatic&&this.updateHeadersAX(),!this.useStatic&&this.updateRows(),this.useStatic&&this.updateStatic()},arrayFromNodeList(e){const t=[];return e.forEach(e=>{t.push(e)}),t},updateStatic(){this.clonedEls.forEach((e,t)=>{const i=this.capturedEls[t],r=e.cloneNode(!0),n=r.querySelector("[role=rowheader]"),s=r.querySelector("[id=hidden-columnheader]");let o=[];this.cOrder.forEach((e,t)=>{const i=`[index="${e}"]`,n=r.querySelector(i).parentElement;o.push(n)}),o.reverse().forEach((e,t)=>{e.setAttribute("added",!0),r.prepend(e)});for(let e=0;e<r.children.length;e++){const t=r.children[e];"rowheader"!==t.getAttribute("role")&&"hidden-columnheader"!==t.getAttribute("id")&&(t.style.order="unset",this.toggleVisibility(t,e<this.cMax))}s&&r.prepend(s),r.prepend(n),r.setAttribute("added",!0),i.innerHTML=r.innerHTML})},updateHeadersAX(){let e='<div role="columnheader"> </div>';document.querySelectorAll(this.selectorElsQuery).forEach((t,i)=>{const r=t.querySelector("[selected=true]").innerText.trim();"flex"===t.parentElement.parentElement.style.display&&(e+=`<div role="columnheader">${r}</div>`)}),this.headerEl.innerHTML=e},updateSelectors(){document.querySelectorAll(this.selectorElsQuery).forEach((e,t)=>{e.replaceWith(this.selectorEls[t])}),this.cOrder.forEach((e,t)=>{const i=this.selectorEls[t];let r=0;for(let t=0;t<i.options.length;t++){const n=i.options[t],s=Number(n.value)===e;s&&(r=t),n.removeAttribute("selected"),n.setAttribute("selected",s),n.removeAttribute("aria-selected"),n.setAttribute("aria-selected",s)}i.selectedIndex=r});for(var e=0;e<this.selectorEls.length;e++){const t=this.selectorEls[e],i=e<this.cMax;this.toggleVisibility(t.parentElement.parentElement,i)}},updateRows(){this.clonedEls.forEach((e,t)=>{const i=this.capturedEls[t],r=e.cloneNode(!0),n=r.querySelector("[role=rowheader]"),s=[];this.cOrder.forEach(e=>{const t=`[index="${e}"]`,i=r.querySelector(t).parentElement;s.push(i)}),s.reverse().forEach(e=>{r.prepend(e)});for(let e=0;e<r.children.length;e++){const t=r.children[e];"rowheader"!==t.getAttribute("role")&&(t.style.order="unset",this.toggleVisibility(t,e<this.cMax))}r.prepend(n),i.innerHTML=r.innerHTML})},toggleVisibility(e,t){e.style.visibility=t?"visible":"hidden",e.style.display=t?"flex":"none",e.style.order="unset"},init(e,t,i,r,n){this.useStatic=n,this.capturedEls=document.querySelectorAll(e),this.capturedElsQuery=e,this.headerEl=document.querySelector(i),this.selectorEls=document.querySelectorAll(t),this.selectorElsQuery=t,this.staticElQuery=r,this.staticEl=this.useStatic&&document.querySelector(this.staticElQuery).cloneNode(!0),this.useStatic=n,this.clonedEls=this.arrayFromNodeList(this.capturedEls),this.addListeners()}},viewportManager={nState:null,cState:null,init:function(){this.addListeners()},addListeners:function(){const e={small:window.matchMedia("(max-width: 734px)"),medium:window.matchMedia("(min-width: 735px) and (max-width: 1068px)"),large:window.matchMedia("(min-width: 1069px)")};Object.keys(e).forEach(t=>{const i=e[t];"function"!=typeof i.addEventListener?i.addListener(()=>{i.matches&&this.viewportObserve(t)}):i.addEventListener("change",()=>{i.matches&&this.viewportObserve(t)}),i.matches&&this.viewportObserve(t)})},viewportObserve:function(e){this.nState=e,this.cState!==this.nState&&(this.cState=this.nState,this.dispatch(this.cState))},dispatch:function(e){const t=new CustomEvent("channel:viewport-change",{detail:e});window.dispatchEvent(t)}},orientationManager={orienation:null,init:function(){window.matchMedia("(orientation: portrait)").addEventListener("change",e=>{e.matches?this.orienation="portrait":this.orienation="landscape",this.dispatch(this.orienation)})},dispatch:function(e){const t=new CustomEvent("channel:orientation-change",{detail:e});window.dispatchEvent(t)}},selectorManager={init:function(e,t){const i=document.querySelectorAll(e);i.forEach((e,t)=>{e.addEventListener("change",()=>{const r=e.selectedIndex,n=e.value,s=Number(e.options[r].getAttribute("value"));this.dispatch({elIndex:t,selectedIndex:s,value:n,selectorEls:i}),e.focus()})})},dispatch:function(e){const t=new CustomEvent("channel:pre-user-select",{detail:e});window.dispatchEvent(t)}},buyButtonManager={buyButtonQuery:null,init:function(e){this.buyButtonQuery=e,this.addListeners(),this.attachButtonListeners()},addListeners:function(){window.addEventListener("channel:reorder-dom",()=>{console.log,this.attachButtonListeners()})},attachButtonListeners:function(){document.querySelectorAll(this.buyButtonQuery).forEach(e=>{e.addEventListener("click",t=>{const i=0===t.screenX&&0===t.screenY?"Keyboard Interaction":"Mouse Click";this.dispatch({productName:e.id,eventSource:i})})})},dispatch:function(e){const t=new CustomEvent("channel:buy-button-click",{detail:e});window.dispatchEvent(t)}},dataManager={order:null,viewportKey:null,viewportOrder:null,viewportMax:null,init:function(e,t){this.order=e,this.useStatic=t,this.addListeners()},viewportChange(e){this.viewportKey=e,this.viewportOrder=this.order[this.viewportKey],this.viewportMax=this.order.max[this.viewportKey],this.dispatch({order:this.viewportOrder,max:this.viewportMax,useStatic:this.useStatic})},blurSelects(e){document.querySelectorAll(e).forEach(e=>{e.blur()})},flattenOrders(){this.viewportOrder=this.order[this.viewportKey],this.viewportMax=this.order.max[this.viewportKey],["small","medium","large"].forEach(e=>{this.order[e]=this.viewportOrder})},getLineupInfo(e,t){const i={};return e.forEach((e,r)=>{i[r]={columnIndex:r,deviceName:e.options[e.selectedIndex].text,hasChanged:r===t}}),i},userSelect(e){const{elIndex:t,selectedIndex:i}=e,r=this.viewportOrder[t],n=this.viewportOrder.find(e=>e===i),s=this.viewportOrder.indexOf(n);void 0!==n?(this.viewportOrder[s]=r,this.viewportOrder[t]=n):this.viewportOrder[t]=i,this.flattenOrders(),this.dispatch({order:this.viewportOrder,max:this.viewportMax,useStatic:this.useStatic,selectorIndex:t}),e.deviceLineup=this.getLineupInfo(e.selectorEls,t),delete e.selectorEls;const o=Object.keys(e.deviceLineup).slice(0,this.viewportMax).reduce((t,i)=>(t[i]=e.deviceLineup[i],t),{});this.dispatchPostUserSelect({deviceLineup:o})},addListeners:function(){window.addEventListener("channel:pre-user-select",e=>{this.userSelect(e.detail)}),window.addEventListener("channel:user-refresh",e=>{this.dispatch({order:this.viewportOrder,max:this.viewportMax,useStatic:this.useStatic})}),window.addEventListener("channel:viewport-change",e=>{this.viewportChange(e.detail),this.blurSelects(this.selectorElsQuery)}),window.addEventListener("change:orientation-change",()=>{this.blurSelects(this.selectorElsQuery)}),window.addEventListener("channel:buy-button-click",e=>{console.log(e.detail)})},dispatch:function(e){const t=new CustomEvent("channel:reorder-dom",{detail:e});window.dispatchEvent(t)},dispatchPostUserSelect:function(e){const t=new CustomEvent("channel:user-select",{detail:e});window.dispatchEvent(t)}},channelCompare={inited:!1,init:function(e=null){if(this.inited)return;let t;if(this.isDev=window.location.host.indexOf("127.0.0.1")>-1,e)t=e;else if(!e){const e=document.querySelector("[data-channel-html-compare]");if(!e)return void console.warn("channelCompare: element[data-channel-html-compare not found]");try{const i=e.getAttribute("data-channel-html-compare");t=JSON.parse(i)}catch(e){return void console.warn("channelCompare: error parsing JSON",e)}}const i=t.order,r=t.headerEl,n=t.selectorEls,s=t.swapEls,o=t.staticEl,a=t.useStatic;reorderDOM.init(s,n,r,o,a),!a&&selectorManager.init(n),buyButtonManager.init(".compare-button"),dataManager.init(i,a),viewportManager.init(),orientationManager.init(),this.inited=!0}};window.addEventListener("pageshow",e=>{const{persisted:t}=e;if(t)window.addEventListener("scroll",()=>{const e=new CustomEvent("channel:user-refresh");window.dispatchEvent(e)});else{channelCompare.init(),document.querySelector(".channel-compare").classList.remove("channel-compare--hidden")}});</script>
<!--END > SCRIPTS:BASE -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script>
$(document).ready(function() {
if($(".more-text-btn").hasClass("show-more-height")) {
$(".more-text-btn").removeClass("show-more-height")
$(".mc-show-more").html("Weniger anzeigen");
}
$(".mc-show-more").click(function () {
if($(".more-text-btn").hasClass("show-more-height")) {
$(this).text("Weniger anzeigen");
} else {
$(this).text("Mehr anzeigen");
}
$(".more-text-btn").toggleClass("show-more-height");
});
});
</script>
<script>
let iframe = document.querySelector("#child-iframe");
iframe.addEventListener('load', function() {
if(iframe.contentDocument.body.scrollHeight) {
let newheight = iframe.contentDocument.body.scrollHeight + 50 ;
iframe.style.height = newheight + 'px';
iframe.style.width = iframe.contentDocument.body.scrollWidth + 'px';
}
});
</script>
{% if page.product.extensions.netiProductCms and page.product.extensions.netiProductCms.getBelowProductDescriptionContent() %}
{% for content in page.product.extensions.netiProductCms.getBelowProductDescriptionContent() %}
<div id="technische" class="is--neti-next-productdetailcms is--below-product_description {{ config('NetiNextProductDetailCms.config.belowDescriptionIndention') }}" {% if config('NetiNextProductDetailCms.config.belowDescriptionInlineStyle') %}style="{{ config('NetiNextProductDetailCms.config.belowDescriptionInlineStyle') }}"{% endif %}>
{{ content|raw }}
</div>
{% endfor %}
{% endif %}
{% if page.crossSellings|length > 0 %}
<div class="product-detail-tabs product-detail-cross-selling">
{% sw_include '@Storefront/storefront/page/product-detail/cross-selling/tabs.html.twig' with {
crossSellings: page.crossSellings
} only %}
</div>
{% endif %}
{% endblock %}
{% endblock %}
</div>
{% endblock %}
{% endblock %}