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

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/page/product-detail/index.html.twig' %}
  2. {# due to different positioning of elements in mobile and desktop, we had to work with responsive classes as well as conditional device rendering (SD-5192 #}
  3. {% set isMobile = device == 'mobile' %}
  4. {% block base_header %}
  5.     <header class="header-main sticky-header">
  6.         {% block base_header_inner %}
  7.             <div class="container">
  8.                 {% sw_include '@Storefront/storefront/layout/header/header.html.twig' %}
  9.             </div>
  10.         {% endblock %}
  11.     </header>
  12. {% endblock %}
  13. {% block base_navigation %}
  14.     <div class="nav-main sticky-header-nav">
  15.         {% block base_navigation_inner %}
  16.             {% sw_include '@Storefront/storefront/layout/navigation/navigation.html.twig' %}
  17.         {% endblock %}
  18.     </div>
  19.     {# Sticky Header #}
  20.     <script>
  21.         function scrollToSection(sectionId) {
  22.             var section = document.getElementById(sectionId);
  23.             var offset = -500; // Adjust the offset as needed
  24.             if (section) {
  25.                 var offsetTop = section.offsetTop - offset;
  26.                 // window.scrollTo(0,15000);
  27.                 window.scrollTo({ top: 175, behavior: "smooth" });
  28.             }
  29.         }
  30.     </script>
  31.     <div class="sticky-product-header">
  32.         <div class="sticky-product-header-inner">
  33.             <div class="row">
  34.                 <div class="col-lg-7 col-12 product-navigation">
  35.                     {# <span class="header-nav-link"><a href="#productDescription" onclick="scrollToSection('productDescription')">{{ "detail.descriptionTitle"|trans|sw_sanitize }}</a></span>
  36.                     <span class="header-nav-link"><a href="#productRelatedArticles" onclick="scrollToSection('productRelatedArticles')">{{ "product.relatedProducts"|trans|sw_sanitize }}</a></span> #}
  37.                     <span class="header-nav-link"><a href="#productGeneralDescription" onclick="scrollToSection('productGeneralDescription')">{{ "detail.tabsDescription"|trans|sw_sanitize }}</a></span>
  38.                     {% if page.product.sortedProperties|length > 0 or page.product.manufacturerNumber != "" or page.product.ean != "" %}
  39.                         <span class="header-nav-link"><a href="#productGeneralProperties" onclick="scrollToSection('productGeneralProperties')">{{ "detail.tabsProperties"|trans|sw_sanitize }}</a></span>
  40.                     {% endif %}
  41.                     {% if product.customFields and product.customFields.downloads and product.customFields.downloads|length %}
  42.                         <span class="header-nav-link"><a href="#productGeneralDownloads" onclick="scrollToSection('productGeneralDownloads')">{{ "detail.tabsDownloads"|trans|sw_sanitize }}</a></span>
  43.                     {% endif %}
  44.                 </div>
  45.                 <div class="col-lg-2 only-desktop">
  46.                     {% sw_include '@Storefront/storefront/component/product/card/price-taxes.html.twig' with {
  47.                         product: page.product
  48.                     } %}
  49.                     <br>
  50.                     {% sw_include '@Storefront/storefront/page/product-detail/buy-widget-price.html.twig' with {
  51.                         product: page.product
  52.                     } %}
  53.                 </div>
  54.                 <div class="d-none d-md-block col-lg-3">
  55.                 <form
  56.                 class="show-form-loader show-form-loader-buy-btn"
  57.                 action="{% block page_product_detail_buy_form_action %}{{ path('frontend.checkout.line-item.add') }}{% endblock %}"
  58.                 method="post"
  59.                 data-add-to-cart="true"
  60.                 class="buy-widget">
  61.                     {{ sw_csrf('frontend.checkout.line-item.add') }}
  62.                     <input type="hidden"
  63.                                name="redirectTo"
  64.                                value="frontend.detail.page">
  65.                     <input type="hidden"
  66.                             name="redirectParameters"
  67.                             data-redirect-parameters="true"
  68.                             value='{"productId": "{{ page.product.id }}"}'>
  69.                     <input type="hidden"
  70.                                name="lineItems[{{ page.product.id }}][id]"
  71.                                value="{{ page.product.id }}">
  72.                     <input type="hidden"
  73.                             name="lineItems[{{ page.product.id }}][type]"
  74.                             value="product">
  75.                     <input type="hidden"
  76.                             name="lineItems[{{ page.product.id }}][referencedId]"
  77.                             value="{{ page.product.id }}">
  78.                     <input type="hidden"
  79.                             name="lineItems[{{ page.product.id }}][stackable]"
  80.                             value="1">
  81.                     <input type="hidden"
  82.                             name="lineItems[{{ page.product.id }}][removable]"
  83.                             value="1">
  84.                     <input type="hidden"
  85.                                name="product-name"
  86.                                value="{{ page.product.translated.name }}">
  87.                     <input type="hidden"
  88.                             name="brand-name"
  89.                             value="{{ page.product.manufacturer.getName() }}">
  90.                     <button class="btn btn-block btn-buy font-weight-bold w-100 justify-content-center mb-1" title="Warenkorb">
  91.                         <span class="d-sm-none mr-3">{{ "product.buyButton"|trans|sw_sanitize }}</span><span class="d-none d-sm-inline mr-3">{{ "detail.addProduct"|trans|sw_sanitize }}</span>
  92.                         <span class="lak icon icon-warenkorb icon-sm">
  93.                             <svg width="23px" height="23px" viewBox="0 0 23 23" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
  94.                                 <g id="Startseite" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
  95.                                     <g id="Startseite-Lang-Copy-9" transform="translate(-1282.000000, -61.000000)" fill="#9B9B9B" fill-rule="nonzero">
  96.                                         <g id="Group-41">
  97.                                             <g id="Group-5" transform="translate(1282.000000, 61.000000)">
  98.                                                 <g id="Group-36" transform="translate(0.500000, 0.500000)">
  99.                                                     <path d="M0.5,1 L2.83418038,1 C3.07711701,1 3.28489881,1.17462161 3.32671697,1.41393197 L5.83329879,15.7582041 C5.95875326,16.4761352 6.58209867,17 7.31090857,17 L18.5526336,17 C18.828776,17 19.0526336,16.7761424 19.0526336,16.5 C19.0526336,16.2238576 18.828776,16 18.5526336,16 L7.31090857,16 C7.06797193,16 6.86019013,15.8253784 6.81837197,15.586068 L4.31179015,1.24179591 C4.18633568,0.523864821 3.56299027,0 2.83418038,0 L0.5,0 C0.223857625,0 1.02318154e-12,0.223857625 1.02318154e-12,0.5 C1.02318154e-12,0.776142375 0.223857625,1 0.5,1 Z" id="Path-6"></path>
  100.                                                     <path d="M7.10477473,3.78963344 L20.9464503,3.78963344 C21.2225927,3.78963344 21.4464503,4.01349107 21.4464503,4.28963344 C21.4464503,4.3390493 21.4391247,4.38819219 21.4247125,4.43545967 L19.2903526,11.4354597 C19.2261971,11.6458689 19.0320631,11.7896334 18.8120904,11.7896334 L8.43673944,11.7896334 C8.16059707,11.7896334 7.93673944,12.0134911 7.93673944,12.2896334 C7.93673944,12.5657758 8.16059707,12.7896334 8.43673944,12.7896334 L18.8120904,12.7896334 C19.4720085,12.7896334 20.0544103,12.3583398 20.246877,11.7271121 L22.3812368,4.72711212 C22.4244736,4.58530969 22.4464503,4.43788103 22.4464503,4.28963344 C22.4464503,3.46120632 21.7748774,2.78963344 20.9464503,2.78963344 L7.10477473,2.78963344 C6.82863235,2.78963344 6.60477473,3.01349107 6.60477473,3.28963344 C6.60477473,3.56577582 6.82863235,3.78963344 7.10477473,3.78963344 Z" id="Path-7"></path>
  101.                                                     <path d="M9.19378522,21.8094908 C10.1602835,21.8094908 10.9437852,21.0259891 10.9437852,20.0594908 C10.9437852,19.0929925 10.1602835,18.3094908 9.19378522,18.3094908 C8.22728691,18.3094908 7.44378522,19.0929925 7.44378522,20.0594908 C7.44378522,21.0259891 8.22728691,21.8094908 9.19378522,21.8094908 Z M9.19378522,20.8094908 C8.77957165,20.8094908 8.44378522,20.4737044 8.44378522,20.0594908 C8.44378522,19.6452772 8.77957165,19.3094908 9.19378522,19.3094908 C9.60799878,19.3094908 9.94378522,19.6452772 9.94378522,20.0594908 C9.94378522,20.4737044 9.60799878,20.8094908 9.19378522,20.8094908 Z" id="Oval"></path>
  102.                                                     <path d="M18.1937852,21.8094908 C19.1602835,21.8094908 19.9437852,21.0259891 19.9437852,20.0594908 C19.9437852,19.0929925 19.1602835,18.3094908 18.1937852,18.3094908 C17.2272869,18.3094908 16.4437852,19.0929925 16.4437852,20.0594908 C16.4437852,21.0259891 17.2272869,21.8094908 18.1937852,21.8094908 Z M18.1937852,20.8094908 C17.7795717,20.8094908 17.4437852,20.4737044 17.4437852,20.0594908 C17.4437852,19.6452772 17.7795717,19.3094908 18.1937852,19.3094908 C18.6079988,19.3094908 18.9437852,19.6452772 18.9437852,20.0594908 C18.9437852,20.4737044 18.6079988,20.8094908 18.1937852,20.8094908 Z" id="Oval-Copy-3"></path>
  103.                                                 </g>
  104.                                             </g>
  105.                                         </g>
  106.                                     </g>
  107.                                 </g>
  108.                             </svg>
  109.                         </span>
  110.                     </button>
  111.                 </form>
  112.                 </div>
  113.             </div>
  114.         </div>
  115.     </div>
  116.     <div class="sticky-product-footer d-md-none">
  117.         <div class="sticky-product-footer-inner d-flex justify-content-between align-items-center">
  118.             <div class="col-lg-2 p-0">
  119.                 {% sw_include '@Storefront/storefront/component/product/card/price-taxes.html.twig' with {
  120.                     product: page.product
  121.                 } %}
  122.                 <br>
  123.                 {% sw_include '@Storefront/storefront/page/product-detail/buy-widget-price.html.twig' with {
  124.                     product: page.product
  125.                 } %}
  126.             </div>
  127.             <div class="d-md-none">
  128.                 <form
  129.                 class="show-form-loader show-form-loader-buy-btn"
  130.                 action="{{ path('frontend.checkout.line-item.add') }}"
  131.                 method="post"
  132.                 data-add-to-cart="true"
  133.                 class="buy-widget">
  134.                     {{ sw_csrf('frontend.checkout.line-item.add') }}
  135.                     <input type="hidden"
  136.                             name="redirectTo"
  137.                             value="frontend.detail.page">
  138.                     <input type="hidden"
  139.                             name="redirectParameters"
  140.                             data-redirect-parameters="true"
  141.                             value='{"productId": "{{ page.product.id }}"}'>
  142.                     <input type="hidden"
  143.                             name="lineItems[{{ page.product.id }}][id]"
  144.                             value="{{ page.product.id }}">
  145.                     <input type="hidden"
  146.                             name="lineItems[{{ page.product.id }}][type]"
  147.                             value="product">
  148.                     <input type="hidden"
  149.                             name="lineItems[{{ page.product.id }}][referencedId]"
  150.                             value="{{ page.product.id }}">
  151.                     <input type="hidden"
  152.                             name="lineItems[{{ page.product.id }}][stackable]"
  153.                             value="1">
  154.                     <input type="hidden"
  155.                             name="lineItems[{{ page.product.id }}][removable]"
  156.                             value="1">
  157.                     <input type="hidden"
  158.                             name="product-name"
  159.                             value="{{ page.product.translated.name }}">
  160.                     <input type="hidden"
  161.                             name="brand-name"
  162.                             value="{{ page.product.manufacturer.getName() }}">
  163.                     <button class="btn btn-block btn-buy font-weight-bold w-100 justify-content-center justify-content-md-around mb-1 sticky-footer-btn-buy" title="Warenkorb">
  164.                         <span class="lak icon icon-warenkorb icon-sm">
  165.                             <svg width="23px" height="23px" viewBox="0 0 23 23" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
  166.                                 <g id="Startseite" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
  167.                                     <g id="Startseite-Lang-Copy-9" transform="translate(-1282.000000, -61.000000)" fill="#9B9B9B" fill-rule="nonzero">
  168.                                         <g id="Group-41">
  169.                                             <g id="Group-5" transform="translate(1282.000000, 61.000000)">
  170.                                                 <g id="Group-36" transform="translate(0.500000, 0.500000)">
  171.                                                     <path d="M0.5,1 L2.83418038,1 C3.07711701,1 3.28489881,1.17462161 3.32671697,1.41393197 L5.83329879,15.7582041 C5.95875326,16.4761352 6.58209867,17 7.31090857,17 L18.5526336,17 C18.828776,17 19.0526336,16.7761424 19.0526336,16.5 C19.0526336,16.2238576 18.828776,16 18.5526336,16 L7.31090857,16 C7.06797193,16 6.86019013,15.8253784 6.81837197,15.586068 L4.31179015,1.24179591 C4.18633568,0.523864821 3.56299027,0 2.83418038,0 L0.5,0 C0.223857625,0 1.02318154e-12,0.223857625 1.02318154e-12,0.5 C1.02318154e-12,0.776142375 0.223857625,1 0.5,1 Z" id="Path-6"></path>
  172.                                                     <path d="M7.10477473,3.78963344 L20.9464503,3.78963344 C21.2225927,3.78963344 21.4464503,4.01349107 21.4464503,4.28963344 C21.4464503,4.3390493 21.4391247,4.38819219 21.4247125,4.43545967 L19.2903526,11.4354597 C19.2261971,11.6458689 19.0320631,11.7896334 18.8120904,11.7896334 L8.43673944,11.7896334 C8.16059707,11.7896334 7.93673944,12.0134911 7.93673944,12.2896334 C7.93673944,12.5657758 8.16059707,12.7896334 8.43673944,12.7896334 L18.8120904,12.7896334 C19.4720085,12.7896334 20.0544103,12.3583398 20.246877,11.7271121 L22.3812368,4.72711212 C22.4244736,4.58530969 22.4464503,4.43788103 22.4464503,4.28963344 C22.4464503,3.46120632 21.7748774,2.78963344 20.9464503,2.78963344 L7.10477473,2.78963344 C6.82863235,2.78963344 6.60477473,3.01349107 6.60477473,3.28963344 C6.60477473,3.56577582 6.82863235,3.78963344 7.10477473,3.78963344 Z" id="Path-7"></path>
  173.                                                     <path d="M9.19378522,21.8094908 C10.1602835,21.8094908 10.9437852,21.0259891 10.9437852,20.0594908 C10.9437852,19.0929925 10.1602835,18.3094908 9.19378522,18.3094908 C8.22728691,18.3094908 7.44378522,19.0929925 7.44378522,20.0594908 C7.44378522,21.0259891 8.22728691,21.8094908 9.19378522,21.8094908 Z M9.19378522,20.8094908 C8.77957165,20.8094908 8.44378522,20.4737044 8.44378522,20.0594908 C8.44378522,19.6452772 8.77957165,19.3094908 9.19378522,19.3094908 C9.60799878,19.3094908 9.94378522,19.6452772 9.94378522,20.0594908 C9.94378522,20.4737044 9.60799878,20.8094908 9.19378522,20.8094908 Z" id="Oval"></path>
  174.                                                     <path d="M18.1937852,21.8094908 C19.1602835,21.8094908 19.9437852,21.0259891 19.9437852,20.0594908 C19.9437852,19.0929925 19.1602835,18.3094908 18.1937852,18.3094908 C17.2272869,18.3094908 16.4437852,19.0929925 16.4437852,20.0594908 C16.4437852,21.0259891 17.2272869,21.8094908 18.1937852,21.8094908 Z M18.1937852,20.8094908 C17.7795717,20.8094908 17.4437852,20.4737044 17.4437852,20.0594908 C17.4437852,19.6452772 17.7795717,19.3094908 18.1937852,19.3094908 C18.6079988,19.3094908 18.9437852,19.6452772 18.9437852,20.0594908 C18.9437852,20.4737044 18.6079988,20.8094908 18.1937852,20.8094908 Z" id="Oval-Copy-3"></path>
  175.                                                 </g>
  176.                                             </g>
  177.                                         </g>
  178.                                     </g>
  179.                                 </g>
  180.                             </svg>
  181.                         </span>
  182.                     </button>
  183.                 </form>
  184.             </div>
  185.         </div>
  186.     </div>
  187.     
  188. {% endblock %}
  189. {% block base_content %}
  190.     {% set product = page.product %}
  191.     {% set device = app.session.get('deviceType') %}
  192.     {% block page_product_detail %}
  193.         <div class="product-detail" itemscope itemtype="https://schema.org/Product">
  194.             {% block page_product_detail_inner %}
  195.                 {% block page_product_detail_content %}
  196.                     <div class="product-detail-content">
  197.                         <div class="sw-clarity" data-action="set" data-params='[[ "pageType", "product" ]]'></div>
  198.                         {% set mediaItems = page.product.media.media %}
  199.                         <div class="row product-detail__box-container">
  200.                             {% block page_product_detail_headline %}
  201.                                 <button class="product-detail__print-btn d-none d-lg-block no-print" onclick="window.print()">
  202.                                     {% sw_icon 'drucken' style {'pack': 'grimmtheme', 'namespace': 'GrimmTheme', 'size': 'sm'} %}
  203.                                     {{ "detail.print"|trans|sw_sanitize }}
  204.                                 </button>
  205.                                 <div class="col-12 row align-items-center product-detail-headline">
  206.                                     {% sw_include '@Storefront/storefront/page/product-detail/headline.html.twig' %}
  207.                                 </div>
  208.                             {% endblock %}
  209.                             {% block page_product_detail_media %}
  210.                                 <div class="col-lg-7 product-detail__first-block">
  211.                                     <div class="customer-switch__container d-md-none">
  212.                                         <nav class="row no-gutters top-bar-nav align-items-center">
  213.                                             <div id="top-bar-nav__item1" class="custom-control custom-switch">
  214.                                                 <label for="customSwitch1" class="top-bar-nav__label control-label label-b2b">{{ "header.accountType.business"|trans|sw_sanitize }}</label>
  215.                                                 <input type="checkbox" class="custom-control-input" id="customSwitch1" data-switch-tax {% if context.taxState is same as('gross') %}checked="checked"{% endif %}>
  216.                                                 <label for="customSwitch1" class="custom-control-label label-b2c">{{ "header.accountType.private"|trans|sw_sanitize }}</label>
  217.                                             </div>
  218.                                         </nav>
  219.                                     </div>
  220.                                     <div class="product-detail-media">
  221.                                         {% if page.product.media %}
  222.                                             {% sw_include '@Storefront/storefront/element/cms-element-image-gallery.html.twig' with {
  223.                                                 'mediaItems': mediaItems,
  224.                                                 'zoom': false,
  225.                                                 'zoomModal': true,
  226.                                                 'displayMode': 'contain',
  227.                                                 'gutter': 5,
  228.                                                 'minHeight': '430px',
  229.                                                 'navigationArrows': 'inside',
  230.                                                 'navigationDots': 'outside',
  231.                                                 'galleryPosition': 'left',
  232.                                                 'isProduct': true,
  233.                                                 'fallbackImageTitle': page.product.translated.name,
  234.                                                 'startIndexThumbnails': 1,
  235.                                                 'startIndexSlider': 1
  236.                                             } %}
  237.                                         {% endif %}
  238.                                     </div>
  239.                                     {# SD-5192: client wanted it this way #}
  240.                                     {# desktop #}
  241.                                 </div>
  242.                             {% endblock %}
  243.                             {% block page_product_detail_main %}
  244.                                 <div class="col-lg-5 product-detail-main">
  245.                                     <div class="customer-switch__container d-none d-lg-block">
  246.                                         <nav class="row no-gutters top-bar-nav align-items-center">
  247.                                             <div id="top-bar-nav__item1" class="custom-control custom-switch">
  248.                                                 <label for="customSwitch1" class="top-bar-nav__label control-label label-b2b">{{ "header.accountType.business"|trans|sw_sanitize }}</label>
  249.                                                 <input type="checkbox" class="custom-control-input" id="customSwitch1" data-switch-tax {% if context.taxState is same as('gross') %}checked="checked"{% endif %}>
  250.                                                 <label for="customSwitch1" class="custom-control-label label-b2c">{{ "header.accountType.private"|trans|sw_sanitize }}</label>
  251.                                             </div>
  252.                                         </nav>
  253.                                     </div>
  254.                                     {% block page_product_detail_buy %}
  255.                                         <div class="product-detail-buy__container">
  256.                                             {% sw_include '@Storefront/storefront/page/product-detail/buy-widget.html.twig' %}
  257.                                             {# {% sw_include '@Storefront/storefront/page/product-detail/share-modal.html.twig' %} #}
  258.                                             
  259.                                             {# BREITE LÄNGE WINDOW #}
  260.                                             {% if page.product.parentId and page.configuratorSettings|length > 0 %}
  261.                                                 <div class="product-detail-configurator-container test">
  262.                                                     {% sw_include '@Storefront/storefront/page/product-detail/configurator_dropdown.html.twig' %}
  263.                                                 </div>
  264.                                             {% endif %}
  265.                                             
  266.                                             
  267.                                             {# ZUBEHÖR #}
  268.                                             {% if not isMobile %}
  269.                                                 <div class="product-detail-tabs__cross-selling">
  270.                                                     {# moved from bottom where now clerk crossselling will appear #}
  271.                                                     {% if page.crossSellings|length > 0 and page.crossSellings|first.total > 0 %}
  272.                                                             <div class="product-detail-tabs {% if isMobile %}product-detail-tabs--mobile{% endif %}">
  273.                                                                 {% if isMobile %}
  274.                                                                     {% sw_include '@Storefront/storefront/page/product-detail/cross-selling/tabs-mobile.html.twig' with { 
  275.                                                                         crossSellings: page.crossSellings,
  276.                                                                         onlyShowFew: true
  277.                                                                     } %}
  278.                                                                 {% else %}
  279.                                                                     {% sw_include '@Storefront/storefront/page/product-detail/cross-selling/tabs.html.twig' with {
  280.                                                                         crossSellings: page.crossSellings,
  281.                                                                         onlyShowFew: true
  282.                                                                     } %}
  283.                                                                     {# {% sw_include '@Storefront/storefront/page/product-detail/cross-selling/horizontal-tabs.html.twig' with {
  284.                                                                         crossSellings: page.crossSellings
  285.                                                                     } %}
  286.                                                                     {% for item in page.crossSellings %}
  287.                                                                         {% set id = item.crossSelling.id %}
  288.                                                                         {% if item.crossSelling.active and item.getProducts().elements %}
  289.                                                                             {% set config = {
  290.                                                                                         'title': {
  291.                                                                                             'value': item.crossSelling.name
  292.                                                                                         },
  293.                                                                                         'border': {
  294.                                                                                             'value': false
  295.                                                                                         },
  296.                                                                                         'rotate': {
  297.                                                                                             'value': false
  298.                                                                                         },
  299.                                                                                         'products': {
  300.                                                                                             'value': item.getProducts()
  301.                                                                                         },
  302.                                                                                         'boxLayout': {
  303.                                                                                             'value': 'standard'
  304.                                                                                         },
  305.                                                                                         'elMinWidth': {
  306.                                                                                             'value': '150px'
  307.                                                                                         },
  308.                                                                                         'navigation': {
  309.                                                                                             'value': true
  310.                                                                                         },
  311.                                                                                         'displayMode': {
  312.                                                                                             'value': 'minimal'
  313.                                                                                         },
  314.                                                                                         'verticalAlign': {
  315.                                                                                             'value': 'top'
  316.                                                                                         },
  317.                                                                                     } %}
  318.                                                                         {% sw_include "@Storefront/storefront/element/cms-element-product-slider.html.twig" with {
  319.                                                                                         sliderConfig: config,
  320.                                                                                         element: {
  321.                                                                                             'data': {
  322.                                                                                                 'products': {
  323.                                                                                                     elements: item.getProducts()
  324.                                                                                                 }
  325.                                                                                             },
  326.                                                                                             type: 'product-slider'
  327.                                                                                         }
  328.                                                                                     } %}
  329.                                                                             {% endif %} #}
  330.                                                                 {% endif %}
  331.                                                             </div>
  332.                                                     {% endif %}
  333.                                                     {# experts go here #}
  334.                                                 </div>
  335.                                                 
  336.                                             {% endif %}
  337.                                             
  338.                                             {# GARANTIE #}
  339.                                             <div class="product-detail-guarantee-container">
  340.                                                 <a class="monthly-installment-btn d-inline-block mb-2 col-12" href="/garantie-reklamation.html" target="_blank">
  341.                                                    {% sw_icon 'info' %}  <span class="guarantee-title">{{ "detail.guarantee.title"|trans|sw_sanitize }}</span>
  342.                                                 </a>
  343.                                             </div>
  344.                                             {# LEASING #}
  345.                                             {% set requestOnly = page.product.translated.customFields.grimm_customfields_productRequest_only %}
  346.                                             {% if (page.product.calculatedPrice.unitPrice >= 500) and (context.taxState == "net") and (requestOnly == false) %}
  347.                                                 <div class="product-detail-leasing-container">
  348.                                                         {% sw_include '@Storefront/solution360/grimm/leasing/leasing-modal.html.twig' 
  349.                                                         with {
  350.                                                             'price': page.product.calculatedPrice.unitPrice
  351.                                                         }
  352.                                                         %}
  353.                                                 </div>
  354.                                             {% endif %}
  355.                                             {% set additionalDeliveryInfoSpecific = product.translated.customFields.grimm_customFields_additionalDeliveryInfo %}
  356.                                             {% set additionalDeliveryInfoGeneral = "product.additionalDeliveryInfo"|trans|sw_sanitize %}
  357.                                             {% if additionalDeliveryInfoSpecific %}
  358.                                                 <div class="product-detail-buy additional-delivery-info buy-box-style mb-3">
  359.                                                     {{ additionalDeliveryInfoSpecific|raw }}
  360.                                                 </div>
  361.                                             {% elseif additionalDeliveryInfoGeneral != "" %}
  362.                                                 <div class="product-detail-buy additional-delivery-info buy-box-style mb-3">
  363.                                                     {{ additionalDeliveryInfoGeneral }}
  364.                                                 </div>
  365.                                             {% endif %}
  366.                                         </div>
  367.                                     {% endblock %}
  368.                                     {# SD-5192: client wanted it this way #}
  369.                                 </div>
  370.                                 <div class="col-lg-12 product-detail-tabs__cross-selling">
  371.                                     {% block page_product_detail_cross_selling %}
  372.                                     <a id="productRelatedArticles" style="scroll-margin-top: 250px"></a>
  373.                                         {# original crossselling was here #}
  374.                                         {# copied from S360ProductRecommendations plugin #}
  375.                                         {% if config("S360ProductRecommendations.config") and config("S360ProductRecommendations.config.active") %}
  376.                                             {% set recommendationProducts = page.getExtension('s360ProductRecommendations') %}
  377.                                             {% if recommendationProducts.products.elements %}
  378.                                                 {% set sliderConfig = {
  379.                                                     "boxLayout": {
  380.                                                         "value": "minimal"
  381.                                                     },
  382.                                                     "navigation": {
  383.                                                         "value": true
  384.                                                     },
  385.                                                     "title": {
  386.                                                         "value": "detail.productRecommendations"|trans
  387.                                                     }
  388.                                                 } %}
  389.                                                 {% sw_include '@Storefront/storefront/element/cms-element-s360-adjustable-productslider.html.twig'
  390.                                                     with {
  391.                                                         "element": {
  392.                                                             "type": "s360-adjustable-productslider",
  393.                                                             "data": recommendationProducts
  394.                                                         },
  395.                                                         "sliderConfig": sliderConfig
  396.                                                     }
  397.                                                 %}
  398.                                             {% endif %}
  399.                                         {% endif %}
  400.                                         {# clerk plugin has to be copied here, parent cannot be used because crossselling appears elsewhere on page #}
  401.                                         {% if config('Clerkio.config.productRecommendationsEnabled') == 'true' %}
  402.                                             {% set contents = config('Clerkio.config.productRecommendationsContent') | split(',') %}
  403.                                             <span class="clerk" data-template="@{{ contents[0] | replace({' ': ''}) }}" data-products='["{{ page.product.parentId ? page.product.parentId|upper : page.product.id|upper }}"]'></span>
  404.                                         {% endif %}
  405.                                     {% endblock %}
  406.                                 </div>
  407.                                 <div class="col-lg-7 product-detail-tabs__wrapper pt-3">
  408.                                     {% if not isMobile %}
  409.                                         <div class="">
  410.                                             <div class="product-detail-tabs">
  411.                                             {% if page.product.translated.description %}
  412.                                                 <div>
  413.                                                     <a id="productGeneralDescription" style="scroll-margin-top: 250px"></a>
  414.                                                     <h2 class="font-weight-bold">{{ "detail.tabsDescription"|trans|sw_sanitize }}</h2>
  415.                                                     {% sw_include '@Storefront/storefront/page/product-detail/description.html.twig' %}
  416.                                                 </div>
  417.                                             {% endif %}
  418.                                             {% if page.product.sortedProperties|length > 0 or page.product.manufacturerNumber != "" or page.product.ean != "" %}
  419.                                                 <div>
  420.                                                     <a id="productGeneralProperties" style="scroll-margin-top: 250px"></a>
  421.                                                     <h2 class="font-weight-bold">{{ "detail.tabsProperties"|trans|sw_sanitize }}</h2>
  422.                                                     {% sw_include '@Storefront/storefront/page/product-detail/properties.html.twig' %}
  423.                                                 </div>
  424.                                             {% endif %}
  425.                                             
  426.                                             {% if product.customFields and product.customFields.downloads and product.customFields.downloads|length %}
  427.                                                 <div>
  428.                                                     <a id="productGeneralDownloads" style="scroll-margin-top: 250px"></a>
  429.                                                     <h2 class="font-weight-bold">{{ "detail.tabsDownloads"|trans|sw_sanitize }}</h2>
  430.                                                     {% sw_include '@Storefront/storefront/page/product-detail/downloads.html.twig' %}
  431.                                                 </div>
  432.                                             {% endif %}
  433.                                                 {# {% sw_include '@Storefront/storefront/page/product-detail/tabs.html.twig' %} #}
  434.                                             </div>
  435.                                         </div>
  436.                                     {% endif %}
  437.                                 </div>
  438.                                 <div class="col-lg-5 product-detail-info pt-3">
  439.                                     <div class="mb-3 card reference-card">
  440.                                         <div class="card-header">
  441.                                             <div class="card-title">Unsere Referenzen</div>
  442.                                         </div>
  443.                                         <div class="card-body">
  444.                                             <div class="product-slider-controls-container">
  445.                                                 <div class="base-slider-controls" data-base-slider-controls="true" aria-label="Carousel Navigation" tabindex="0">
  446.                                                 <button id="prevButton" class="base-slider-controls-prev product-slider-controls-prev" aria-controls="tns2" tabindex="-1" data-controls="prev">{% sw_icon 'arrow-head-left' %}</button>
  447.                                                 <button id="nextButton" class="base-slider-controls-next product-slider-controls-next" aria-controls="tns2" tabindex="-1" data-controls="next">{% sw_icon 'arrow-head-right' %}</button>
  448.                                                 </div>
  449.                                             </div>
  450.                                             <div id="slider-container">
  451.                                                 <div id="image-slider">
  452.                                                     <div class="slide"><img src="/media/a1/72/75/1682430873/Hochschule-Fresenius.jpg" alt="Slide 1"></div>
  453.                                                     <div class="slide"><img src="/media/70/b0/17/1682430618/Konrad-Adenauer-Stiftung.jpg" alt="Slide 1"></div>
  454.                                                     <div class="slide"><img src="/media/3b/87/97/1633615706/Aviation-Catering.jpg" alt="Slide 2"></div>
  455.                                                     <div class="slide"><img src="/media/48/1f/c1/1633615706/Grand-Hyatt.jpg" alt="Slide 3"></div>
  456.                                                     <div class="slide"><img src="/media/b4/30/1c/1628156382/al-dente-group.jpg" alt="Slide 4"></div>
  457.                                                     <div class="slide"><img src="/media/77/11/2f/1633615706/Florida-Eis.jpg" alt="Slide 5"></div>
  458.                                                     <div class="slide"><img src="/media/47/ee/bf/1682430647/Heisser-Wolf.jpg" alt="Slide 6"></div>
  459.                                                     <div class="slide"><img src="/media/a1/72/75/1682430873/Hochschule-Fresenius.jpg" alt="Slide 7"></div>
  460.                                                     <div class="slide"><img src="/media/g0/4d/e3/1682430659/Upstall-Kantine.jpg" alt="Slide 8"></div>
  461.                                                     <div class="slide"><img src="/media/aa/11/51/1633615706/Regent-Berlin.jpg" alt="Slide 9"></div>
  462.                                                     <div class="slide"><img src="/media/5a/52/a1/1628156383/Wonder-Waffel.jpg" alt="Slide 10"></div>
  463.                                                     <div class="slide"><img src="/media/16/0a/a3/1628156382/Caritas.jpg" alt="Slide 11"></div>
  464.                                                     <div class="slide"><img src="/media/1d/1c/f8/1633615822/Tim-Raue-Logo.jpg" alt="Slide 12"></div>
  465.                                                     <!-- Add more slides as needed -->
  466.                                                 </div>
  467.                                             </div>
  468.                                         </div>
  469.                                     </div>
  470.                                     <script>
  471.                                         const _slider = document.getElementById('image-slider');
  472.                                         let _slideIndex = 0;
  473.                                         function showSlide(index) {
  474.                                             const translateValue = -index * (100 / 3) + '%';
  475.                                             _slider.style.transform = 'translateX(' + translateValue + ')';
  476.                                         }
  477.                                         function nextSlide() {
  478.                                             _slideIndex = (_slideIndex + 1) % (_slider.children.length - 2);
  479.                                             showSlide(_slideIndex);
  480.                                         }
  481.                                         function prevSlide() {
  482.                                             _slideIndex = (_slideIndex - 1 + (_slider.children.length - 2)) % (_slider.children.length - 2);
  483.                                             showSlide(_slideIndex);
  484.                                         }
  485.                                         // Set interval for automatic sliding (optional)
  486.                                         // setInterval(nextSlide, 3000); // Change slide every 3 seconds
  487.                                         // You can also use buttons or other events to trigger next/previous slides
  488.                                         // For example, you can use buttons like:
  489.                                         console.log('AAA');
  490.                                         document.getElementById('nextButton').addEventListener('click', nextSlide);
  491.                                         document.getElementById('prevButton').addEventListener('click', prevSlide);
  492.                                     </script>
  493.                                     {# experts go here #}
  494.                                     {% set config = config('S360Experts.config') %}
  495.                                     {% if config.showOnDetail and page.product.hasExtension('s360_experts') %}
  496.                                     {# same template can be used for category and detail page #}
  497.                                         {% sw_include '@Storefront/solution360/s360experts/product-detail.html.twig' %}
  498.                                     {% endif %}
  499.                                     {# {% sw_include "@Storefront/storefront/element/cms-element-image-slider-s360.html.twig" with {
  500.                                         element: {
  501.                                             'config': {
  502.                                                 'sliderItems': {
  503.                                                     value: ["https://picsum.photos/200/300","https://picsum.photos/200/300"]
  504.                                                 }
  505.                                             },
  506.                                         }
  507.                                     } only %} #}
  508.                                                 
  509.                                 </div>
  510.                                 {# SD-5192: client wanted it this way #}
  511.                                 <div class="col-lg-12 product-detail-tabs__cross-selling interest">
  512.                                         {# clerk plugin has to be copied here, parent cannot be used because crossselling appears elsewhere on page #}
  513.                                         {% if config('Clerkio.config.productRecommendationsEnabled') == 'true' %}
  514.                                             {% set contents = config('Clerkio.config.productRecommendationsContent') | split(',') %}
  515.                                             <span class="clerk" data-template="@{{ contents[1] | replace({' ': ''}) }}" data-products='["{{ page.product.parentId ? page.product.parentId|upper : page.product.id|upper }}"]'></span>
  516.                                         {% endif %}
  517.                                 </div>
  518.                                 {% if isMobile %}
  519.                                     <div class="col-12 col-lg-7 product-detail-tabs__wrapper">
  520.                                         <div class="product-detail-tabs product-detail-tabs--mobile">
  521.                                             {% sw_include '@Storefront/storefront/page/product-detail/tabs-mobile.html.twig' %}
  522.                                         </div>
  523.                                     </div>
  524.                                     <div class="col-12 product-detail-tabs__cross-selling">
  525.                                         {# moved from bottom where now clerk crossselling will appear #}
  526.                                         {% if page.crossSellings|length > 0 and page.crossSellings|first.total > 0 %}
  527.                                                 <div class="product-detail-tabs {% if isMobile %}product-detail-tabs--mobile{% endif %}">
  528.                                                     {% if isMobile %}
  529.                                                         {% sw_include '@Storefront/storefront/page/product-detail/cross-selling/tabs-mobile.html.twig' with { crossSellings: page.crossSellings
  530.                                                         } %}
  531.                                                     {% else %}
  532.                                                         {% sw_include '@Storefront/storefront/page/product-detail/cross-selling/tabs.html.twig' with {
  533.                                                             crossSellings: page.crossSellings
  534.                                                         } %}
  535.                                                     {% endif %}
  536.                                                 </div>
  537.                                         {% endif %}
  538.                                     </div>
  539.                                 {% endif %}
  540.                             {% endblock %}
  541.                         </div>
  542.                     </div>
  543.                 {% endblock %}
  544.                 {% block page_product_detail_tabs %}
  545.                 {% endblock %}
  546.             {% endblock %}
  547.         </div>
  548.     {% endblock %}
  549.     {# SD-5577 / if Klaviyo plugin is active, manually copied content due to
  550.     inheritance issues for this plugin #}
  551.     {% if page.hasExtension('klaviyoIntegrationPluginExtension') %}
  552.         {% set extensionData =  page.getExtension('klaviyoIntegrationPluginExtension') %}
  553.         {% set klaviyoComponentOptions = {
  554.                 'productInfo': extensionData.productInfo
  555.             }
  556.         %}
  557.         <div style="display: none;" data-klaviyo-product-viewed-event-tracking-component=""
  558.             data-klaviyo-product-viewed-event-tracking-component-options="{{ klaviyoComponentOptions|json_encode }}"></div>
  559.     {% endif %}
  560. {% endblock %}