src/Trinity/WebshopBundle/Resources/views/front/product.html.twig line 1

Open in your IDE?
  1. {% extends ['@TrinityWebshop/shop_wrapper.html.twig'] %}
  2. {% trans_default_domain 'webshop' %}
  3. {% block ogmetatags %}
  4.     {% set currentUrl = host ~ '/' ~ Category.uri ~ '/' ~ Product.slug %}
  5.     {% set ogmetatitle = customTitle is defined and customTitle is not empty ? customTitle : '' %}
  6.     {% if ogmetatitle is empty %}
  7.         {% set ogmetatitle = Page.getTitle | raw %}
  8.     {% endif %}
  9.     <meta property="og:title" content="{{ ogmetatitle }}" />
  10.     {% if Settings.label is not empty %}
  11.         <meta property="og:site_name" content="{{ Settings.label }}" />
  12.     {% endif %}
  13.     {% if Product.seoDescription is not empty %}
  14.         <meta property="og:description" content="{{ Product.seoDescription }}" />
  15.     {% else %}
  16.         <meta property="og:description" content="{{ Product.label }}" />
  17.     {% endif %}
  18.     <meta property="og:type" content="website" />
  19.     {# article, book, profile, website #}
  20.     <meta property="og:url" content="{{ currentUrl }}" />
  21.     {% if Product.media.count %}
  22.         {% if Product.media.first.hasRemoteUrl is defined and Product.media.first.hasRemoteUrl() %}
  23.             <meta property="og:image" content="{{ 'https:/' ~ asset(Product.media.first.getWebPath('medium')) }}" />
  24.         {% else %}
  25.             <meta property="og:image" content="{{ host ~ asset(Product.media.first.getWebPath('medium')) }}" />
  26.         {% endif %}
  27.     {% endif %}
  28.     {% if app.environment != 'dev' %}
  29.         <script type="application/ld+json">
  30.             {
  31.                 "@context": "https://schema.org/",
  32.                 "@type": "Product",
  33.                 "name": "{{ ogmetatitle }}",
  34.                 {% if Product.seoDescription is not empty %}
  35.                     "description": "{{Product.seoDescription}}",
  36.                 {% elseif Product.description is not empty %}
  37.                     "description": "{{ Product.description }}",
  38.                 {% elseif Product.intro is not empty %}
  39.                     "description": "{{ Product.intro }}",
  40.                 {% elseif Product.label is not empty %}
  41.                     "description": "{{ Product.label }}",
  42.                 {% endif %}
  43.                 {% if Product.media.count %}
  44.                     "image": [
  45.                         {% for i, M in Product.media %}
  46.                             {% if M.hasRemoteUrl is defined and M.hasRemoteUrl() %}
  47.                                 "{{'https:' ~ path('homepage') ~ M.webPath()}}"{{i < (Product.media.count - 1) ? ',' : ''}}
  48.                             {% else %}
  49.                                 "{{host ~ path('homepage') ~ M.webPath()}}"{{i < (Product.media.count - 1) ? ',' : ''}}
  50.                             {% endif %}
  51.                         {% endfor %}
  52.                     ],
  53.                 {% endif %}
  54.                 "sku": "{{ Product.sku }}",
  55.                 "mpn": "{{ Product.number }}",
  56.                 {% if total_rating.total > 0 %}
  57.                     "aggregateRating": {
  58.                         "@type": "AggregateRating",
  59.                         "ratingValue": "{{total_rating.avg}}",
  60.                         "reviewCount": "{{total_rating.total}}"
  61.                     },
  62.                 {% endif %}
  63.                 "offers": {
  64.                     "@type": "Offer",
  65.                     "url": "{{currentUrl}}",
  66.                     "priceCurrency": {% if WebshopSettings.currency is not empty %}"{{ WebshopSettings.currency.key }}"{% else %}"EUR"{% endif %},
  67.                     "price": "{{Product.getDisplayPriceFloat(WebshopSettings, WebshopCustomer, app.user, true)|number_format(2, '.', '')}}",
  68.                     "priceValidUntil": "{{"now"|date_modify("+7 day")|date("Y-m-d")}}",
  69.                     "itemCondition": "https://schema.org/NewCondition",
  70.                     "availability": "{% if Product.canOrder and Product.stockAmount < sl.medium and Product.stock %}https://schema.org/LimitedAvailability{% elseif Product.canOrder %}https://schema.org/InStock{% else %}https://schema.org/SoldOut{% endif %}"
  71.                 }
  72.             }
  73.         </script>
  74.     {% endif %}
  75.     {% if canonical_url is not empty %}
  76.         <link rel="canonical" href="{{ host ~ '/' ~ canonical_url}}" />
  77.     {% endif %}
  78. {% endblock %}
  79. {% block shop_header %}
  80.     <link rel="preload" href="/bundles/cms/featherlight/release/featherlight.min.css" type="text/css" as="style" onload="this.onload=null;this.rel='stylesheet';" />
  81.     <script defer src="/bundles/trinitywebshop/bootstrap-notify-3.1.3/bootstrap-notify.min.js" type="text/javascript" charset="utf-8"></script>
  82.     <script defer src="/bundles/cms/featherlight/release/featherlight.min.js" type="text/javascript" charset="utf-8"></script>
  83.     <script defer src="/bundles/trinitywebshop/js/jquery.ez-plus.min.js"></script>
  84.     {% if overridekey is defined and overridekey is not empty and file_exists('custom/webshop/' ~ overridekey ~ '/js/product.js') %}
  85.         <script defer type="text/javascript" src="{{'/custom/webshop/' ~ overridekey ~ '/js/product.js'}}"></script>
  86.     {% elseif file_exists('custom/webshop/js/product.js') %}
  87.         <script defer type="text/javascript" src="{{'/custom/webshop/js/product.js'}}"></script>
  88.     {% else %}
  89.         <script defer type="text/javascript" src="{{'/bundles/trinitywebshop/js/product.js'}}?t={{'now'|date('YmdH')}}"></script>
  90.     {% endif %}
  91.     {% if overridekey is defined and overridekey is not empty and file_exists('custom/webshop/' ~ overridekey ~ '/js/product_configurable.js') %}
  92.         <script defer type="text/javascript" src="{{'/custom/webshop/' ~ overridekey ~ '/js/product_configurable.js'}}"></script>
  93.     {% elseif file_exists('custom/webshop/js/product_configurable.js') %}
  94.         <script defer type="text/javascript" src="{{'/custom/webshop/js/product_configurable.js'}}"></script>
  95.     {% else %}
  96.         <script defer type="text/javascript" src="{{'/bundles/trinitywebshop/js/product_configurable.js'}}?t={{'now'|date('YmdH')}}"></script>
  97.     {% endif %}
  98. {% endblock %}
  99. {% block pagestyle %}
  100.     {% if overridekey is not defined or overridekey is empty %}
  101.         {% set overridekey = '' %}
  102.     {% else %}
  103.         {% set overridekey = overridekey ~ '/' %}
  104.     {% endif %}
  105.     <style>
  106.         {% include 'override/' ~ overridekey ~ 'webshop/product-critical.html.twig' ignore missing %}
  107.     </style>
  108. {% endblock %}
  109. {% block shop_body %}
  110.     {% if Settings.facebookpixel is not empty %}
  111.         <script>
  112.             fbq(
  113.                 'track', 'ViewContent', {
  114.                     content_type: 'product',
  115.                     content_ids: ['{{Product.sku}}'],
  116.                     content_name: '{{(Product.Brand ? Product.Brand.label ~ ' ' : '') ~ Product.label}}',
  117.                     content_category: '{{Product.category.first.category.label}}',
  118.                     value: {{Product.getRealPriceIncl(null, false, false, WebshopCustomer)}},
  119.                     currency: 'EUR'
  120.                 }
  121.             );
  122.         </script>
  123.     {% endif %}
  124.     <script>
  125.         var slickSettingsOne = {
  126.             slidesToShow: 1,
  127.             slidesToScroll: 1,
  128.             arrows: true,
  129.             // fade: true,
  130.             asNavFor: '.slider-nav'
  131.         };
  132.         var slickSettingsTwo = {
  133.             slidesToShow: 4,
  134.             slidesToScroll: 1,
  135.             asNavFor: '.slider-for',
  136.             dots: false,
  137.             arrows: false,
  138.             // centerMode: true,
  139.             focusOnSelect: true
  140.         };
  141.     </script>
  142.     <script>
  143.         var zoomOptions = {
  144.             zoomType: 'lens',
  145.             lensShape: 'round',
  146.             lensSize: 250
  147.         };
  148.     </script>
  149.     <input type="hidden" id="current-amount" name="current-amount" />
  150.     {% set currentUri = path('homepage') ~ Category.uri ~ '/' ~ Product.slug %}
  151.     {% set currentUrl = url('homepage') ~ Category.uri ~ '/' ~ Product.slug %}
  152.     {% if Settings.overridekey is defined and Settings.overridekey is not empty %}
  153.         {% set overridekey = Settings.overridekey %}
  154.     {% endif %}
  155.     {% if Product.templateKey is defined and Product.templateKey is not empty %}
  156.         {% set customTemplate = Product.templateKey %}
  157.     {% endif %}
  158.     {% if customTemplate is defined and customTemplate is not empty and file_exists('../templates/override/webshop/layouts/product/' ~ customTemplate) %}
  159.         {% include 'override/webshop/layouts/product/' ~ customTemplate %}
  160.     {% elseif overridekey is defined and overridekey is not empty and file_exists('../templates/override/' ~ overridekey ~ '/webshop/product.html.twig') %}
  161.         {% include 'override/' ~ overridekey ~ '/webshop/product.html.twig' %}
  162.     {% elseif file_exists('../templates/override/webshop/product.html.twig') %}
  163.         {% include 'override/webshop/product.html.twig' %}
  164.     {% else %}
  165.     <script>
  166.         var productGalleryThumbs;
  167.         var productGalleryTop;
  168.         var lg;
  169.     </script>
  170.     {% if Settings.baseuri is empty %}
  171.         {% set site_baseuri = '' %}
  172.     {% else %}
  173.         {% set site_baseuri = Settings.baseuri | replace({'/': ''}) ~ '/' %}
  174.     {% endif %}
  175.     {% set childProductSale = false %}
  176.     {% if OriginalProduct.linkedProducts.count > 0 %}
  177.         {% for CP in OriginalProduct.linkedProducts %}
  178.             {% if CP.hasPromotion or (CP.priceSale is not empty and CP.priceSale > 0) %}
  179.                 {% set childProductSale = true %}
  180.             {% endif %}
  181.         {% endfor %}
  182.     {% endif %}
  183.     {% set productUrl = (WebshopSettings is defined and WebshopSettings.uri ? url('homepage') ~ WebshopSettings.uri : url('homepage') ~ site_baseuri ) ~ (Category.category is defined ? Category.category.uri : Category.uri) ~ '/' ~ (OriginalProduct is defined ? OriginalProduct.slug : Product.slug) %}
  184.     <div class="webshop product-type-{{Product.type}}">
  185.         <div class="compare-popup" style="display:none;">
  186.             <div class="popup-title">
  187.                 {{ 'Vergelijk producten' | trans({}, 'webshop', app.request.locale) | raw }}
  188.                 <i class="fa fa-angle-down"></i>
  189.             </div>
  190.             <div id="compare-bar">
  191.                 <div id="compare-products"></div>
  192.                 <div id="compare-btns">
  193.                     <a href="javascript:compareNow();" class="btn btn-primary">{{ 'Vergelijken' | trans({}, 'webshop', app.request.locale) | raw }}</a>
  194.                     <a href="javascript:compareClear();" class="btn btn-blank">
  195.                         {# {{ 'Wissen' | trans({}, 'webshop', app.request.locale) | raw }} #}
  196.                         <i class="fa fa-trash-alt"></i>
  197.                     </a>
  198.                 </div>
  199.             </div>
  200.         </div>
  201.         <section class="{{Product.slug}} catalog-product-view" id="product-{{Product.slug}}" style="position: relative;">
  202.             <input type="hidden" id="product_type" value="{{Product.type}}"/>
  203.             <div class="container">
  204.             <div class="breadcrumbs-bar">
  205.             <div class="d-flex align-items-center justify-content-between">
  206.             {{ wo_render_breadcrumbs() }}
  207.             <div class="back-btn d-lg-none">
  208.             <a href="javascript:history.back()"><i class="fa fa-arrow-left"></i> {{ 'Terug'|trans({}, 'webshop', app.request.locale) }}</a>
  209.             </div>
  210.             <div class="page-tools">
  211.             <a href="#" class="add-to-list d-none" data-id="{{Product.id}}" title="Toevoegen aan favorieten"><i class="{{isLinked ? 'fa' : 'far'}} fa-heart"></i></a>
  212.             {# <a href="#" onclick="return compareProduct(this);" data-id="{{Product.id}}" data-label="{{(Product.Brand ? Product.Brand.label ~ ' ' : '') ~ Product.label}}" data-image="{{Product.media.count ? '/' ~ Product.media.first.webPath : ''}}" title="Product vergelijken">
  213.             <i class="fa fa-random"></i>
  214.             {{'Vergelijken'|trans({}, 'webshop', app.request.locale)}}
  215.             </a> #}
  216.             {# <a href="javascript:window.print();" title="Pagina afdrukken">
  217.             <i class="fa fa-print"></i>
  218.             </a> #}
  219.             <div class="dropdown" title="Pagina delen">
  220.             <div class="dropdown-toggle" type="button" id="share-dropdown" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  221.             <i class="fa fa-share-alt"></i>
  222.             </div>
  223.             <div class="dropdown-menu" aria-labelledby="share-dropdown">
  224.             {% include '@TrinityWebshop/front/share.html.twig' %}
  225.             </div>
  226.             </div>
  227.             </div>
  228.             </div>
  229.             </div>
  230.             <div class="pd-top-wrapper-mobile"></div>
  231.             <div class="row">
  232.             <div class="col-12 col-md-12">
  233.             <div class="row">
  234.             <div class="col-12 col-md-6 col-lg-7 image">
  235.             <div id="pd-media">
  236.             <div class="badge-wrapper">
  237.             {% if (OriginalProduct.hasPromotion or (OriginalProduct.priceSale is not empty and OriginalProduct.priceSale > 0)) or childProductSale %}
  238.             <span class="sale-badge">{{'Sale'|trans({}, 'webshop', app.request.locale)}}</span>
  239.             {% endif %}
  240.             {% if OriginalProduct.exclusive %}
  241.             <span class="exclusive-badge">{{'Exclusief'|trans({}, 'webshop', app.request.locale)}}</span>
  242.             {% endif %}
  243.             {% if Product.hasCombi() %}
  244.             <span class="combi-badge">{{'Combideal!'|trans({}, 'webshop', app.request.locale)}}</span>
  245.             {% endif %}
  246.             {% if OriginalProduct.new and OriginalProduct.newFrom <= date() and (OriginalProduct.newTill >= date() or OriginalProduct.newTill is empty) %}
  247.             <span class="new-badge">{{'Nieuw'|trans({}, 'webshop', app.request.locale)}}</span>
  248.             {% endif %}
  249.             </div>
  250.             {% set media = Product.media %}
  251.             {% if (OriginalProduct.type == 1 or OriginalProduct.type == 2) and media.count < 1 %}
  252.             {% set media = OriginalProduct.media %}
  253.             {% endif %}
  254.             {# {% if media.count %} #}
  255.             <div id="product-image-wrapper">
  256.             <div id="product-image">
  257.             <div class="swiper-container product-swiper">
  258.             <!-- Additional required wrapper -->
  259.             <div class="swiper-wrapper" id="product-gallery">
  260.             <!-- Slides -->
  261.             {% if media.count %}
  262.             {% for i, m in media %}
  263.             {% set size = ( m.width > m.height ? m.height : m.width ) %}
  264.             <div class="swiper-slide">
  265.             <a href="/{{m.getWebPath()}}" id="slide-{{i}}">
  266.             <div class="lcp">
  267.             {% if m is not empty %}
  268.             {% if m.hasBlurred %}
  269.             <picture>
  270.             {% if m.hasWebp() %}
  271.             <source srcset="/{{m.getBlurredWebpPath('medium')}}" type="image/webp">
  272.             {% endif %}
  273.             <source srcset="/{{m.getBlurredWebPath('medium')}}" type="{{m.mime}}">
  274.             <img class="lq" alt="{{m.description_alt}}" src="/{{m.getBlurredWebPath('medium')}}" type="{{m.mime}}" loading="eager" width="{{m.width}}" height="{{m.height}}">
  275.             </picture>
  276.             {% endif %}
  277.             <picture>
  278.             {% if m.hasWebp() %}
  279.             <source srcset="/{{m.getWebpPath('large')}}" type="image/webp">
  280.             {% endif %}
  281.             <source srcset="/{{m.getWebPath('large')}}" type="{{ m.mime }}">
  282.             <img class="hq" alt="{{m.description_alt}}" src="/{{m.getWebPath('large')}}" type="{{m.mime}}" loading="eager" width="{{m.width}}" height="{{m.height}}" onload="this.style.opacity=1{% if m.hasBlurred %};this.closest('.lcp').getElementsByClassName('lq')[0].style.opacity=0;{% endif %}" style="opacity: 0;">
  283.             </picture>
  284.             {% endif %}
  285.             </div>
  286.             </a>
  287.             </div>
  288.             {% endfor %}
  289.             {% else %}
  290.             <img src="{{(WebshopSettings.getDefaultProductImage is not empty ? WebshopSettings.getDefaultProductImage : '/bundles/trinitywebshop/img/no-product-image.png')}}" alt="">
  291.             {% endif %}
  292.             </div>
  293.             <div class="swiper-pagination"></div>
  294.             <div class="swiper-button-prev"></div>
  295.             <div class="swiper-button-next"></div>
  296.             </div>
  297.             <div class="swiper-container product-swiper-thumbs">
  298.             <!-- Additional required wrapper -->
  299.             <div class="swiper-wrapper" id="product-thumbs">
  300.             <!-- Slides -->
  301.             {% for i, m in media %}
  302.             {% set size = (
  303.             m.width > m.height
  304.             ? m.height
  305.             : m.width
  306.             ) %}
  307.             <div class="swiper-slide" id="thumb-{{i}}">
  308.             <div class="slide-wrapper">
  309.             <div class="lcp">
  310.             {% if m is not empty %}
  311.             {% if m.hasBlurred %}
  312.             <picture>
  313.             {% if m.hasWebp() %}
  314.             <source srcset="/{{m.getBlurredWebpPath('thumb')}}" type="image/webp">
  315.             {% endif %}
  316.             <source srcset="/{{m.getBlurredWebPath('thumb')}}" type="{{m.mime}}">
  317.             <img class="lq" alt="{{m.description_alt}}" src="/{{m.getBlurredWebPath('thumb')}}" type="{{m.mime}}" loading="eager" width="{{m.width}}" height="{{m.height}}">
  318.             </picture>
  319.             {% endif %}
  320.             <picture>
  321.             {% if m.hasWebp() %}
  322.             <source srcset="/{{m.getWebpPath('thumb')}}" type="image/webp">
  323.             {% endif %}
  324.             <source srcset="/{{m.getWebPath('thumb')}}" type="{{ m.mime }}">
  325.             <img class="hq" alt="{{m.description_alt}}" src="/{{m.getWebPath('thumb')}}" type="{{m.mime}}" loading="lazy" width="{{m.width}}" height="{{m.height}}">
  326.             </picture>
  327.             {% endif %}
  328.             </div>
  329.             </div>
  330.             </div>
  331.             {% endfor %}
  332.             </div>
  333.             {% if WebshopSettings.thumbLimit > 0 and media|length > WebshopSettings.thumbLimit %}
  334.             <div class="swiper-more">
  335.             <div class="slide-wrapper">
  336.             <span>
  337.             +{{media|length - (WebshopSettings.thumbLimit - 1)}}
  338.             </span>
  339.             </div>
  340.             </div>
  341.             {% endif %}
  342.             </div>
  343.             </div>
  344.             </div>
  345.             {# {% else %} #}
  346.             {# <img src="{{(WebshopSettings.getDefaultProductImage is not empty ? WebshopSettings.getDefaultProductImage : '/bundles/trinitywebshop/img/no-product-image.png')}}" alt=""> #}
  347.             {# {% endif %} #}
  348.             </div>
  349.             </div>
  350.             <div class="col-sm-12 col-md-6 col-lg-5 sidebar-productinfo">
  351.             {% if WebshopSettings.custom5 %}
  352.             <div class="custom-block">
  353.             {{WebshopSettings.custom5|raw}}
  354.             </div>
  355.             {% endif %}
  356.             <div class="cards-wrapper">
  357.             <div class="sidebar-loading">
  358.             <i class="fas fa-circle-notch fa-2x fa-spin"></i>
  359.             </div>
  360.             <div class="pd-top-wrapper-desktop">
  361.             <div class="pd-top-wrapper">
  362.             <h1 class="pd-label" id="pd-label">{{(Product.Brand ? Product.Brand.label ~ ' ' : '') ~ Product.label}}</h1>
  363.             {% if Product.labelsub is not empty %}<h4 class="pd-labelsub opacity-50" id="pd-labelsub">{{ Product.labelsub }}</h4>{% endif %}
  364.             {% if Product.giftcard %}
  365.             <span class="pd-giftcard giftcard-value">{{'Waarde:'|trans({}, 'webshop', app.request.locale)}}
  366.             {{Product.giftcard.amount|format_currency('EUR')}}</span>
  367.             {% endif %}
  368.             {% set reviewScore = OriginalProduct.getScore() %}
  369.             {% if reviewScore is not empty and reviewScore > 0 and WebshopSettings.enablereviews and WebshopSettings.averagerev %}
  370.             {% if Product.type == 2 %}
  371.             {% else %}
  372.             <div class="reviews-total">
  373.             <div class="averge-reviews d-flex">
  374.             <a href='#reviews'>
  375.             {# <a onclick="if($("#reviews-tab").length > 0){$("#reviews-tab").trigger("click");$([document.documentElement, document.body]).animate({ scrollTop: $("#reviews-tab").offset().top - 150 }, 200);}else{$([document.documentElement, document.body]).animate({ scrollTop: $("#reviews").offset().top - 150 }, 200);}"></a> #}
  376.             {% set reviewScore = total_rating.avg %}
  377.             <div class="review-content">
  378.             <div class="review-rating">
  379.             {% set half_marked = null %}
  380.             {% for r in range( 0.5, 5, 0.5 ) %}
  381.             {% if r matches '/^\\d+$/' %}
  382.             {# full #}
  383.             {% if r <= ( reviewScore ) %}
  384.             {% if half_marked %}
  385.             {% else %}
  386.             <i class="fas fa-fw fa-star on"></i>
  387.             {% endif %}
  388.             {% else %}
  389.             {# SOLID / ACTIVE #}
  390.             {% if half_marked %}
  391.             {% else %}
  392.             <i class="far fa-fw fa-star"></i>
  393.             {% endif %}
  394.             {% endif %}
  395.             {% set half_marked = false %}
  396.             {% else %}
  397.             {# half #}
  398.             {% if ( reviewScore ) > r or( reviewScore ) < r %}
  399.             {% else %}
  400.             <i class="fas fa-fw fa-star-half-alt on"></i>
  401.             {% set half_marked = true %}
  402.             {% endif %}
  403.             {% endif %}
  404.             {# <span data-rating="{{r - 1}}" class="star {{r matches '/^\\d+$/' ? "full" : "half"}} {{r <= (Review.rating) ? 'on' : ''}}"></span> #}
  405.             {% endfor %}
  406.             ({{total_rating.total}})
  407.             </div>
  408.             </div>
  409.             <div class="total-count">
  410.             ({{total_rating.total}})
  411.             </div>
  412.             </a>
  413.             </div>
  414.             </div>
  415.             {% endif %}
  416.             {% endif %}
  417.             </div>
  418.             </div>
  419.             <div class="card price-info" id="producten">
  420.             <div id="pd-price-block">
  421.             {% set show_price = true %}
  422.             {% if WebshopSettings is defined %}
  423.             {% if WebshopSettings.getB2b and WebshopSettings.hidePricesGuest %}
  424.             {% set show_price = false %}
  425.             {% endif %}
  426.             {% endif %}
  427.             {% if show_price %}
  428.             {{Product.displayPrice(WebshopSettings, WebshopCustomer, app.user, true)|trans_replace('webshop', language)|raw}}
  429.             {% endif %}
  430.             {% if WebshopSettings.hasLeasePrice %}
  431.             {{Product.displayLeasePrice(WebshopSettings, WebshopCustomer, app.user)|trans_replace('webshop', language)|raw}}                        
  432.             {% endif %}
  433.             {% if Product.bulk and Product.bulkOptions is not empty and Product.bulkOptions.amount is defined %}
  434.             <div class="bulk-discount alert alert-info my-3">
  435.             <h5>{{'Stapelkorting'|trans({}, 'webshop', app.request.locale)}}</h5>
  436.             {% for key, amount in Product.bulkOptions.amount %}
  437.             {% set price = Product.bulkOptions.price[key] %}
  438.             <div class="bulk-option">
  439.             <span class="bulk-option-amount">{{'Koop'|trans({}, 'webshop', app.request.locale)}}
  440.             {{amount}}
  441.             {{'voor'|trans({}, 'webshop', app.request.locale)}}</span>
  442.             <span class="bulk-option-price">
  443.             <strong>{{WebshopSettings.currency.format(price)|raw}}</strong>
  444.             {{'per stuk'|trans({}, 'webshop', app.request.locale)}}</span>
  445.             </div>
  446.             {% endfor %}
  447.             </div>
  448.             {% endif %}
  449.             {% if WebshopSettings.showStockIndicator and Product.type != 2 %}
  450.             {% set sl = WebshopSettings.stockLevels %}
  451.             <div class="stock-label">
  452.             {% if Product.canOrder and Product.stockAmount < sl.low and Product.stock %}
  453.             <div class="text-warning">
  454.             <i class="fa fa-circle"></i>
  455.             {{'Zeer beperkt op voorraad'|trans({}, 'webshop', app.request.locale)}}
  456.             </div>
  457.             {% elseif Product.canOrder and Product.stockAmount < sl.medium and Product.stock %}
  458.             <div class="text-warning">
  459.             <i class="fa fa-check"></i>
  460.             {{'Beperkt op voorraad'|trans({}, 'webshop', app.request.locale)}}
  461.             </div>
  462.             {% elseif Product.canOrder %}
  463.             <div class="text-success">
  464.             <i class="fa fa-check"></i>
  465.             {{'Op voorraad'|trans({}, 'webshop', app.request.locale)}}
  466.             </div>
  467.             {% endif %}
  468.             </div>
  469.             {% endif %}
  470.             </div>
  471.             <div class="base-info">
  472.             {# CONFIGURABLE OPTIONS #}
  473.             {% include "@TrinityWebshop/front/product/configurable-options.html.twig" %}
  474.             {% if selectSpecs is not empty %}
  475.             <form id="extra_specs">
  476.             <table class="table">
  477.             {% for data in selectSpecs %}
  478.             {% if not data.Spec.hideproductdetail %}
  479.             <tr>
  480.             <td>{{data.Spec.label}}:</td>
  481.             <td class="td-field">
  482.             <select class="form-select" name="selectSpecs[{{data.Spec.label}}]" style="outline:none;">
  483.             {% for value in data.values %}
  484.             <option value="{{value.id}}">{{value.value}}</option>}
  485.             {% endfor %}
  486.             </select>
  487.             </td>
  488.             </tr>
  489.             {% endif %}
  490.             {% endfor %}
  491.             </table>
  492.             </form>
  493.             {% endif %}
  494.             {% if Product.super.count > 0 %}
  495.             {# SUPER, FURTHER BELOW #}
  496.             {% else %}
  497.             {% if Product.type == 2 %}
  498.             {# GROUPED #}
  499.             <div class="grouped-choices">
  500.             {% if Product.linkedProducts.count %}
  501.             <table class="mt-2">
  502.             {% set productStock = 9999999 %}
  503.             {% for p in Product.getLinkedProductsSorted %}
  504.             {% if p.enabled %}
  505.             {% if p.canorder and p.stock and p.stockamount < productStock %}
  506.             {% set productStock = p.stockamount %}
  507.             {% endif %}
  508.             <tr>
  509.             <td class="thumb-container">
  510.             <div class="thumb">
  511.             <div class="thumb-wrapper">
  512.             <img src="/{{p.media.first.getWebPath('thumb')}}" alt="">
  513.             </div>
  514.             </div>
  515.             </td>
  516.             <td>
  517.             <div class="label-counter py-3 py-xl-0">
  518.             <div class="label-wrapper">
  519.             <span>{{p.label}}</span>
  520.             <div class="price">
  521.             {% if p.priceSale > 0 %}
  522.             <span class="old_price" style="font-weight: normal;text-decoration: line-through;color: #bbb;">{{WebshopSettings.Currency.format(p.getPriceIncl)|raw}}</span>
  523.             {% endif %}
  524.             {{WebshopSettings.Currency.format(p.realPriceIncl(null, false, false, WebshopCustomer))|raw}}
  525.             </div>
  526.             {% if WebshopSettings.showStockIndicator %}
  527.             {% set sl = WebshopSettings.stockLevels %}
  528.             <div class="stock-label">
  529.             {% if p.canOrder and p.stockAmount < sl.low and p.stock %}
  530.             <div class="text-warning">
  531.             <i class="fa fa-circle"></i>
  532.             {{'Zeer beperkt op voorraad'|trans({}, 'webshop', app.request.locale)}}
  533.             </div>
  534.             {% elseif p.canOrder and p.stockAmount < sl.medium and p.stock %}
  535.             <div class="text-warning">
  536.             <i class="fa fa-check"></i>
  537.             {{'Beperkt op voorraad'|trans({}, 'webshop', app.request.locale)}}
  538.             </div>
  539.             {% elseif p.canOrder %}
  540.             <div class="text-success">
  541.             <i class="fa fa-check"></i>
  542.             {{'Op voorraad'|trans({}, 'webshop', app.request.locale)}}
  543.             </div>
  544.             {% endif %}
  545.             </div>
  546.             {% endif %}
  547.             </div>
  548.             <div class="product-cart-counter-wrapper">
  549.             <div class="product-cart-counter">
  550.             {% set required = false %}
  551.             {% if OriginalProduct.groupedRequired is not empty %}
  552.             {% if p.id in OriginalProduct.groupedRequired %}
  553.             {% set required = true %}
  554.             {% endif %}
  555.             {% endif %}
  556.             <button type="button" onclick="
  557.             if(((0+$('#g-amount-{{p.id}}').val()) - 1) < 1){
  558.             $('#g-amount-{{p.id}}').val('{{required ? '1' : ''}}');
  559.             }else{
  560.             $('#g-amount-{{p.id}}').val((0+$('#g-amount-{{p.id}}').val()) - 1);
  561.             }" class="btn">
  562.             <i class="fa fa-fw fa-minus"></i>
  563.             </button>
  564.             <input class="grouped_product" name="grouped[{{p.id}}]" data-id="{{p.id}}" value="{{required ? '1' : ''}}" id="g-amount-{{p.id}}" placeholder="0" type="text" />
  565.             <button type="button" onclick="$('#g-amount-{{p.id}}').val((1*$('#g-amount-{{p.id}}').val()) + 1);" class="btn">
  566.             <i class="fa fa-fw fa-plus"></i>
  567.             </button>
  568.             </div>
  569.             </div>
  570.             </div>
  571.             </td>
  572.             </tr>
  573.             {% endif %}
  574.             {% endfor %}
  575.             </table>
  576.             {% else %}
  577.             <p>
  578.             {{'Er zijn geen gekoppelde producten.'|trans({}, 'webshop', app.request.locale)}}
  579.             </p>
  580.             {% endif %}
  581.             </div>
  582.             {% endif %}
  583.             {% endif %}
  584.             {% if Product.type == 2 %}
  585.             <div class="goto-button-wrapper d-md-none">
  586.             <a href="#producten" class="btn btn-block order"><i class="far fa-eye"></i> {{'Bekijk producten'|trans({}, 'webshop', app.request.locale)}}</a>
  587.             </div>
  588.             {% endif %}
  589.             {% if Product.extras is not empty %}
  590.             <form id="extra_options">
  591.             <table class="table">
  592.             {% for label,data in Product.extras %}
  593.             {% set extraId = loop.index0 %}
  594.             <tr class="extra-option">
  595.             <input type="hidden" class="form-control mb-1" id="extra_price_{{Product.id ~ '_' ~ loop.index0}}" name="extras[{{label}}][price]" value="{{data.price}}" />
  596.             {% if data.type == 'input' %}
  597.             <td>
  598.             <div class="label">
  599.             {{label}}
  600.             </div>
  601.             <span class="price">+ &euro; {{data.price|number_format(2, ',', '.')}}</span>
  602.             </td>
  603.             <td><input type="text" class="form-control" name="extras[{{label}}][value]" /></td>
  604.             {% elseif data.type == 'checkbox' %}
  605.             <td><label>{{label}}</label></td>
  606.             <td>
  607.             {% for opt in data.options %}
  608.             <div class="form-check">
  609.             <input class="form-check-input extra_checkbox_{{Product.id}}" id="flexCheckDefault{{opt.label}}" type="checkbox" name="extras[{{label}}][value][]" value="{{opt.label}}" onchange="onExtraChangeCheckbox(this, {{Product.id}}, {{extraId}})" data-price="{{opt.price}}" data-label="{{label}}" data-sublabel="{{opt.label}}"/>
  610.             <label class="form-check-label" for="flexCheckDefault{{opt.label}}">{{opt.label}}<span class="price">+ &euro; {{opt.price|number_format(2, ',', '.')}}</span></label>
  611.             </div>
  612.             {% endfor %}
  613.             </td>
  614.             {% elseif data.type == 'select' %}
  615.             <td><div>{{label}}<span class="price"></span></div></td>
  616.             <td>
  617.             <select class="form-select" required name="extras[{{label}}][value]" onchange="onExtraChangeSelect(this, {{Product.id}}, {{extraId}});">
  618.             <option value="">{{ 'Selecteer een optie' | trans({}, 'webshop', app.request.locale) }}</option>
  619.             {% for opt in data.options %}
  620.             <option value="{{opt.label}}" data-price="{{opt.price}}">{{opt.label}} + &euro; {{opt.price|number_format(2, ',', '.')}}</option>
  621.             {% endfor %}
  622.             </select>
  623.             </td>
  624.             {% elseif data.type == 'radio' %}
  625.             <td>
  626.             <div>{{label}}<span class="price"></span></div>
  627.             </td>
  628.             <td>
  629.             {% for ind, opt in data.options %}
  630.             <div class="form-check">
  631.             <input class="form-check-input extra_radio_{{Product.id}}" type="radio" id="flexRadioDefault{{label ~ '-' ~ ind}}" name="extras[{{label}}][value]" value="{{opt.label}}" data-price="{{opt.price}}" onchange="onExtraChangeRadio(this, {{Product.id}}, {{extraId}});">
  632.             <label class="form-check-label" for="flexRadioDefault{{label ~ '-' ~ ind}}">
  633.             {{opt.label}}
  634.             <span class="price">+ &euro; {{opt.price|number_format(2, ',', '.')}}</span>
  635.             </label>
  636.             </div>
  637.             {% endfor %}
  638.             </td>
  639.             {% endif %}
  640.             </tr>
  641.             {% endfor %}
  642.             </table>
  643.             </form>
  644.             <script>
  645.             function onExtraChangeSelect(el, id, ind) {
  646.             var price = $(el).find(":selected").data('price');
  647.             console.log('#extra_price_' + id + '_' + ind);
  648.             $('#extra_price_' + id + '_' + ind).val(price);
  649.             }
  650.             function onExtraChangeCheckbox(el, id, ind) {
  651.             var price = 0;
  652.             $('.extra_checkbox_' +  id + ':checked').each(function(){
  653.             price += $(this).data('price');
  654.             });
  655.             console.log('#extra_price_' + id + '_' + ind);
  656.             $('#extra_price_' + id + '_' + ind).val(price);
  657.             }
  658.             function onExtraChangeRadio(el, id, ind) {
  659.             var price = $('.extra_radio_' +  id + ':checked').data('price');
  660.             console.log('#extra_price_' + id + '_' + ind);
  661.             $('#extra_price_' + id + '_' + ind).val(price);
  662.             }
  663.             </script>
  664.             {% endif %}
  665.             {# end extra options #}
  666.             {% if WebshopSettings.getB2b and WebshopSettings.hidePricesGuest %}
  667.             {% else %}
  668.             {% if Product.super.count > 0 %}
  669.             {% else %}
  670.             <div class="button-wrapper d-flex align-items-center checkoud-btn-wrapper {{Product.type == 1 ? 'd-none' : ''}}">
  671.             <div class="{{Product.canOrder ? '' : 'd-none'}} w-100">
  672.             <div id="product_can_order" class="d-flex align-items-center w-100">
  673.             {% if not Settings.getIsCatalog %}
  674.             {% if Product.type != 2 %}
  675.             <div class="product-cart-counter">
  676.             <button onclick="decreaseCart();" type="button">
  677.             <i class="fa fa-fw fa-minus"></i>
  678.             </button>
  679.             <input type="text" name="amount" id="amount" value="1"/>
  680.             <button onclick="increaseCart();" type="button">
  681.             <i class="fa fa-fw fa-plus"></i>
  682.             </button>
  683.             {% if Product.minOrder and Product.minOrder > 0 %}
  684.             <div style="text-align: center;font-size: 12px;font-weight: bold;">
  685.             Minimaal: {{Product.minOrder}}
  686.             </div>
  687.             {% endif %}
  688.             </div>
  689.             {% endif %}
  690.             {% set cartimage = OriginalProduct.media is not empty ? '/' ~ OriginalProduct.media.first.getWebPath('small') : (WebshopSettings.getDefaultProductImage is not empty ? WebshopSettings.getDefaultProductImage : '/bundles/trinitywebshop/img/no-product-image.png') %}
  691.             <button data-cartimage="{{cartimage}}" data-carttitle="{{Product.label}}" data-cartintro="{{Product.intro}}" data-cartprice="{{Product.getDisplayPrice((WebshopSettings is defined ? WebshopSettings : null), WebshopCustomer, app.user)}}" type="button" id="pd-cart-button" data-id="{{Product.id}}" data-catid="{{Category.id}}" class="btn btn-green btn-block order btn-2 disabled" style="padding: 0.5rem 0;">
  692.             <i style="margin-right: 4px;" class="fa fa-shopping-cart"></i>
  693.             {{'Toevoegen'|trans({}, 'webshop', app.request.locale)}}
  694.             </button>
  695.             <a href="#" class="add-to-list d-none {{isLinked ? 'active' : ''}}" data-id="{{Product.id}}" title="Toevoegen aan favorieten">
  696.             <i class="{{isLinked ? 'fa' : 'far'}} fa-heart"></i>
  697.             </a>
  698.             {% else %}                
  699.             <a href="/contact/{{Product.id}}/" id="pd-contact-button" data-id="{{Product.id}}" data-catid="{{Category.id}}" class="btn-green btn-block order btn-2 btn-secondary" style="padding: 0.5rem;">
  700.             {{'Neem contact op'|trans({}, 'webshop', app.request.locale)}}
  701.             </a>
  702.             {% endif %}
  703.             </div>
  704.             </div>
  705.             <div class="{{Product.canOrder ? 'd-none' : ''}} w-100">
  706.             <div id="product_cannot_order" class="w-100">
  707.             {% set cartimage = OriginalProduct.media is not empty ? '/' ~ OriginalProduct.media.first.getWebPath('small') : (WebshopSettings.getDefaultProductImage is not empty ? WebshopSettings.getDefaultProductImage : '/bundles/trinitywebshop/img/no-product-image.png') %}
  708.             <button data-cartimage="{{cartimage}}" data-carttitle="{{Product.label}}" data-cartintro="{{Product.intro}}" data-cartprice="{{Product.getDisplayPrice((WebshopSettings is defined ? WebshopSettings : null), WebshopCustomer, app.user)}}" type="button" id="pd-cart-button" disabled="disabled" data-id="{{Product.id}}" data-catid="{{Category.id}}" class="btn btb-disabled btn-danger btn-block order btn-3">
  709.             <i class="fa fa-times"></i>
  710.             {{'Niet op voorraad'|trans({}, 'webshop', app.request.locale)}}
  711.             </button>
  712.             </div>
  713.             </div>
  714.             </div>
  715.             </div>
  716.             <div class="select-specs-first {{Product.type == 1 ? '' : 'd-none'}}">
  717.             {{'Maak hierboven een keuze'|trans({}, 'webshop', app.request.locale)}}
  718.             </div>
  719.             {% endif %}
  720.             {% endif %}
  721.             {% if Product.canOrder or Product.type > 0 %}
  722.                 {#  #}
  723.             {% else %}
  724.                 {% if WebshopSettings.restockMail %}
  725.                     <div class="stock-notify">
  726.                         {% if app.request.get('notify-restock') %}
  727.                             <p style="padding-top: 25px;"><strong>{{'Je bent nu aangemeld voor voorraadmeldingen op dit product.'|trans({})|raw}}</strong></p>
  728.                         {% else %}
  729.                             <form method="post">
  730.                                 <h3>{{'Helaas, dit product is niet op voorraad'|trans({})|raw}}</h3>
  731.                                 <p>
  732.                                     {{'Een e-mailnotificatie ontvangen wanneer het product weer op voorraad is? Vul dan onderstaande gegevens in.'|trans({})|raw}}
  733.                                 </p>
  734.                                 <div class="stock-notify-form">
  735.                                     <input type="email" name="signupstock" placeholder="{{'E-mailadres'|trans({})|raw}}" />
  736.                                     <button type="submit" class="btn">{{'Inschrijven'|trans({})|raw}}</button>
  737.                                 </div>
  738.                             </form>
  739.                         {% endif %}
  740.                     </div>
  741.                 {% endif %}
  742.             {% endif %}
  743.             </div>
  744.             <div class="card additional-info">
  745.             <div class="base-info">
  746.             <span id="pd-intro">
  747.             {{Product.intro|raw}} <a href="#product" class="more-info">Meer informatie</a>
  748.             </span>
  749.             </div>
  750.             </div>
  751.             <input type="hidden" id="prod_compare_id" value="{{Product.id}}" />
  752.             <input type="hidden" id="prod_compare_label" value="{{(Product.Brand ? Product.Brand.label ~ ' ' : '') ~ Product.label}}" />
  753.             <input type="hidden" id="prod_compare_media" value="{{Product.media.count ? '/' ~ Product.media.first.webPath : WebshopSettings.defaultProductImage}}" />
  754.             </div>
  755.             {% if WebshopSettings.custom6 %}
  756.                 <div class="custom-block">
  757.                     {{WebshopSettings.custom6|raw}}
  758.                 </div>
  759.             {% endif %}
  760.             {% if WebshopSettings.usps %}
  761.                 <div class="custom-block">
  762.                     {{WebshopSettings.usps|raw}}
  763.                 </div>
  764.             {% endif %}
  765.             </div>
  766.             <script>
  767.                 var product = {
  768.                     'id' : '{{Product.id}}',
  769.                     'maxcompare': '{{ 'U kunt maximaal 4 producten vergelijken.' | trans({}, 'webshop', app.request.locale) | raw }}',
  770.                     'compareUrl': '{{path('webshop_compare')}}',
  771.                     'configurableUrl': '{{path('webshop_configurable',{Product: OriginalProduct.id})}}',
  772.                     'maginfier': {% if WebshopSettings.magnifier %}true{% else %}false{% endif %},
  773.                     'enableReviews': {% if WebshopSettings.enablereviews %}true{% else %}false{% endif %},
  774.                     'productReviewMsg': '{{'Reviews'|trans({}, 'webshop', app.request.locale)}}'
  775.                 };
  776.             </script>
  777.             </div>
  778.             </div>
  779.             </div>
  780.             </div>
  781.         </section>
  782.         {% if Product.super.count > 0 %}
  783.             {# Super #}
  784.             <div class="container super-products" style="padding: 50px 0;">
  785.             <div style="text-align: center;margin-bottom: 30px;"><h5>{{'Selecteer productspecificaties'|trans({}, 'webshop', app.request.locale)}}</h5></div>
  786.             <div class="row">
  787.                 {% set i = 0 %}
  788.                 {% for Child in Product.super %}
  789.                     {% set both = Child.superOptions|length > 0 %}
  790.                     {% set ignore = false %}
  791.                     {% for lbl,opts in Child.superOptions %}
  792.                         {% if lbl matches '/OPRUIMING/' %}
  793.                             {% set ignore = true %}
  794.                         {% endif %}
  795.                     {% endfor %}
  796.                     {% if ignore %}
  797.                         {#  #}
  798.                     {% else %}
  799.                         {% set type = (i == 0 ? 'links' : 'rechts') %}
  800.                         <div class="col-12 {{both ? 'col-md-6' : ''}}" style="{{both and type == 'links' ? 'border-right: solid 1px #ddd;' : ''}}">
  801.                         <div style="text-align: center;font-size: 15px;font-weight: bold;margin-bottom: 15px;">{{type}}</div>
  802.                         <table style="width:100%;">
  803.                             {% for lbl,opts in Child.superOptions %}
  804.                                 <tr>
  805.                                 {% if both %}
  806.                                     {% if type == 'links' %}
  807.                                         <td style="width: 50%;text-align:right;padding-right: 30px;">{{lbl}}</td>
  808.                                     {% endif %}
  809.                                     <td class="{{type == 'links' ? 'left' : 'right'}}" style="width: 50%;text-align: {{type == 'links' ? 'right' : 'left'}};">
  810.                                         <select class="super_options super_{{type}}" data-pid="{{Child.id}}" data-lbl="{{lbl}}" name="super_options[{{Child.id}}][{{lbl}}]">
  811.                                             {% if opts|length > 1 %}
  812.                                                 <option value="" selected>- Maak een keuze -</option>
  813.                                             {% endif %}
  814.                                             {% for opt in opts %}
  815.                                                 <option value="{{opt.value}}">{{opt.value}}</option>
  816.                                             {% endfor %}
  817.                                         </select>
  818.                                     </td>
  819.                                     {% if type == 'rechts' %}
  820.                                         <td style="width: 50%;padding-left: 30px;">{{lbl}}</td>
  821.                                     {% endif %}
  822.                                 {% else %}
  823.                                     <td style="width: 50%;text-align:right;padding-right: 30px;">{{lbl}}</td>
  824.                                     <td style="width: 50%;text-align: left;">
  825.                                         <select class="super_options super_{{type}}" data-pid="{{Child.id}}" data-lbl="{{lbl}}" name="super_options[{{Child.id}}][{{lbl}}]">
  826.                                             {% if opts|length > 1 %}
  827.                                                 <option value="" selected>- Maak een keuze -</option>
  828.                                             {% endif %}
  829.                                             {% for opt in opts %}
  830.                                                 <option value="{{opt.value}}">{{opt.value}}</option>
  831.                                             {% endfor %}
  832.                                         </select>
  833.                                     </td>
  834.                                 {% endif %}
  835.                                 </tr>
  836.                             {% endfor %}
  837.                             <tr>
  838.                                 {% if type == 'links' %}
  839.                                     <td style="width: 50%;text-align:right;padding-right: 30px;">Aantal</td>
  840.                                 {% endif %}
  841.                                 <td class="{{type == 'links' ? 'left' : 'right'}}" style="width: 50%;text-align: {{type == 'links' ? 'right' : 'left'}};">
  842.                                     {% if Child.superTierPrices|length > 0 %}
  843.                                         <select class="grouped_product super_{{type}}" data-id="{{Child.id}}" name="grouped[{{Child.id}}]">
  844.                                             <option value="0">0</option>
  845.                                             {% for opt in Child.superTierPrices %}
  846.                                                 <option value="{{opt[0]|number_format(0)}}">{{opt[0]|number_format(0)}} stuks (&euro; {{(opt[0] * opt[1])|number_format(2, ',', '.')}})</option>
  847.                                             {% endfor %}
  848.                                         </select>
  849.                                     {% else %}
  850.                                         <input class="grouped_product" data-id="{{Child.id}}" type="text" name="grouped[{{Child.id}}]" value="0" />
  851.                                     {% endif %}
  852.                                 </td>
  853.                                 {% if type == 'rechts' %}
  854.                                     <td style="width: 50%;padding-left: 30px;">Aantal</td>
  855.                                 {% endif %}
  856.                             </tr>
  857.                         </table>
  858.                         </div>
  859.                         {% set i = (i + 1) %}
  860.                     {% endif %}
  861.                 {% endfor %}
  862.             </div>
  863.             <script>
  864.                 function mergeSuperLeftToRight() {
  865.                     $.each($('.super_options.super_links'), function(ind, opt){
  866.                         var val = $(opt).val();
  867.                         var lbl = $(opt).data('lbl');
  868.                         $('[data-lbl="' + lbl + '"]').val(val);
  869.                     });
  870.                 }
  871.             </script>
  872.             <button style="display:none;" id="copyRightBtn" type="button" onclick="mergeSuperLeftToRight()">Kopieer links naar rechts</button>
  873.             <script type="text/javascript">
  874.                 $(function(){
  875.                     if($('td.right').length > 0){
  876.                         $('#copyRightBtn').show();
  877.                     }
  878.                 });
  879.             </script>
  880.             {% set cartimage = OriginalProduct.media is not empty ? '/' ~ OriginalProduct.media.first.getWebPath('small') : (WebshopSettings.getDefaultProductImage is not empty ? WebshopSettings.getDefaultProductImage : '/bundles/trinitywebshop/img/no-product-image.png') %}
  881.             <button data-cartimage="{{cartimage}}" data-carttitle="{{Product.label}}" data-cartintro="{{Product.intro}}" data-cartprice="{{Product.getDisplayPrice((WebshopSettings is defined ? WebshopSettings : null), WebshopCustomer, app.user)}}" type="button" id="pd-cart-button" data-id="{{Product.id}}" data-catid="{{Category.id}}" class="btn btn-green btn-block order btn-1" style="padding: 0.5rem 0;">
  882.                 <i style="margin-right: 4px;" class="fa fa-shopping-cart"></i> {{'Toevoegen'|trans({}, 'webshop', app.request.locale)}}
  883.             </button>
  884.             </div>
  885.         {% endif %}
  886.         {% if WebshopSettings.productDisplay == 'tab' %}
  887.             {# Legacy tabs display #}
  888.             <section class="tabs-section product-details-tabs">
  889.                 {% if Product.type != 2 %}
  890.                 <div class="container d-none d-md-block">
  891.                 <ul class="nav nav-tabs" id="myTab" role="tablist" style="position:relative;">
  892.                 <li class="nav-item">
  893.                 <a style="{{Product.type == 1 ? 'display: none;' : ''}}" class="nav-link active" id="product-tab" data-bs-toggle="tab" href="#product" role="tab" aria-controls="product" aria-selected="true">{{'Productinformatie'|trans({}, 'webshop', app.request.locale)}}</a>
  894.                 </li>
  895.                 {% if Product.giftcard is empty %}
  896.                 <li class="nav-item">
  897.                 <a class="nav-link" id="specs-tab" data-bs-toggle="tab" href="#specs" role="tab" aria-controls="specs" aria-selected="false">{{'Specificaties'|trans({}, 'webshop', app.request.locale)}}</a>
  898.                 </li>
  899.                 {% endif %}
  900.                 {% if WebshopSettings.enablereviews %}
  901.                 <li class="nav-item">
  902.                 <a class="nav-link" id="reviews-tab" data-bs-toggle="tab" href="#reviews" role="tab" aria-controls="reviews" aria-selected="false">{{'Reviews'|trans({}, 'webshop', app.request.locale)}}</a>
  903.                 </li>
  904.                 {% endif %}
  905.                 {#{% if Product.relations is not empty %}
  906.                 <li class="nav-item">
  907.                 <a class="nav-link" id="related-tab" data-bs-toggle="tab" href="#related" role="tab" aria-controls="related" aria-selected="false">{{'Gerelateerd'|trans({}, 'webshop', app.request.locale)}}</a>
  908.                 </li>
  909.                 {% endif %}#}
  910.                 </ul>
  911.                 </div>
  912.                 <div class="tab-content" id="accordion">
  913.                 <div class="tab-pane fade show active" id="product" role="tabpanel" aria-labelledby="product-tab" style="{{Product.type == 1 ? 'display: none;' : ''}}">
  914.                 <div class="container">
  915.                 <div class="accordion-title d-block d-md-none" data-bs-toggle="collapse" data-bs-target="#accordion1" aria-expanded="true" aria-controls="accordion1">
  916.                 {{'Productinformatie'|trans({}, 'webshop', app.request.locale)}}
  917.                 </div>
  918.                 <div id="accordion1" class="collapse show" aria-labelledby="accordiongroup">
  919.                 <h2 class="tab-title d-none d-md-block">{{'Productinformatie'|trans({}, 'webshop', app.request.locale)}}</h2>
  920.                 <div class="tab-container">
  921.                 <div id="pd-description">
  922.                 {{Product.description|raw}}
  923.                 </div>
  924.                 </div>
  925.                 </div>
  926.                 </div>
  927.                 </div>
  928.                 {% if Product.giftcard is empty %}
  929.                 <div class="tab-pane fade" id="specs" role="tabpanel" aria-labelledby="specs-tab" style="{{Product.type == 1 ? 'display: none;' : ''}}">
  930.                 <div class="container">
  931.                 <div class="accordion-title d-block d-md-none collapsed" data-bs-toggle="collapse" data-bs-target="#accordion2" aria-expanded="true" aria-controls="accordion2">
  932.                 {{'Specificaties'|trans({}, 'webshop', app.request.locale)}}
  933.                 </div>
  934.                 <div id="accordion2" class="collapse" aria-labelledby="accordiongroup">
  935.                 <h2 class="tab-title d-none d-md-block specs2">{{'Specificaties'|trans({}, 'webshop', app.request.locale)}}</h2>
  936.                 <div class="tab-container">
  937.                 <table>
  938.                 {% set sf = 0 %}
  939.                 {% if Product.weight %}
  940.                 {% set sf = (sf + 1) %}
  941.                 <tr>
  942.                 <td style="padding-right:30px;">Gewicht</td>
  943.                 <td>
  944.                 {% if Product.weight >= 1000 %}
  945.                 {{Product.weight / 1000}} Kg.
  946.                 {% else %}
  947.                 {{Product.weight}} g
  948.                 {% endif %}
  949.                 </td>
  950.                 </tr>
  951.                 {% endif %}
  952.                 {% for spec_id, spec in specs %}
  953.                 {% if spec.value is not empty and spec.hidden == false %}
  954.                 {% set value = [] %}
  955.                 {% for v in spec.value %}
  956.                 {% if v.value %}
  957.                 {% if spec.type == 'yes_no' %}
  958.                 {% if v.value == 1 %}
  959.                 {% set value = value|merge(['<i style="color:green;" class="fa fa-check"></i>']) %}
  960.                 {% else %}
  961.                 {% set value = value|merge(['<i style="color:red;" class="fa fa-times"></i>']) %}
  962.                 {% endif %}
  963.                 {% elseif spec.type == 'color' %}
  964.                 {% set value = value|merge(['<span style="background:' ~ (v.hex is not empty ? v.hex : v.value) ~ ';border:1px solid #ddd;width:20px;height:20px; border-radius: 100%;display: inline-block; margin-right:5px;"></span>']) %}
  965.                 {% elseif v is iterable %}
  966.                 {% for v in v %}
  967.                 {% if v.value %}
  968.                 {% set value = value | merge([v.value]) %}
  969.                 {% endif %}
  970.                 {% endfor %}
  971.                 {% elseif v.value is defined %}
  972.                 {% set value = value | merge([v.value]) %}
  973.                 {% else %}
  974.                 {% endif %}
  975.                 {% endif %}
  976.                 {% endfor %}
  977.                 {% if value is not empty %}
  978.                 <tr>
  979.                 <td style="padding-right:30px;">{{spec.label}}</td>
  980.                 <td>
  981.                 {% if spec.type == 'color' %}
  982.                 {{(value|join(' '))|raw}}
  983.                 {% else %}
  984.                 {{(value|join(', '))|raw}}
  985.                 {% endif %}
  986.                 </td>
  987.                 </tr>
  988.                 {% set sf = (sf + 1) %}
  989.                 {% endif %}
  990.                 {% endif %}
  991.                 {% endfor %}
  992.                 {% if sf == 0 %}
  993.                 <tr>
  994.                 <td colspan="2">
  995.                 <p>{{'Er zijn geen specificaties beschikbaar voor dit product.'|trans({}, 'webshop', app.request.locale)}}</p>
  996.                 </td>
  997.                 </tr>
  998.                 {% endif %}
  999.                 </table>
  1000.                 </div>
  1001.                 </div>
  1002.                 </div>
  1003.                 </div>
  1004.                 {% endif %}
  1005.                 {% if WebshopSettings.enablereviews %}
  1006.                 <div class="tab-pane fade" id="reviews" role="tabpanel" aria-labelledby="reviews-tab">
  1007.                 <div class="accordion-item">
  1008.                 <div class="container">
  1009.                 <div class="accordion-title d-block d-md-none collapsed" data-bs-toggle="collapse" data-bs-target="#accordion3" aria-expanded="true" aria-controls="accordion3">
  1010.                 {{'Reviews'|trans({}, 'webshop', app.request.locale)}} ({{total_rating.total}})
  1011.                 </div>
  1012.                 <div id="accordion3" class="collapse" aria-labelledby="accordiongroup">
  1013.                 <h2 class="tab-title d-none d-md-block text-center mb-3">{{ 'Reviews' | trans({}, 'webshop', app.request.locale) | raw }}</h2>
  1014.                 <div class="tab-container tab-reviews">
  1015.                 <div id="review-list"></div>
  1016.                 {% if (app.user or WebshopSettings.anonimousReview) and WebshopSettings.enablereviews %}
  1017.                 <div class="text-center mt-3">
  1018.                 <a href="{{path('webshop_review', {id: Product.id})}}" class="popup btn">{{'Review plaatsen'|trans({}, 'webshop', app.request.locale)}}</a>
  1019.                 <br /><br />
  1020.                 </div>
  1021.                 {% endif %}
  1022.                 </div>
  1023.                 </div>
  1024.                 </div>
  1025.                 </div>
  1026.                 </div>
  1027.                 {% endif %}
  1028.                 {# {% if Product.relations is not empty %}
  1029.                 <div class="tab-pane fade" id="related" role="tabpanel" aria-labelledby="related-tab">
  1030.                 <div class="container">
  1031.                 <div class="accordion-title d-block d-md-none collapsed" data-bs-toggle="collapse" data-bs-target="#accordion4" aria-expanded="true" aria-controls="accordion4">
  1032.                 {{'Reviews'|trans({}, 'webshop', app.request.locale)}}
  1033.                 </div>
  1034.                 <div id="accordion4" class="collapse" aria-labelledby="accordiongroup">
  1035.                 <div class="tab-container">
  1036.                 <h2>Gerelateerd</h2>
  1037.                 <div id="relations" class="category-tabs">
  1038.                 <div class="cat-group row card">
  1039.                 {% for Prod in Product.relations %}
  1040.                 {% set prodCat = (Prod.getCategory | first) %}
  1041.                 <div class="product col-sm col-md-4 col-lg-4">
  1042.                 <div class="card">
  1043.                 <img class="card-img-top" src="http://via.placeholder.com/350x200" alt="Card image cap">
  1044.                 <div class="card-body">
  1045.                 <h5 class="card-title">Card title</h5>
  1046.                 <p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
  1047.                 <p class="pricing">
  1048.                 {% if i == 3 or i == 2 %}
  1049.                 <span class="price sale">&euro; 5.199,00</span>
  1050.                 <span class="price old">&euro; 5.899,00</span>
  1051.                 {% else %}
  1052.                 <span class="price">&euro; 5.199,00</span>
  1053.                 {% endif %}
  1054.                 </p>
  1055.                 </div>
  1056.                 </div>
  1057.                 </div>
  1058.                 {% endfor %}
  1059.                 </div>
  1060.                 </div>
  1061.                 </div>
  1062.                 </div>
  1063.                 </div>
  1064.                 </div>
  1065.                 {% endif %} #}
  1066.                 </div>
  1067.                 {% endif %}
  1068.                 {% if Product.type == 2 %}
  1069.                 <div class="container d-none d-md-block">
  1070.                 <ul class="nav nav-tabs" id="myTab" role="tablist" style="position:relative;">
  1071.                 <li class="nav-item">
  1072.                 <a style="{{Product.type == 1 ? 'display: none;' : ''}}" class="nav-link active" id="product-tab" data-bs-toggle="tab" href="#product" role="tab" aria-controls="product" aria-selected="true">{{'Productinformatie'|trans({}, 'webshop', app.request.locale)}}</a>
  1073.                 </li>
  1074.                 </ul>
  1075.                 </div>
  1076.                 <div class="tab-content" id="myTabContent">
  1077.                 <div class="tab-pane fade show active" id="product" role="tabpanel" aria-labelledby="product-tab" style="{{Product.type == 1 ? 'display: none;' : ''}}">
  1078.                 <div class="accordion-item">
  1079.                 <div class="container">
  1080.                 <div class="accordion-title d-block d-md-none" data-bs-toggle="collapse" data-bs-target="#accordion1" aria-expanded="true" aria-controls="accordion1">
  1081.                 {{'Productinformatie'|trans({}, 'webshop', app.request.locale)}}
  1082.                 </div>
  1083.                 <div id="accordion1" class="collapse show" aria-labelledby="accordiongroup">
  1084.                 <h2 class="tab-title d-none d-md-block">{{'Productinformatie'|trans({}, 'webshop', app.request.locale)}}</h2>
  1085.                 <div class="tab-container">
  1086.                 <div id="pd-description">
  1087.                 {{Product.description|raw}}
  1088.                 </div>
  1089.                 </div>
  1090.                 </div>
  1091.                 <div id="accordion2" class="collapse">
  1092.                 <table>
  1093.                 {% set sf = 0 %}
  1094.                 {% if Product.weight %}
  1095.                 {% set sf = (sf + 1) %}
  1096.                 <tr>
  1097.                 <td style="padding-right:30px;">Gewicht</td>
  1098.                 <td>
  1099.                 {% if Product.weight >= 1000 %}
  1100.                 {{Product.weight / 1000}} Kg.
  1101.                 {% else %}
  1102.                 {{Product.weight}} g
  1103.                 {% endif %}
  1104.                 </td>
  1105.                 </tr>
  1106.                 {% endif %}
  1107.                 {% for spec_id, spec in specs %}
  1108.                 {% if spec.value is not empty and spec.hidden == false %}
  1109.                 {% set value = [] %}
  1110.                 {% for v in spec.value %}
  1111.                 {% if v.value %}
  1112.                 {% if spec.type == 'yes_no' %}
  1113.                 {% if v.value == 1 %}
  1114.                 {% set value = value|merge(['<i style="color:green;" class="fa fa-check"></i>']) %}
  1115.                 {% else %}
  1116.                 {% set value = value|merge(['<i style="color:red;" class="fa fa-times"></i>']) %}
  1117.                 {% endif %}
  1118.                 {% elseif spec.type == 'color' %}
  1119.                 {% set value = value|merge(['<span style="background:' ~ (v.hex is not empty ? v.hex : v.value) ~ ';border:1px solid #ddd;width:20px;height:20px; border-radius: 100%;display: inline-block; margin-right:5px;"></span>']) %}
  1120.                 {% elseif v is iterable %}
  1121.                 {% for v in v %}
  1122.                 {% if v.value %}
  1123.                 {% set value = value | merge([v.value]) %}
  1124.                 {% endif %}
  1125.                 {% endfor %}
  1126.                 {% elseif v.value is defined %}
  1127.                 {% set value = value | merge([v.value]) %}
  1128.                 {% else %}
  1129.                 {% endif %}
  1130.                 {% endif %}
  1131.                 {% endfor %}
  1132.                 {% if value is not empty %}
  1133.                 <tr>
  1134.                 <td style="padding-right:30px;">{{spec.label}}</td>
  1135.                 <td>
  1136.                 {% if spec.type == 'color' %}
  1137.                 {{(value|join(' '))|raw}}
  1138.                 {% else %}
  1139.                 {{(value|join(', '))|raw}}
  1140.                 {% endif %}
  1141.                 </td>
  1142.                 </tr>
  1143.                 {% set sf = (sf + 1) %}
  1144.                 {% endif %}
  1145.                 {% endif %}
  1146.                 {% endfor %}
  1147.                 {% if sf == 0 %}
  1148.                 <tr>
  1149.                 <td colspan="2">
  1150.                 <p>{{'Er zijn geen specificaties beschikbaar voor dit product.'|trans({}, 'webshop', app.request.locale)}}</p>
  1151.                 </td>
  1152.                 </tr>
  1153.                 {% endif %}
  1154.                 </table>
  1155.                 </div>
  1156.                 </div>
  1157.                 </div>
  1158.                 </div>
  1159.                 </div>
  1160.                 {% endif %}
  1161.             </section>
  1162.         {% else %}
  1163.             {# New column display #}
  1164.             <section class="tabs-section product-details-columns">
  1165.                 {% if Product.type != 2 %}
  1166.                 <div class="product-info" id="accordion">
  1167.                 <div class="container">
  1168.                 <div class="row">
  1169.                 <div class="col-12 col-lg-{{WebshopSettings.enablereviews ? '6' : '12'}}">
  1170.                 <div id="product">
  1171.                 <div class="accordion-item" id="acc-product">
  1172.                 <div class="accordion-title d-block d-md-none" data-bs-toggle="collapse" data-bs-target="#accordion1" aria-expanded="true" aria-controls="accordion1">
  1173.                 {{'Productinformatie'|trans({}, 'webshop', app.request.locale)}}
  1174.                 </div>
  1175.                 <div id="accordion1" class="collapse show" aria-labelledby="accordiongroup">
  1176.                 <h4 class="tab-title d-none d-md-block">{{'Productinformatie'|trans({}, 'webshop', app.request.locale)}}</h4>
  1177.                 <div class="tab-container">
  1178.                 <div id="pd-description">
  1179.                 {{Product.description|raw}}
  1180.                 </div>
  1181.                 </div>
  1182.                 </div>
  1183.                 </div>
  1184.                 </div>
  1185.                 <div id="specs" style="{{Product.type == 1 ? 'display: none;' : ''}}">
  1186.                 <div class="accordion-item" id="acc-specs">
  1187.                 <div class="accordion-title d-block d-md-none collapsed" data-bs-toggle="collapse" data-bs-target="#accordion2" aria-expanded="true" aria-controls="accordion2">
  1188.                 {{'Specificaties'|trans({}, 'webshop', app.request.locale)}}
  1189.                 </div>
  1190.                 <div id="accordion2" class="collapse" aria-labelledby="accordiongroup">
  1191.                 <h4 class="tab-title d-none d-md-block specs3">{{'Specificaties'|trans({}, 'webshop', app.request.locale)}}</h4>
  1192.                 <div class="tab-container">
  1193.                 <table>
  1194.                 {% set sf = 0 %}
  1195.                 {% if Product.weight %}
  1196.                 {% set sf = (sf + 1) %}
  1197.                 {% endif %}
  1198.                 {% for spec_id, spec in specs %}
  1199.                 {% if spec.value is not empty and spec.hidden == false %}
  1200.                 {% set value = [] %}
  1201.                 {% for v in spec.value %}
  1202.                 {% if v.value %}
  1203.                 {% if spec.type == 'yes_no' %}
  1204.                 {% if v.value == 1 %}
  1205.                     {% set value = value|merge(['<i style="color:green;" class="fa fa-check"></i>']) %}
  1206.                 {% else %}
  1207.                     {% set value = value|merge(['<i style="color:red;" class="fa fa-times"></i>']) %}
  1208.                 {% endif %}
  1209.                 {% elseif spec.type == 'color' %}
  1210.                 {% set value = value|merge(['<span style="background:' ~ (v.hex is not empty ? v.hex : v.value) ~ ';border:1px solid #ddd;width:20px;height:20px; border-radius: 100%;display: inline-block; margin-right:5px;"></span>']) %}
  1211.                 {% elseif v is iterable %}
  1212.                 {% for v in v %}
  1213.                     {% if v.value %}
  1214.                     {% set value = value | merge([v.value]) %}
  1215.                     {% endif %}
  1216.                 {% endfor %}
  1217.                 {% elseif v.value is defined %}
  1218.                 {% set value = value | merge([v.value]) %}
  1219.                 {% else %}
  1220.                 {% endif %}
  1221.                 {% endif %}
  1222.                 {% endfor %}
  1223.                 {% if value is not empty %}
  1224.                 <tr>
  1225.                 <td class="pr-3">{{spec.label}}</td>
  1226.                 <td>
  1227.                 {% if spec.type == 'color' %}
  1228.                     {{(value|join(' '))|raw}}
  1229.                 {% else %}
  1230.                     {{(value|join(', '))|raw}}
  1231.                 {% endif %}
  1232.                 </td>
  1233.                 </tr>
  1234.                 {% set sf = (sf + 1) %}
  1235.                 {% endif %}
  1236.                 {% endif %}
  1237.                 {% endfor %}
  1238.                 {% if sf == 0 and Product.type != 2 and (Product.sku is empty and Product.ean is empty) %}
  1239.                 <tr>
  1240.                 <td colspan="2">
  1241.                 <p>{{'Er zijn geen specificaties beschikbaar voor dit product.'|trans({}, 'webshop', app.request.locale)}}</p>
  1242.                 </td>
  1243.                 </tr>
  1244.                 {% endif %}
  1245.                 {% if Product.type != 2 %}
  1246.                 {% if Product.sku %}
  1247.                 <tr>
  1248.                 <td>{{ 'SKU' | trans({}, 'webshop', app.request.locale) | raw }}</td>
  1249.                 <td id="pd-sku">{{Product.sku}}</td>
  1250.                 </tr>
  1251.                 {% endif %}
  1252.                 {% if Product.ean %}
  1253.                 <tr>
  1254.                 <td>{{ 'EAN' | trans({}, 'webshop', app.request.locale) | raw }}</td>
  1255.                 <td id="pd-ean">{{Product.ean}}</td>
  1256.                 </tr>
  1257.                 {% endif %}
  1258.                 {% endif %}
  1259.                 </table>
  1260.                 </div>
  1261.                 </div>
  1262.                 </div>
  1263.                 </div>
  1264.                 </div>
  1265.                 {% if WebshopSettings.enablereviews %}
  1266.                 <div class="col-12 col-lg-6">
  1267.                 <div class="accordion-item">
  1268.                 <div id="reviews">
  1269.                 <div class="accordion-title d-block d-md-none collapsed" data-bs-toggle="collapse" data-bs-target="#accordion3" aria-expanded="true" aria-controls="accordion3">
  1270.                 {{'Reviews'|trans({}, 'webshop', app.request.locale)}} ({{total_rating.total}})
  1271.                 </div>
  1272.                 <div id="accordion3" class="collapse" aria-labelledby="accordiongroup">
  1273.                 <h4 class="tab-title d-none d-md-block mb-3">{{ 'Reviews' | trans({}, 'webshop', app.request.locale) | raw }}</h4>
  1274.                 <div class="tab-container tab-reviews">
  1275.                 <div id="review-list"></div>
  1276.                 {% if app.user or WebshopSettings.anonimousReview %}
  1277.                 <div class="text-center mt-3">
  1278.                 <a href="{{path('webshop_review', {id: Product.id})}}" class="popup btn">{{'Review plaatsen'|trans({}, 'webshop', app.request.locale)}}</a>
  1279.                 </div>
  1280.                 {% endif %}
  1281.                 </div>
  1282.                 </div>
  1283.                 </div>
  1284.                 </div>
  1285.                 </div>
  1286.                 {% endif %}
  1287.                 </div>
  1288.                 </div>
  1289.                 </div>
  1290.                 </div>
  1291.                 {% endif %}
  1292.                 {% if Product.type == 2 %}
  1293.                 <div class="container">
  1294.                 <div id="product">
  1295.                 <div class="accordion-item">
  1296.                 <div class="accordion-title d-block d-md-none" data-bs-toggle="collapse" data-bs-target="#accordion1" aria-expanded="true" aria-controls="accordion1">
  1297.                 {{'Productinformatie'|trans({}, 'webshop', app.request.locale)}}
  1298.                 </div>
  1299.                 <div id="accordion1" class="collapse show" aria-labelledby="accordiongroup">
  1300.                 <h4 class="tab-title d-none d-md-block">{{'Productinformatie'|trans({}, 'webshop', app.request.locale)}}</h4>
  1301.                 <div class="tab-container">
  1302.                 <div id="pd-description">
  1303.                 {{Product.description|raw}}
  1304.                 </div>
  1305.                 </div>
  1306.                 </div>
  1307.                 </div>
  1308.                 </div>
  1309.                 {# <div id="specs">
  1310.                 <div class="accordion-item">
  1311.                 <div class="accordion-title d-block d-md-none collapsed" data-bs-toggle="collapse" data-bs-target="#accordion2" aria-expanded="true" aria-controls="accordion2">
  1312.                 {{'Specificaties'|trans({}, 'webshop', app.request.locale)}}
  1313.                 </div>
  1314.                 <div id="accordion2" class="collapse" aria-labelledby="accordiongroup">
  1315.                 <h4 class="tab-title d-none d-md-block specs1">{{'Specificaties'|trans({}, 'webshop', app.request.locale)}}</h4>
  1316.                 <div class="tab-container">
  1317.                 {% if specs is not empty %}
  1318.                 <table>
  1319.                 {% set sf = 0 %}
  1320.                 {% if Product.weight %}
  1321.                 {% set sf = (sf + 1) %}
  1322.                 <tr>
  1323.                 <td style="padding-right:30px;">Gewicht</td>
  1324.                 <td>
  1325.                 {% if Product.weight >= 1000 %}
  1326.                 {{Product.weight / 1000}} Kg.
  1327.                 {% else %}
  1328.                 {{Product.weight}} g
  1329.                 {% endif %}
  1330.                 </td>
  1331.                 </tr>
  1332.                 {% endif %}
  1333.                 {% for spec_id, spec in specs %}
  1334.                 {% if spec.value is not empty and spec.hidden == false %}
  1335.                 {% set value = [] %}
  1336.                 {% for v in spec.value %}
  1337.                 {% if v.value %}
  1338.                 {% if spec.type == 'yes_no' %}
  1339.                 {% if v.value == 1 %}
  1340.                 {% set value = value|merge(['<i style="color:green;" class="fa fa-check"></i>']) %}
  1341.                 {% else %}
  1342.                 {% set value = value|merge(['<i style="color:red;" class="fa fa-times"></i>']) %}
  1343.                 {% endif %}
  1344.                 {% elseif spec.type == 'color' %}
  1345.                 {% set value = value|merge(['<span style="background:' ~ (v.hex is not empty ? v.hex : v.value) ~ ';border:1px solid #ddd;width:20px;height:20px; border-radius: 100%;display: inline-block; margin-right:5px;"></span>']) %}
  1346.                 {% elseif v is iterable %}
  1347.                 {% for v in v %}
  1348.                 {% if v.value %}
  1349.                 {% set value = value | merge([v.value]) %}
  1350.                 {% endif %}
  1351.                 {% endfor %}
  1352.                 {% elseif v.value is defined %}
  1353.                 {% set value = value | merge([v.value]) %}
  1354.                 {% else %}
  1355.                 {% endif %}
  1356.                 {% endif %}
  1357.                 {% endfor %}
  1358.                 {% if value is not empty %}
  1359.                 <tr>
  1360.                 <td style="padding-right:30px;">{{spec.label}}</td>
  1361.                 <td>
  1362.                 {% if spec.type == 'color' %}
  1363.                 {{(value|join(' '))|raw}}
  1364.                 {% else %}
  1365.                 {{(value|join(', '))|raw}}
  1366.                 {% endif %}
  1367.                 </td>
  1368.                 </tr>
  1369.                 {% set sf = (sf + 1) %}
  1370.                 {% endif %}
  1371.                 {% endif %}
  1372.                 {% endfor %}
  1373.                 {% if sf == 0 %}
  1374.                 <p>{{'Er zijn geen specificaties beschikbaar voor dit product.'|trans({}, 'webshop', app.request.locale)}}</p>
  1375.                 {% endif %}
  1376.                 </table>
  1377.                 {% endif %}
  1378.                 </div>
  1379.                 </div>
  1380.                 </div>
  1381.                 </div> #}
  1382.                 </div>
  1383.                 {% endif %}
  1384.             </section>
  1385.         {% endif %}
  1386.         {% set realOriginalProduct = Product %}
  1387.         {% if Product.relations is not empty %}
  1388.             {% set hasRelations = false %}
  1389.             {% for Product in Product.relations %}
  1390.                 {% if Product %}
  1391.                     {% if Product.visible and Product.enabled %}
  1392.                         {# Product is visible and enabled #}
  1393.                         {% if Product.type == 0 or Product.type > 2 %}
  1394.                             {# Not dynamic #}
  1395.                             {% if Product.stock %}
  1396.                                 {# Stock management #}
  1397.                                 {% if (Product.stockAmount - Product.outOfStockQuantity) >= 1 or Product.visibleNoStock == true %}
  1398.                                     {# Stock above 1 or show always when no stock #}
  1399.                                     {% set hasRelations = true %}
  1400.                                 {% endif %}
  1401.                             {% else %}
  1402.                                 {# No stock management #}
  1403.                                 {% set hasRelations = true %}
  1404.                             {% endif %}
  1405.                         {% else %}
  1406.                             {% if Product.type == 1 or Product.type == 2 %}
  1407.                                 {# Dynamic #}
  1408.                                 {% if Product.childStockAmount > 0 %}
  1409.                                     {# One or more childs have stock #}
  1410.                                     {% set hasRelations = true %}
  1411.                                 {% endif %}
  1412.                             {% endif %}
  1413.                         {% endif %}
  1414.                     {% endif %}
  1415.                 {% endif %}
  1416.             {% endfor %}
  1417.             {% if hasRelations %}
  1418.                 <section class="related-products {% if recipes|length > 0 %}nobottompadding{% endif %}">
  1419.                     <div class="container">
  1420.                     <div class="introblock">
  1421.                     <div class="introtitle">{{ 'Gerelateerde producten' | trans }}</div>
  1422.                     </div>
  1423.                     <div id="relations" class="category">
  1424.                     <div class="webshop-bundle webshop-widget">
  1425.                     <div class="swiper-content">
  1426.                     <div class="swiper-container swiper-products">
  1427.                     <div class="swiper-wrapper">
  1428.                     {% for Product in Product.relations %}
  1429.                     {% set prodCat = (Product.getCategory.first) %}
  1430.                     {% if Product %}
  1431.                     {% set canShow = false %}
  1432.                     {% if Product.visible and Product.enabled %}
  1433.                     {# Product is visible and enabled #}
  1434.                     {% if Product.type == 0 or Product.type > 2 %}
  1435.                     {# Not dynamic #}
  1436.                     {% if Product.stock %}
  1437.                     {# Stock management #}
  1438.                     {% if (Product.stockAmount - Product.outOfStockQuantity) >= 1 or Product.visibleNoStock == true %}
  1439.                     {# Stock above 1 or show always when no stock #}
  1440.                     {% set canShow = true %}
  1441.                     {% endif %}
  1442.                     {% else %}
  1443.                     {# No stock management #}
  1444.                     {% set canShow = true %}
  1445.                     {% endif %}
  1446.                     {% else %}
  1447.                     {% if Product.type == 1 or Product.type == 2 %}
  1448.                     {# Dynamic #}
  1449.                     {% if Product.childStockAmount > 0 %}
  1450.                     {# One or more childs have stock #}
  1451.                     {% set canShow = true %}
  1452.                     {% endif %}
  1453.                     {% endif %}
  1454.                     {% endif %}
  1455.                     {% endif %}
  1456.                     {% if canShow %}
  1457.                     {% set OriginalProduct = Product %}
  1458.                     {% if Product.type == 1 %}
  1459.                     {% set Product = Product.linkedProducts.first %}
  1460.                     {% endif %}
  1461.                     <div class="swiper-slide">
  1462.                     <div class="product">
  1463.                     {% include '@TrinityWebshop/elements/productCard.html.twig' %}
  1464.                     </div>
  1465.                     </div>
  1466.                     {% endif %}
  1467.                     {% endif %}
  1468.                     {% endfor %}
  1469.                     </div>
  1470.                     <div class="swiper-pagination d-md-none"></div>
  1471.                     <div class="swiper-button-prev d-none d-md-block"></div>
  1472.                     <div class="swiper-button-next d-none d-md-block"></div>
  1473.                     </div>
  1474.                     </div>
  1475.                     </div>
  1476.                     </div>
  1477.                     </div>
  1478.                 </section>
  1479.             {% endif %}
  1480.         {% endif %}
  1481.         {% if WebshopSettings.showRecentlyViewed and productHistoryObjects is not empty %}
  1482.             {% set catFix = true %}
  1483.             <section class="product-history">
  1484.                 <div class="container">
  1485.                 <div class="introblock">
  1486.                 <div class="introtitle">{{'Eerder bekeken producten'|trans({}, 'webshop', app.request.locale)|raw}}</div>
  1487.                 </div>
  1488.                 <div class="webshop-bundle webshop-widget">
  1489.                 <div class="swiper-content">
  1490.                 <div class="swiper-container swiper-products">
  1491.                 <div class="swiper-wrapper">
  1492.                 {% for Product in productHistoryObjects %}
  1493.                 {% if Product %}
  1494.                 {% set canShow = false %}
  1495.                 {% if Product.visible and Product.enabled %}
  1496.                 {# Product is visible and enabled #}
  1497.                 {% if Product.type == 0 or Product.type > 2 %}
  1498.                 {# Not dynamic #}
  1499.                 {% if Product.stock %}
  1500.                 {# Stock management #}
  1501.                 {% if (Product.stockAmount - Product.outOfStockQuantity) >= 1 or Product.visibleNoStock == true %}
  1502.                 {# Stock above 1 or show always when no stock #}
  1503.                 {% set canShow = true %}
  1504.                 {% endif %}
  1505.                 {% else %}
  1506.                 {# No stock management #}
  1507.                 {% set canShow = true %}
  1508.                 {% endif %}
  1509.                 {% else %}
  1510.                 {% if Product.type == 1 or Product.type == 2 %}
  1511.                 {# Dynamic #}
  1512.                 {% if Product.childStockAmount > 0 %}
  1513.                 {# One or more childs have stock #}
  1514.                 {% set canShow = true %}
  1515.                 {% endif %}
  1516.                 {% endif %}
  1517.                 {% endif %}
  1518.                 {% endif %}
  1519.                 {% if canShow %}
  1520.                 {% set OriginalProduct = Product %}
  1521.                 {% if Product.type == 1 %}
  1522.                 {% set Product = Product.linkedProducts.first %}
  1523.                 {% endif %}
  1524.                 <div class="swiper-slide">
  1525.                 <div class="product">
  1526.                 {% include '@TrinityWebshop/elements/productCard.html.twig' %}
  1527.                 </div>
  1528.                 </div>
  1529.                 {% endif %}
  1530.                 {% endif %}
  1531.                 {% endfor %}
  1532.                 </div>
  1533.                 <div class="swiper-pagination d-md-none"></div>
  1534.                 <div class="swiper-button-prev d-none d-md-block"></div>
  1535.                 <div class="swiper-button-next d-none d-md-block"></div>
  1536.                 </div>
  1537.                 </div>
  1538.                 </div>
  1539.                 </div>
  1540.             </section>
  1541.         {% endif %}
  1542.         {% if recipes|length > 0 and RecipesPage is defined and RecipesPage is not empty %}
  1543.             <section class="blog recipe-bundle related-recipes recipe-overview">
  1544.                 <div class="container">
  1545.                 <div class="introblock">
  1546.                 <div class="introtitle">{{'Gerelateerde recepten'|trans({}, 'webshop', app.request.locale)}}</div>
  1547.                 </div>
  1548.                 <div class="row slider-wrapper">
  1549.                 {% for Recipe in recipes %}
  1550.                 <div class="col-12 col-md-6 col-lg-4">
  1551.                 <div class="item card">
  1552.                 {# <a href="{{path(app.request.attributes.get('_route'))}}/{{Recipe.slug}}"> #}
  1553.                 <a href="{{path(RecipesPage.slugkey)}}/{{Recipe.slug}}">
  1554.                 <div class="thumb">
  1555.                 <div class="lcp image">
  1556.                 {% if Recipe.media.first.hasBlurred %}
  1557.                 <picture>
  1558.                 {% if Recipe.media.first.hasWebp() %}
  1559.                 <source srcset="/{{Recipe.media.first.getBlurredWebpPath('small')}}" type="image/webp">
  1560.                 {% endif %}
  1561.                 <source srcset="/{{Recipe.media.first.getBlurredWebPath('small')}}" type="{{Recipe.media.first.mime}}">
  1562.                 <img class="lq" alt="{{Recipe.media.first.description_alt}}" src="/{{Recipe.media.first.getBlurredWebPath('small')}}" type="{{Recipe.media.first.mime}}" loading="lazy" width="{{Recipe.media.first.width}}" height="{{Recipe.media.first.height}}">
  1563.                 </picture>
  1564.                 {% endif %}
  1565.                 <picture>
  1566.                 {% if Recipe.media.first.hasWebp() %}
  1567.                 <source srcset="/{{Recipe.media.first.getWebpPath('medium')}}" type="image/webp">
  1568.                 {% endif %}
  1569.                 <source srcset="/{{Recipe.media.first.getWebPath('medium')}}" type="{{ Recipe.media.first.mime }}">
  1570.                 <img class="hq" alt="{{Recipe.media.first.description_alt}}" src="/{{Recipe.media.first.getWebPath('medium')}}" type="{{Recipe.media.first.mime}}" loading="lazy" width="{{Recipe.media.first.width}}" height="{{Recipe.media.first.height}}" onload="this.style.opacity=1{% if Recipe.media.first.hasBlurred %};this.closest('.lcp').getElementsByClassName('lq')[0].style.opacity=0;{% endif %}" style="opacity: 0;">
  1571.                 </picture>
  1572.                 </div>
  1573.                 </div>
  1574.                 <div class="content">
  1575.                 <h3>{{Recipe.label}}</h3>
  1576.                 </div>
  1577.                 </a>
  1578.                 </div>
  1579.                 </div>
  1580.                 {% endfor %}
  1581.                 </div>
  1582.                 <div class="btns text-center">
  1583.                 <a href="/meer/recepten" class="btn">Meer recepten <i class="fa fa-arrow-right"></i></a>
  1584.                 </div>
  1585.                 </div>
  1586.             </section>
  1587.         {% endif %}
  1588.         {% if realOriginalProduct.upSell.count %}
  1589.             <section class="additional-products">
  1590.                 <div class="container">
  1591.                 <div class="introblock">
  1592.                 <div class="introtitle">{{'Vergelijkbare producten'|trans({}, 'webshop', app.request.locale)}}</div>
  1593.                 </div>
  1594.                 <div class="webshop-bundle webshop-widget">
  1595.                 <div class="swiper-content">
  1596.                 <div class="swiper-container swiper-products">
  1597.                 <div class="swiper-wrapper">
  1598.                 {% set hideBlock = true %}
  1599.                 {% for Product in realOriginalProduct.upSell %}
  1600.                 {% set canShow = false %}
  1601.                 {% if Product.visible and Product.enabled %}
  1602.                 {# Product is visible and enabled #}
  1603.                 {% if Product.type == 0 or Product.type > 2 %}
  1604.                 {# Not dynamic #}
  1605.                 {% if Product.stock %}
  1606.                 {# Stock management #}
  1607.                 {% if (Product.stockAmount - Product.outOfStockQuantity) >= 1 or Product.visibleNoStock == true %}
  1608.                 {# Stock above 1 or show always when no stock #}
  1609.                 {% set canShow = true %}
  1610.                 {% endif %}
  1611.                 {% else %}
  1612.                 {# No stock management #}
  1613.                 {% set canShow = true %}
  1614.                 {% endif %}
  1615.                 {% else %}
  1616.                 {% if Product.type == 1 or Product.type == 2 %}
  1617.                 {# Dynamic #}
  1618.                 {% if Product.childStockAmount > 0 %}
  1619.                 {# One or more childs have stock #}
  1620.                 {% set canShow = true %}
  1621.                 {% endif %}
  1622.                 {% endif %}
  1623.                 {% endif %}
  1624.                 {% endif %}
  1625.                 {% if canShow %}
  1626.                 {% set hideBlock = false %}
  1627.                 {% set OriginalProduct = Product %}
  1628.                 {% set Category = Product.category.first %}
  1629.                 {% set hide_intro = true %}
  1630.                 <div class="swiper-slide">
  1631.                 <div class="product">
  1632.                 {% include '@TrinityWebshop/elements/productCard.html.twig' %}
  1633.                 </div>
  1634.                 </div>
  1635.                 {% endif %}
  1636.                 {% endfor %}
  1637.                 </div>
  1638.                 <div class="swiper-pagination d-md-none"></div>
  1639.                 <div class="swiper-button-prev d-none d-md-block"></div>
  1640.                 <div class="swiper-button-next d-none d-md-block"></div>
  1641.                 </div>
  1642.                 </div>
  1643.                 </div>
  1644.                 </div>
  1645.             </section>
  1646.             {% if hideBlock %}
  1647.                 <script>
  1648.                     $(function() {
  1649.                         $('.additional-products').hide();
  1650.                     });
  1651.                 </script>
  1652.             {% endif %}
  1653.         {% endif %}
  1654.     </div>
  1655. {% endif %}
  1656. <script type="text/javascript">
  1657.     var xhr = new XMLHttpRequest();
  1658.     xhr.onreadystatechange = function (r) {
  1659.     if (xhr.readyState !== 4) return;
  1660.     if (xhr.status >= 200 && xhr.status < 300) {
  1661.     let buttons = document.querySelectorAll('.add-to-list');
  1662.     if(JSON.parse(xhr.response).logged_in){
  1663.     for(let i = 0; i < buttons.length; i++){
  1664.     buttons[i].classList.remove('d-none');
  1665.     }
  1666.     }
  1667.     }
  1668.     };
  1669.     xhr.open('GET', '{{path('nav_account')}}');
  1670.     xhr.send();
  1671.     var baseUrl = '{{path('homepage')}}';
  1672.     var cart_url = '{{path('cart')}}';
  1673.     var product_id = '{{ Product.id }}';
  1674.     var product_price = '{{ Product.realPriceIncl }}';
  1675.     var product_label = '{{ Product.label }}';
  1676. </script>
  1677. {% endblock %}