custom/plugins/AmMacTrade/src/Resources/views/storefront/page/product-detail/index.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/base.html.twig' %}
  2. {% block base_head %}
  3.     {% sw_include '@Storefront/storefront/page/product-detail/meta.html.twig' %}
  4. {% endblock %} 
  5. {% block base_header %}
  6. <div class="header-main-wrapper">
  7.     <header class="header-main">
  8.         <div class="top-bar-container">
  9.             <div class="container">
  10.                 {% sw_include '@Storefront/storefront/layout/header/top-bar.html.twig' %}
  11.             </div>
  12.         </div>
  13.         {% block base_header_inner %}
  14.             <div class="container">
  15.                 {% sw_include '@Storefront/storefront/layout/header/header.html.twig' %}
  16.             </div>
  17.         {% endblock %}
  18.     </header>
  19. {% endblock %}
  20.   
  21. {% block base_navigation %}
  22.         <div class="nav-main">
  23.             {% block base_navigation_inner %}
  24.                 {% sw_include '@Storefront/storefront/layout/navigation/navigation.html.twig' %}
  25.             {% endblock %}
  26.         </div>
  27.     </div>
  28. {% endblock %}
  29. {#
  30. {% block base_main_inner %}
  31.     {% block page_product_detail_breadcrumb %}
  32.         <div class="breadcrumb-container container-fluid">
  33.             <div class="breadcrumb product-breadcrumb container">
  34.                 {% sw_include '@Storefront/storefront/component/product/breadcrumb.html.twig' with {
  35.                     navigationTree: page.header.navigation.tree,
  36.                     categoryTree: page.product.categoryTree|last,
  37.                     product: page.product
  38.                 } only %}
  39.             </div>
  40.         </div>
  41.     {% endblock %}
  42.     {{ parent() }}
  43. {% endblock %}
  44. #}
  45. {% block base_content %}
  46.     {% block page_product_detail %}
  47.         <div id="sticky-cart">
  48.             <div class="container">
  49.                 <div class="row">
  50.                     <div class="col-lg-2 smll-none">
  51.                         <div data-wi-id="wi-button-container"></div>
  52.                         <div class="product-title">
  53.                             {#{ page.product.translated.name }#}
  54.                         </div>
  55.                         {#
  56.                         <div class="product-price">
  57.                             {% sw_include '@Storefront/storefront/page/product-detail/buy-widget-price.html.twig' %}
  58.                         </div>#}
  59.                     </div>
  60.                     {% set category = page.header.navigation.active %}
  61.                     <div class="col-lg-2 smll-none">
  62.                     {% if page.extensions['amMactradeap1'].get('keyApi') %}
  63.                         <div class="stiky-cart-new-wrap
  64.                                                 {% if category %}
  65. {% set breadcrumbCategories = sw_breadcrumb_full(category, context.context) %}
  66. {% for breadcrumbCategory in breadcrumbCategories %}
  67. {% set key = breadcrumbCategory.id %}
  68. {% set name = breadcrumbCategory.translated.name %}
  69. {% if loop.index == 1 %}
  70. {% if name == 'Zubehör' %}
  71. d-none
  72. {% endif %}
  73. {% endif %}
  74. {% endfor %}
  75. {% endif %}
  76.                         ">
  77.                           <h3>Gutschrift für Ihr Altgerät</h3>
  78.                           <div class="price-mc"><p>zw.</p><h2 class="price_range"> 30 € - 735* </h2> <p>
  79. {{ page.extensions['amMactradeap1'].get('keyApiText') }}
  80.                           </p></div>
  81.                           <a class="small-link" target="_blank" href="https://mactrade.kauft-an.de/mactrade_c/hilfe/">Mehr Infos</a>
  82.                         </div>
  83.                         {% endif %}
  84.                     </div>
  85.                     <div class="col-lg-12 col-xl-8 d-flex justify-content-lg-between  justify-content-xl-end align-items-center">
  86.                         <div class="edu-information">
  87.                             <div class="edu-price-container">
  88.                              {% if context.salesChannel.id !='45be9f42765d42e8ae1137d1812040f4' && context.salesChannel.id !='4faca3b6a7f149cea7ade06ee340ce19' %}
  89.                             
  90.                                 {% if page.product.customFields.product_custom_fields_edu_discount %}
  91.                                     {% set eduPrice = page.product.calculatedPrice.unitPrice / 100 * (100 - page.product.customFields.product_custom_fields_edu_discount) %}
  92.                                     EDU: {{ eduPrice|number_format(2, ',', '.') }} € *
  93.                                 {% endif %}
  94.                                 {% endif %}
  95.                                 
  96.                                 {% if context.salesChannel.id =='45be9f42765d42e8ae1137d1812040f4' || context.salesChannel.id =='4faca3b6a7f149cea7ade06ee340ce19' %}
  97.                                 {% set price = page.product.calculatedPrices.first %}
  98.                                 
  99.                                                 {% if page.product.customFields.product_custom_fields_edu_discount %}
  100.                     {% set eduPrice = price.unitPrice / 100 * (100 - page.product.customFields.product_custom_fields_edu_discount) %}
  101.                     EDU: {{ eduPrice|number_format(2, ',', '.') }} € *
  102.                 {% endif %}
  103.                 {% endif %}
  104.                             </div>
  105.                             <div class="delivery-container">
  106.                                 {% sw_include '@Storefront/storefront/component/delivery-information.html.twig' %}
  107.                             </div>
  108.                         </div>
  109.                         <div class="price-information">
  110.                             <div class="price-container">{% sw_include '@Storefront/storefront/page/product-detail/buy-widget-price.html.twig' %}</div>
  111.                             <div class="tax-container">
  112.                                 {% if context.taxState == "gross" %}
  113.                                     {% set taxText = "general.grossTaxInformation"|trans|sw_sanitize %}
  114.                                 {% else %}
  115.                                     {% set taxText = "general.netTaxInformation"|trans|sw_sanitize %}
  116.                                 {% endif %}
  117.                                 <p class="product-detail-tax">
  118.                                     {% block page_product_detail_tax_link %}
  119.                                         <a class="product-detail-tax-link"
  120.                                            href="/kundenservice/versandkosten/"
  121.                                            title="{{ taxText }}" target="_blank">
  122.                                             {{ taxText }}
  123.                                         </a>
  124.                                     {% endblock %}
  125.                                 </p>
  126.                             </div>
  127.                         </div>
  128.                         <div id="sticky-cart-form">
  129.                             {% sw_include '@Storefront/storefront/page/product-detail/buy-widget-form.html.twig' %}
  130.                         </div>
  131.                     </div>
  132.                 </div>
  133.             </div>
  134.         </div>
  135.         
  136.         {# {% if page.product.seoCategory.parentId == '08c95ea3cfc346cdadd32ee1d5f8a408' %}
  137.             <div class="detail-banner" data-category="{{ page.product.seoCategory.translated.name }}" data-parent-category="{{ page.product.seoCategory.parentId }}">
  138.                 <div class="hidden-phone">
  139.                     <a href="/blackweek-mac" target="_blank">
  140.                         <img src="https://www.mactrade.de/media/23/9b/ba/1637868262/BW_bannerproduktseite.webp" alt="">
  141.                     </a>
  142.                 </div>
  143.                 <div class="hidden-tablet hidden-desktop">
  144.                     <a href="/blackweek-mac" target="_blank">
  145.                         <img src="https://www.mactrade.de/media/92/42/82/1637868262/BW_bannerproduktseite_mobil.webp" alt="">
  146.                     </a>
  147.                 </div>
  148.             </div>
  149.         {% endif %} #}
  150.        
  151.         <div class="product-detail"
  152.              itemscope
  153.              itemtype="https://schema.org/Product">
  154.             {% block page_product_detail_inner %}
  155.                 {% block page_product_detail_content %}
  156.                     <div class="product-detail-content">
  157.                         {% block page_product_detail_headline %}
  158.                             <div class="row align-items-start product-detail-headline">
  159.                                 {% sw_include '@Storefront/storefront/page/product-detail/headline.html.twig' %}
  160.                                 {% if page.product.customFields.product_custom_fields_pdp_promobanner_macbook_air == true %}
  161.                                     <div class="product-detail-promotion-banderole">
  162.                                         {{ "detail.promotion-banner.macbook-air"|trans|raw }}
  163.                                     </div>
  164.                                 {% elseif page.product.customFields.product_custom_fields_pdp_promobanner_macbook_pro13 == true %}
  165.                                     <div class="product-detail-promotion-banderole">
  166.                                         {{ "detail.promotion-banner.macbook-pro13"|trans|raw }}
  167.                                     </div>
  168.                                 {% elseif page.product.customFields.product_custom_fields_pdp_promobanner_macbook_pro14 == true %}
  169.                                     <div class="product-detail-promotion-banderole">
  170.                                         {{ "detail.promotion-banner.macbook-pro14"|trans|raw }}
  171.                                     </div>
  172.                                 {% elseif page.product.customFields.product_custom_fields_pdp_promobanner_macbook_pro_16 == true %}
  173.                                     <div class="product-detail-promotion-banderole">
  174.                                         {{ "detail.promotion-banner.macbook-pro16"|trans|raw }}
  175.                                     </div>
  176.                                 {% elseif page.product.customFields.product_custom_fields_pdp_promobanner_imac24 == true %}
  177.                                     <div class="product-detail-promotion-banderole">
  178.                                         {{ "detail.promotion-banner.imac24"|trans|raw }}
  179.                                     </div>
  180.                                 {% elseif page.product.customFields.product_custom_fields_pdp_promobanner_imac27 == true %}
  181.                                     <div class="product-detail-promotion-banderole">
  182.                                         {{ "detail.promotion-banner.imac27"|trans|raw }}
  183.                                     </div>
  184.                                 {% elseif page.product.customFields.product_custom_fields_pdp_promobanner_ipad == true %}
  185.                                     <div class="product-detail-promotion-banderole">
  186.                                         {{ "detail.promotion-banner.ipad"|trans|raw }}
  187.                                     </div>
  188.                                 {% elseif page.product.customFields.product_custom_fields_pdp_promobanner_ipad_pro == true %}
  189.                                     <div class="product-detail-promotion-banderole">
  190.                                         {{ "detail.promotion-banner.ipad-pro"|trans|raw }}
  191.                                     </div>
  192.                                 {% elseif page.product.customFields.product_custom_fields_pdp_promobanner_mac_mini == true %}
  193.                                     <div class="product-detail-promotion-banderole">
  194.                                         {{ "detail.promotion-banner.mac-mini"|trans|raw }}
  195.                                     </div>
  196.                                 {% elseif page.product.customFields.product_custom_fields_pdp_promobanner_mac_studio == true %}
  197.                                     <div class="product-detail-promotion-banderole">
  198.                                         {{ "detail.promotion-banner.mac-studio"|trans|raw }}
  199.                                     </div>
  200.                                 {% endif %}
  201.                             </div>
  202.                         {% endblock %}
  203.                         {% set mediaItems = page.product.media.media %}
  204.                         {% block page_product_detail_main %}
  205.                             <div class="row product-detail-main">
  206.                                 {% block page_product_detail_media %}
  207.                                     <div class="col-lg-6 product-detail-media">
  208.                                         {#{% if page.product.customFields.product_custom_fields_subscription == true and page.product.restockTime <= 10 %}#}
  209.                                         {% 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 %}
  210.                                             <div class="abo-badge">
  211.                                                 <img src="{{ asset('assets/images/badge_abo.svg', "@AmMacTrade") }}" alt="Abo" height="50" width="50">
  212.                                             </div>
  213.                                         {% endif %}
  214.                                         {% if page.product.customFields.product_custom_fields_batch_protect == true %}
  215.                                             <div class="protect-badge">
  216.                                                 <a class="link-new-window" href="/garantiepaket">
  217.                                                     <img src="https://www.mactrade.de/media/a1/g0/f0/1644231456/stoerer-garantie.png" alt="">
  218.                                                 </a>
  219.                                             </div>
  220.                                         {% endif %}
  221.                                         {% if page.product.media %}
  222.                                             {% sw_include '@Storefront/storefront/element/cms-element-image-gallery.html.twig' with {
  223.                                                 'mediaItems': mediaItems,
  224.                                                 'zoom': true,
  225.                                                 'zoomModal': true,
  226.                                                 'displayMode': 'contain',
  227.                                                 'gutter': 5,
  228.                                                 'minHeight': '430px',
  229.                                                 'navigationArrows': 'inside',
  230.                                                 'navigationDots': 'inside',
  231.                                                 'galleryPosition': 'left',
  232.                                                 'isProduct': true,
  233.                                                 'fallbackImageTitle': page.product.translated.name,
  234.                                                 'startIndexThumbnails': page.product.cover.position,
  235.                                                 'startIndexSlider': page.product.cover.position
  236.                                             } %}
  237.                                         {% endif %}
  238.                                     </div>
  239.                                 {% endblock %}
  240.                                 {% block page_product_detail_buy %}
  241.                                     <div class="col-lg-5 offset-lg-1 product-detail-buy">
  242.                                         {% sw_include '@Storefront/storefront/page/product-detail/buy-widget.html.twig' %}
  243.                                     </div>
  244.                                 {% endblock %}
  245.                             </div>
  246.                         {% endblock %}
  247.                     </div>
  248.                 {% endblock %}
  249.     
  250.                 {% block page_product_detail_tabs %}
  251. {# start tabs #}
  252.             
  253.             <div class="m1 menu">
  254.             <div id="menu-center">
  255.                 <ul>
  256.                     <li class="active"><a href="#kombinierbare">Kombinierbare Aktionen</a></li>
  257.                     <li><a href="#produktbeschreibung">Produktbeschreibung</a></li>
  258.                     <li><a href="#technische">Technische Daten</a></li>
  259.                 </ul>
  260.             </div>
  261.         </div>
  262.             
  263.             {# end tabs #}
  264.             {# start tab js #}
  265.               <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
  266.               <script>
  267.              
  268. let onScroll = function(event){
  269.     var scrollPos = $(document).scrollTop();
  270.     $('#menu-center a').each(function () {
  271.         var currLink = $(this);
  272.         var refElement = $(currLink.attr("href"));
  273.         scrollPos += 150;
  274.         if (refElement.position().top <= scrollPos && refElement.position().top + refElement.height() > scrollPos) {
  275.             $('#menu-center ul a').parent().removeClass("active");
  276.             currLink.parent().addClass("active");
  277.         }
  278.         else{
  279.             currLink.parent().removeClass("active");
  280.         }
  281.     });
  282. }
  283.  $(document).ready(function () {
  284.     $(document).on("scroll.custom", onScroll);
  285.     
  286.     //smoothscroll
  287.     $('a[href^="#"]').on('click', function (e) {
  288.         e.preventDefault();
  289.         $(document).off("scroll.custom");
  290.         
  291.         $('a').each(function () {
  292.             $(this).parent().removeClass('active');
  293.         })
  294.         $(this).parent().addClass('active');
  295.       
  296.         var target = this.hash;
  297.        e.preventDefault();
  298.             var pos = $(this).attr('href');
  299.             doScrolling(pos, 1000);
  300.         
  301.     });
  302. });
  303. function doScrolling(element, duration) {
  304.             var startingY = window.pageYOffset
  305.             var elementY = getElementY(element) + 70
  306.             var targetY = document.body.scrollHeight - elementY < window.innerHeight ? document.body.scrollHeight - window.innerHeight : elementY
  307.             var diff = (targetY - (130 + 85)) - startingY
  308.             var easing = function(t) {
  309.                 return t < .5 ? 4 * t * t * t : (t - 1) * (2 * t - 2) * (2 * t - 2) + 1
  310.             }
  311.             var start
  312.             if (!diff)
  313.                 return
  314.             window.requestAnimationFrame(function step(timestamp) {
  315.                 if (!start)
  316.                     start = timestamp
  317.                 var time = timestamp - start
  318.                 var percent = Math.min(time / duration, 1)
  319.                 percent = easing(percent)
  320.                 window.scrollTo(0, startingY + diff * percent)
  321.                 if (time < duration) {
  322.                     window.requestAnimationFrame(step);
  323.                 } else {
  324.                     $(element).parent().addClass("active").siblings().removeClass("active");
  325.                      $(document).on("scroll.custom", onScroll);
  326.                 }
  327.             })
  328.         }
  329.          function getElementY(query) {
  330.             return window.pageYOffset + document.querySelector(query).getBoundingClientRect().top
  331.         }
  332.               </script>
  333.               {# end tab js #}
  334.     <div class="product-detail-tabs tb-pd d-none">
  335.         {% sw_include '@Storefront/storefront/page/product-detail/tabs.html.twig' %}
  336.     </div>
  337.                     <div class="product-detail-tabs">
  338.                         {% sw_include '@Storefront/storefront/page/product-detail/tabs.html.twig' %}
  339.                     </div>
  340.                     {#<div class="product-detail-tabs properties">
  341.                         {% sw_include '@Storefront/storefront/page/product-detail/tabs-properties.html.twig' %}
  342.                     </div>#}
  343.                 {% endblock %}
  344.                 {% block page_product_detail_cross_selling %}
  345.                       {% if page.product.extensions.netiProductCms and page.product.extensions.netiProductCms.getReplaceProductDetailDescriptionContent() %}
  346.             <div class="product-detail-description-text 6666666666" itemprop="description">
  347.                 {% for content in page.product.extensions.netiProductCms.getReplaceProductDetailDescriptionContent() %}
  348.                     <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 %}>
  349.                         {{ content|raw }}
  350.                     </div>
  351.                 {% endfor %}
  352.             </div>
  353.     {% endif %}
  354.     
  355.      {% if page.product.extensions.netiProductCms and page.product.extensions.netiProductCms.getAboveProductDetailDescriptionContent() %}
  356.         
  357.             {% for content in page.product.extensions.netiProductCms.getAboveProductDetailDescriptionContent() %}
  358.                 <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 %}>
  359.                     {{ content|raw }}
  360.                 </div>
  361.             {% endfor %}
  362.         
  363.     {% endif %}
  364.     
  365.     {% if page.product.extensions.netiProductCms and page.product.extensions.netiProductCms.getAboveProductDescriptionContent() %}
  366.             {% for content in page.product.extensions.netiProductCms.getAboveProductDescriptionContent() %}
  367.                 <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 %}>
  368.                     {{ content|raw }}
  369.                 </div>
  370.             {% endfor %}
  371.         {% endif %}
  372.         
  373.         
  374.         
  375.     {% if page.product.customFields.custom_pdp_content_file_path is empty  %}
  376. <div id="produktbeschreibung" >
  377. <div class="more-text-btn show-more-height">
  378. <h3 class="d-flex justify-content-center">{{ "detail.descriptionTitle"|trans|sw_sanitize }} </h3>
  379.     {{ page.product.translated.description|raw }} 
  380. </div>
  381. </div>
  382.     {% endif %}
  383.     {% if page.product.customFields.custom_pdp_content_file_path is not empty  %}
  384. {#<div class="h3 product-detail-description-title">
  385.                     {{ "detail.descriptionTitle"|trans|sw_sanitize }} "{{ page.product.translated.name }}"
  386.                 </div> #}
  387.                 
  388.                 {% endif %}
  389.     {% if page.product.customFields.custom_pdp_content_file_path is not empty  %}
  390.     
  391.     <div id="produktbeschreibung" class="is--neti-next-productdetailcms is--below-product_detail_description noindent">
  392.     
  393.      <div class="more-text-btn show-more-height">
  394.     <h2 class="d-flex justify-content-center"> {{ "detail.descriptionTitle"|trans|sw_sanitize }} </h2>
  395.     
  396.     <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> 
  397.      {# {{ productpdp|raw }}  #}
  398.     </div>
  399.     </div>
  400.     
  401.     
  402.     
  403.     {% endif %}
  404.     <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>
  405.    <!--BEGIN > SCRIPTS:BASE -->
  406.     <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">&nbsp;</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>
  407.     <!--END > SCRIPTS:BASE -->
  408.     <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
  409.          <script>
  410.         $(document).ready(function() {
  411.             if($(".more-text-btn").hasClass("show-more-height")) {
  412.                 $(".more-text-btn").removeClass("show-more-height")
  413.                 $(".mc-show-more").html("Weniger anzeigen");
  414.             }
  415.                 $(".mc-show-more").click(function () {
  416.                     if($(".more-text-btn").hasClass("show-more-height")) {
  417.                         $(this).text("Weniger anzeigen");
  418.                     } else {
  419.                         $(this).text("Mehr anzeigen");
  420.                     }
  421.                     $(".more-text-btn").toggleClass("show-more-height");
  422.                 });
  423.             });
  424.     </script>
  425.     
  426.       <script>
  427.     let iframe = document.querySelector("#child-iframe");
  428.     iframe.addEventListener('load', function() {
  429.         if(iframe.contentDocument.body.scrollHeight) {
  430.           let newheight = iframe.contentDocument.body.scrollHeight + 50 ;
  431.             iframe.style.height = newheight + 'px';
  432.             iframe.style.width = iframe.contentDocument.body.scrollWidth + 'px';
  433.         }
  434.     });    
  435. </script>
  436. {% if page.product.extensions.netiProductCms and page.product.extensions.netiProductCms.getBelowProductDescriptionContent() %}
  437.             {% for content in page.product.extensions.netiProductCms.getBelowProductDescriptionContent() %}
  438.                 <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 %}>
  439.                     {{ content|raw }}
  440.                 </div>
  441.             {% endfor %}
  442.         {% endif %}
  443.          
  444.                     {% if page.crossSellings|length > 0 %}
  445.                         <div class="product-detail-tabs product-detail-cross-selling">
  446.                             {% sw_include '@Storefront/storefront/page/product-detail/cross-selling/tabs.html.twig' with {
  447.                                 crossSellings: page.crossSellings
  448.                             } only %}
  449.                         </div>
  450.                     {% endif %}
  451.                 {% endblock %}
  452.             {% endblock %}
  453.         </div>
  454.     {% endblock %}
  455. {% endblock %}