{% extends ['@TrinityWebshop/shop_wrapper.html.twig'] %}
{% trans_default_domain 'webshop' %}
{% block ogmetatags %}
{% set currentUrl = host ~ '/' ~ Category.uri ~ '/' ~ Product.slug %}
{% set ogmetatitle = customTitle is defined and customTitle is not empty ? customTitle : '' %}
{% if ogmetatitle is empty %}
{% set ogmetatitle = Page.getTitle | raw %}
{% endif %}
<meta property="og:title" content="{{ ogmetatitle }}" />
{% if Settings.label is not empty %}
<meta property="og:site_name" content="{{ Settings.label }}" />
{% endif %}
{% if Product.seoDescription is not empty %}
<meta property="og:description" content="{{ Product.seoDescription }}" />
{% else %}
<meta property="og:description" content="{{ Product.label }}" />
{% endif %}
<meta property="og:type" content="website" />
{# article, book, profile, website #}
<meta property="og:url" content="{{ currentUrl }}" />
{% if Product.media.count %}
{% if Product.media.first.hasRemoteUrl is defined and Product.media.first.hasRemoteUrl() %}
<meta property="og:image" content="{{ 'https:/' ~ asset(Product.media.first.getWebPath('medium')) }}" />
{% else %}
<meta property="og:image" content="{{ host ~ asset(Product.media.first.getWebPath('medium')) }}" />
{% endif %}
{% endif %}
{% if app.environment != 'dev' %}
<script type="application/ld+json">
{
"@context": "https://schema.org/",
"@type": "Product",
"name": "{{ ogmetatitle }}",
{% if Product.seoDescription is not empty %}
"description": "{{Product.seoDescription}}",
{% elseif Product.description is not empty %}
"description": "{{ Product.description }}",
{% elseif Product.intro is not empty %}
"description": "{{ Product.intro }}",
{% elseif Product.label is not empty %}
"description": "{{ Product.label }}",
{% endif %}
{% if Product.media.count %}
"image": [
{% for i, M in Product.media %}
{% if M.hasRemoteUrl is defined and M.hasRemoteUrl() %}
"{{'https:' ~ path('homepage') ~ M.webPath()}}"{{i < (Product.media.count - 1) ? ',' : ''}}
{% else %}
"{{host ~ path('homepage') ~ M.webPath()}}"{{i < (Product.media.count - 1) ? ',' : ''}}
{% endif %}
{% endfor %}
],
{% endif %}
"sku": "{{ Product.sku }}",
"mpn": "{{ Product.number }}",
{% if total_rating.total > 0 %}
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": "{{total_rating.avg}}",
"reviewCount": "{{total_rating.total}}"
},
{% endif %}
"offers": {
"@type": "Offer",
"url": "{{currentUrl}}",
"priceCurrency": {% if WebshopSettings.currency is not empty %}"{{ WebshopSettings.currency.key }}"{% else %}"EUR"{% endif %},
"price": "{{Product.getDisplayPriceFloat(WebshopSettings, WebshopCustomer, app.user, true)|number_format(2, '.', '')}}",
"priceValidUntil": "{{"now"|date_modify("+7 day")|date("Y-m-d")}}",
"itemCondition": "https://schema.org/NewCondition",
"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 %}"
}
}
</script>
{% endif %}
{% if canonical_url is not empty %}
<link rel="canonical" href="{{ host ~ '/' ~ canonical_url}}" />
{% endif %}
{% endblock %}
{% block shop_header %}
<link rel="preload" href="/bundles/cms/featherlight/release/featherlight.min.css" type="text/css" as="style" onload="this.onload=null;this.rel='stylesheet';" />
<script defer src="/bundles/trinitywebshop/bootstrap-notify-3.1.3/bootstrap-notify.min.js" type="text/javascript" charset="utf-8"></script>
<script defer src="/bundles/cms/featherlight/release/featherlight.min.js" type="text/javascript" charset="utf-8"></script>
<script defer src="/bundles/trinitywebshop/js/jquery.ez-plus.min.js"></script>
{% if overridekey is defined and overridekey is not empty and file_exists('custom/webshop/' ~ overridekey ~ '/js/product.js') %}
<script defer type="text/javascript" src="{{'/custom/webshop/' ~ overridekey ~ '/js/product.js'}}"></script>
{% elseif file_exists('custom/webshop/js/product.js') %}
<script defer type="text/javascript" src="{{'/custom/webshop/js/product.js'}}"></script>
{% else %}
<script defer type="text/javascript" src="{{'/bundles/trinitywebshop/js/product.js'}}?t={{'now'|date('YmdH')}}"></script>
{% endif %}
{% if overridekey is defined and overridekey is not empty and file_exists('custom/webshop/' ~ overridekey ~ '/js/product_configurable.js') %}
<script defer type="text/javascript" src="{{'/custom/webshop/' ~ overridekey ~ '/js/product_configurable.js'}}"></script>
{% elseif file_exists('custom/webshop/js/product_configurable.js') %}
<script defer type="text/javascript" src="{{'/custom/webshop/js/product_configurable.js'}}"></script>
{% else %}
<script defer type="text/javascript" src="{{'/bundles/trinitywebshop/js/product_configurable.js'}}?t={{'now'|date('YmdH')}}"></script>
{% endif %}
{% endblock %}
{% block pagestyle %}
{% if overridekey is not defined or overridekey is empty %}
{% set overridekey = '' %}
{% else %}
{% set overridekey = overridekey ~ '/' %}
{% endif %}
<style>
{% include 'override/' ~ overridekey ~ 'webshop/product-critical.html.twig' ignore missing %}
</style>
{% endblock %}
{% block shop_body %}
{% if Settings.facebookpixel is not empty %}
<script>
fbq(
'track', 'ViewContent', {
content_type: 'product',
content_ids: ['{{Product.sku}}'],
content_name: '{{(Product.Brand ? Product.Brand.label ~ ' ' : '') ~ Product.label}}',
content_category: '{{Product.category.first.category.label}}',
value: {{Product.getRealPriceIncl(null, false, false, WebshopCustomer)}},
currency: 'EUR'
}
);
</script>
{% endif %}
<script>
var slickSettingsOne = {
slidesToShow: 1,
slidesToScroll: 1,
arrows: true,
// fade: true,
asNavFor: '.slider-nav'
};
var slickSettingsTwo = {
slidesToShow: 4,
slidesToScroll: 1,
asNavFor: '.slider-for',
dots: false,
arrows: false,
// centerMode: true,
focusOnSelect: true
};
</script>
<script>
var zoomOptions = {
zoomType: 'lens',
lensShape: 'round',
lensSize: 250
};
</script>
<input type="hidden" id="current-amount" name="current-amount" />
{% set currentUri = path('homepage') ~ Category.uri ~ '/' ~ Product.slug %}
{% set currentUrl = url('homepage') ~ Category.uri ~ '/' ~ Product.slug %}
{% if Settings.overridekey is defined and Settings.overridekey is not empty %}
{% set overridekey = Settings.overridekey %}
{% endif %}
{% if Product.templateKey is defined and Product.templateKey is not empty %}
{% set customTemplate = Product.templateKey %}
{% endif %}
{% if customTemplate is defined and customTemplate is not empty and file_exists('../templates/override/webshop/layouts/product/' ~ customTemplate) %}
{% include 'override/webshop/layouts/product/' ~ customTemplate %}
{% elseif overridekey is defined and overridekey is not empty and file_exists('../templates/override/' ~ overridekey ~ '/webshop/product.html.twig') %}
{% include 'override/' ~ overridekey ~ '/webshop/product.html.twig' %}
{% elseif file_exists('../templates/override/webshop/product.html.twig') %}
{% include 'override/webshop/product.html.twig' %}
{% else %}
<script>
var productGalleryThumbs;
var productGalleryTop;
var lg;
</script>
{% if Settings.baseuri is empty %}
{% set site_baseuri = '' %}
{% else %}
{% set site_baseuri = Settings.baseuri | replace({'/': ''}) ~ '/' %}
{% endif %}
{% set childProductSale = false %}
{% if OriginalProduct.linkedProducts.count > 0 %}
{% for CP in OriginalProduct.linkedProducts %}
{% if CP.hasPromotion or (CP.priceSale is not empty and CP.priceSale > 0) %}
{% set childProductSale = true %}
{% endif %}
{% endfor %}
{% endif %}
{% 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) %}
<div class="webshop product-type-{{Product.type}}">
<div class="compare-popup" style="display:none;">
<div class="popup-title">
{{ 'Vergelijk producten' | trans({}, 'webshop', app.request.locale) | raw }}
<i class="fa fa-angle-down"></i>
</div>
<div id="compare-bar">
<div id="compare-products"></div>
<div id="compare-btns">
<a href="javascript:compareNow();" class="btn btn-primary">{{ 'Vergelijken' | trans({}, 'webshop', app.request.locale) | raw }}</a>
<a href="javascript:compareClear();" class="btn btn-blank">
{# {{ 'Wissen' | trans({}, 'webshop', app.request.locale) | raw }} #}
<i class="fa fa-trash-alt"></i>
</a>
</div>
</div>
</div>
<section class="{{Product.slug}} catalog-product-view" id="product-{{Product.slug}}" style="position: relative;">
<input type="hidden" id="product_type" value="{{Product.type}}"/>
<div class="container">
<div class="breadcrumbs-bar">
<div class="d-flex align-items-center justify-content-between">
{{ wo_render_breadcrumbs() }}
<div class="back-btn d-lg-none">
<a href="javascript:history.back()"><i class="fa fa-arrow-left"></i> {{ 'Terug'|trans({}, 'webshop', app.request.locale) }}</a>
</div>
<div class="page-tools">
<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>
{# <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">
<i class="fa fa-random"></i>
{{'Vergelijken'|trans({}, 'webshop', app.request.locale)}}
</a> #}
{# <a href="javascript:window.print();" title="Pagina afdrukken">
<i class="fa fa-print"></i>
</a> #}
<div class="dropdown" title="Pagina delen">
<div class="dropdown-toggle" type="button" id="share-dropdown" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="fa fa-share-alt"></i>
</div>
<div class="dropdown-menu" aria-labelledby="share-dropdown">
{% include '@TrinityWebshop/front/share.html.twig' %}
</div>
</div>
</div>
</div>
</div>
<div class="pd-top-wrapper-mobile"></div>
<div class="row">
<div class="col-12 col-md-12">
<div class="row">
<div class="col-12 col-md-6 col-lg-7 image">
<div id="pd-media">
<div class="badge-wrapper">
{% if (OriginalProduct.hasPromotion or (OriginalProduct.priceSale is not empty and OriginalProduct.priceSale > 0)) or childProductSale %}
<span class="sale-badge">{{'Sale'|trans({}, 'webshop', app.request.locale)}}</span>
{% endif %}
{% if OriginalProduct.exclusive %}
<span class="exclusive-badge">{{'Exclusief'|trans({}, 'webshop', app.request.locale)}}</span>
{% endif %}
{% if Product.hasCombi() %}
<span class="combi-badge">{{'Combideal!'|trans({}, 'webshop', app.request.locale)}}</span>
{% endif %}
{% if OriginalProduct.new and OriginalProduct.newFrom <= date() and (OriginalProduct.newTill >= date() or OriginalProduct.newTill is empty) %}
<span class="new-badge">{{'Nieuw'|trans({}, 'webshop', app.request.locale)}}</span>
{% endif %}
</div>
{% set media = Product.media %}
{% if (OriginalProduct.type == 1 or OriginalProduct.type == 2) and media.count < 1 %}
{% set media = OriginalProduct.media %}
{% endif %}
{# {% if media.count %} #}
<div id="product-image-wrapper">
<div id="product-image">
<div class="swiper-container product-swiper">
<!-- Additional required wrapper -->
<div class="swiper-wrapper" id="product-gallery">
<!-- Slides -->
{% if media.count %}
{% for i, m in media %}
{% set size = ( m.width > m.height ? m.height : m.width ) %}
<div class="swiper-slide">
<a href="/{{m.getWebPath()}}" id="slide-{{i}}">
<div class="lcp">
{% if m is not empty %}
{% if m.hasBlurred %}
<picture>
{% if m.hasWebp() %}
<source srcset="/{{m.getBlurredWebpPath('medium')}}" type="image/webp">
{% endif %}
<source srcset="/{{m.getBlurredWebPath('medium')}}" type="{{m.mime}}">
<img class="lq" alt="{{m.description_alt}}" src="/{{m.getBlurredWebPath('medium')}}" type="{{m.mime}}" loading="eager" width="{{m.width}}" height="{{m.height}}">
</picture>
{% endif %}
<picture>
{% if m.hasWebp() %}
<source srcset="/{{m.getWebpPath('large')}}" type="image/webp">
{% endif %}
<source srcset="/{{m.getWebPath('large')}}" type="{{ m.mime }}">
<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;">
</picture>
{% endif %}
</div>
</a>
</div>
{% endfor %}
{% else %}
<img src="{{(WebshopSettings.getDefaultProductImage is not empty ? WebshopSettings.getDefaultProductImage : '/bundles/trinitywebshop/img/no-product-image.png')}}" alt="">
{% endif %}
</div>
<div class="swiper-pagination"></div>
<div class="swiper-button-prev"></div>
<div class="swiper-button-next"></div>
</div>
<div class="swiper-container product-swiper-thumbs">
<!-- Additional required wrapper -->
<div class="swiper-wrapper" id="product-thumbs">
<!-- Slides -->
{% for i, m in media %}
{% set size = (
m.width > m.height
? m.height
: m.width
) %}
<div class="swiper-slide" id="thumb-{{i}}">
<div class="slide-wrapper">
<div class="lcp">
{% if m is not empty %}
{% if m.hasBlurred %}
<picture>
{% if m.hasWebp() %}
<source srcset="/{{m.getBlurredWebpPath('thumb')}}" type="image/webp">
{% endif %}
<source srcset="/{{m.getBlurredWebPath('thumb')}}" type="{{m.mime}}">
<img class="lq" alt="{{m.description_alt}}" src="/{{m.getBlurredWebPath('thumb')}}" type="{{m.mime}}" loading="eager" width="{{m.width}}" height="{{m.height}}">
</picture>
{% endif %}
<picture>
{% if m.hasWebp() %}
<source srcset="/{{m.getWebpPath('thumb')}}" type="image/webp">
{% endif %}
<source srcset="/{{m.getWebPath('thumb')}}" type="{{ m.mime }}">
<img class="hq" alt="{{m.description_alt}}" src="/{{m.getWebPath('thumb')}}" type="{{m.mime}}" loading="lazy" width="{{m.width}}" height="{{m.height}}">
</picture>
{% endif %}
</div>
</div>
</div>
{% endfor %}
</div>
{% if WebshopSettings.thumbLimit > 0 and media|length > WebshopSettings.thumbLimit %}
<div class="swiper-more">
<div class="slide-wrapper">
<span>
+{{media|length - (WebshopSettings.thumbLimit - 1)}}
</span>
</div>
</div>
{% endif %}
</div>
</div>
</div>
{# {% else %} #}
{# <img src="{{(WebshopSettings.getDefaultProductImage is not empty ? WebshopSettings.getDefaultProductImage : '/bundles/trinitywebshop/img/no-product-image.png')}}" alt=""> #}
{# {% endif %} #}
</div>
</div>
<div class="col-sm-12 col-md-6 col-lg-5 sidebar-productinfo">
{% if WebshopSettings.custom5 %}
<div class="custom-block">
{{WebshopSettings.custom5|raw}}
</div>
{% endif %}
<div class="cards-wrapper">
<div class="sidebar-loading">
<i class="fas fa-circle-notch fa-2x fa-spin"></i>
</div>
<div class="pd-top-wrapper-desktop">
<div class="pd-top-wrapper">
<h1 class="pd-label" id="pd-label">{{(Product.Brand ? Product.Brand.label ~ ' ' : '') ~ Product.label}}</h1>
{% if Product.labelsub is not empty %}<h4 class="pd-labelsub opacity-50" id="pd-labelsub">{{ Product.labelsub }}</h4>{% endif %}
{% if Product.giftcard %}
<span class="pd-giftcard giftcard-value">{{'Waarde:'|trans({}, 'webshop', app.request.locale)}}
{{Product.giftcard.amount|format_currency('EUR')}}</span>
{% endif %}
{% set reviewScore = OriginalProduct.getScore() %}
{% if reviewScore is not empty and reviewScore > 0 and WebshopSettings.enablereviews and WebshopSettings.averagerev %}
{% if Product.type == 2 %}
{% else %}
<div class="reviews-total">
<div class="averge-reviews d-flex">
<a href='#reviews'>
{# <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> #}
{% set reviewScore = total_rating.avg %}
<div class="review-content">
<div class="review-rating">
{% set half_marked = null %}
{% for r in range( 0.5, 5, 0.5 ) %}
{% if r matches '/^\\d+$/' %}
{# full #}
{% if r <= ( reviewScore ) %}
{% if half_marked %}
{% else %}
<i class="fas fa-fw fa-star on"></i>
{% endif %}
{% else %}
{# SOLID / ACTIVE #}
{% if half_marked %}
{% else %}
<i class="far fa-fw fa-star"></i>
{% endif %}
{% endif %}
{% set half_marked = false %}
{% else %}
{# half #}
{% if ( reviewScore ) > r or( reviewScore ) < r %}
{% else %}
<i class="fas fa-fw fa-star-half-alt on"></i>
{% set half_marked = true %}
{% endif %}
{% endif %}
{# <span data-rating="{{r - 1}}" class="star {{r matches '/^\\d+$/' ? "full" : "half"}} {{r <= (Review.rating) ? 'on' : ''}}"></span> #}
{% endfor %}
({{total_rating.total}})
</div>
</div>
<div class="total-count">
({{total_rating.total}})
</div>
</a>
</div>
</div>
{% endif %}
{% endif %}
</div>
</div>
<div class="card price-info" id="producten">
<div id="pd-price-block">
{% set show_price = true %}
{% if WebshopSettings is defined %}
{% if WebshopSettings.getB2b and WebshopSettings.hidePricesGuest %}
{% set show_price = false %}
{% endif %}
{% endif %}
{% if show_price %}
{{Product.displayPrice(WebshopSettings, WebshopCustomer, app.user, true)|trans_replace('webshop', language)|raw}}
{% endif %}
{% if WebshopSettings.hasLeasePrice %}
{{Product.displayLeasePrice(WebshopSettings, WebshopCustomer, app.user)|trans_replace('webshop', language)|raw}}
{% endif %}
{% if Product.bulk and Product.bulkOptions is not empty and Product.bulkOptions.amount is defined %}
<div class="bulk-discount alert alert-info my-3">
<h5>{{'Stapelkorting'|trans({}, 'webshop', app.request.locale)}}</h5>
{% for key, amount in Product.bulkOptions.amount %}
{% set price = Product.bulkOptions.price[key] %}
<div class="bulk-option">
<span class="bulk-option-amount">{{'Koop'|trans({}, 'webshop', app.request.locale)}}
{{amount}}
{{'voor'|trans({}, 'webshop', app.request.locale)}}</span>
<span class="bulk-option-price">
<strong>{{WebshopSettings.currency.format(price)|raw}}</strong>
{{'per stuk'|trans({}, 'webshop', app.request.locale)}}</span>
</div>
{% endfor %}
</div>
{% endif %}
{% if WebshopSettings.showStockIndicator and Product.type != 2 %}
{% set sl = WebshopSettings.stockLevels %}
<div class="stock-label">
{% if Product.canOrder and Product.stockAmount < sl.low and Product.stock %}
<div class="text-warning">
<i class="fa fa-circle"></i>
{{'Zeer beperkt op voorraad'|trans({}, 'webshop', app.request.locale)}}
</div>
{% elseif Product.canOrder and Product.stockAmount < sl.medium and Product.stock %}
<div class="text-warning">
<i class="fa fa-check"></i>
{{'Beperkt op voorraad'|trans({}, 'webshop', app.request.locale)}}
</div>
{% elseif Product.canOrder %}
<div class="text-success">
<i class="fa fa-check"></i>
{{'Op voorraad'|trans({}, 'webshop', app.request.locale)}}
</div>
{% endif %}
</div>
{% endif %}
</div>
<div class="base-info">
{# CONFIGURABLE OPTIONS #}
{% include "@TrinityWebshop/front/product/configurable-options.html.twig" %}
{% if selectSpecs is not empty %}
<form id="extra_specs">
<table class="table">
{% for data in selectSpecs %}
{% if not data.Spec.hideproductdetail %}
<tr>
<td>{{data.Spec.label}}:</td>
<td class="td-field">
<select class="form-select" name="selectSpecs[{{data.Spec.label}}]" style="outline:none;">
{% for value in data.values %}
<option value="{{value.id}}">{{value.value}}</option>}
{% endfor %}
</select>
</td>
</tr>
{% endif %}
{% endfor %}
</table>
</form>
{% endif %}
{% if Product.super.count > 0 %}
{# SUPER, FURTHER BELOW #}
{% else %}
{% if Product.type == 2 %}
{# GROUPED #}
<div class="grouped-choices">
{% if Product.linkedProducts.count %}
<table class="mt-2">
{% set productStock = 9999999 %}
{% for p in Product.getLinkedProductsSorted %}
{% if p.enabled %}
{% if p.canorder and p.stock and p.stockamount < productStock %}
{% set productStock = p.stockamount %}
{% endif %}
<tr>
<td class="thumb-container">
<div class="thumb">
<div class="thumb-wrapper">
<img src="/{{p.media.first.getWebPath('thumb')}}" alt="">
</div>
</div>
</td>
<td>
<div class="label-counter py-3 py-xl-0">
<div class="label-wrapper">
<span>{{p.label}}</span>
<div class="price">
{% if p.priceSale > 0 %}
<span class="old_price" style="font-weight: normal;text-decoration: line-through;color: #bbb;">{{WebshopSettings.Currency.format(p.getPriceIncl)|raw}}</span>
{% endif %}
{{WebshopSettings.Currency.format(p.realPriceIncl(null, false, false, WebshopCustomer))|raw}}
</div>
{% if WebshopSettings.showStockIndicator %}
{% set sl = WebshopSettings.stockLevels %}
<div class="stock-label">
{% if p.canOrder and p.stockAmount < sl.low and p.stock %}
<div class="text-warning">
<i class="fa fa-circle"></i>
{{'Zeer beperkt op voorraad'|trans({}, 'webshop', app.request.locale)}}
</div>
{% elseif p.canOrder and p.stockAmount < sl.medium and p.stock %}
<div class="text-warning">
<i class="fa fa-check"></i>
{{'Beperkt op voorraad'|trans({}, 'webshop', app.request.locale)}}
</div>
{% elseif p.canOrder %}
<div class="text-success">
<i class="fa fa-check"></i>
{{'Op voorraad'|trans({}, 'webshop', app.request.locale)}}
</div>
{% endif %}
</div>
{% endif %}
</div>
<div class="product-cart-counter-wrapper">
<div class="product-cart-counter">
{% set required = false %}
{% if OriginalProduct.groupedRequired is not empty %}
{% if p.id in OriginalProduct.groupedRequired %}
{% set required = true %}
{% endif %}
{% endif %}
<button type="button" onclick="
if(((0+$('#g-amount-{{p.id}}').val()) - 1) < 1){
$('#g-amount-{{p.id}}').val('{{required ? '1' : ''}}');
}else{
$('#g-amount-{{p.id}}').val((0+$('#g-amount-{{p.id}}').val()) - 1);
}" class="btn">
<i class="fa fa-fw fa-minus"></i>
</button>
<input class="grouped_product" name="grouped[{{p.id}}]" data-id="{{p.id}}" value="{{required ? '1' : ''}}" id="g-amount-{{p.id}}" placeholder="0" type="text" />
<button type="button" onclick="$('#g-amount-{{p.id}}').val((1*$('#g-amount-{{p.id}}').val()) + 1);" class="btn">
<i class="fa fa-fw fa-plus"></i>
</button>
</div>
</div>
</div>
</td>
</tr>
{% endif %}
{% endfor %}
</table>
{% else %}
<p>
{{'Er zijn geen gekoppelde producten.'|trans({}, 'webshop', app.request.locale)}}
</p>
{% endif %}
</div>
{% endif %}
{% endif %}
{% if Product.type == 2 %}
<div class="goto-button-wrapper d-md-none">
<a href="#producten" class="btn btn-block order"><i class="far fa-eye"></i> {{'Bekijk producten'|trans({}, 'webshop', app.request.locale)}}</a>
</div>
{% endif %}
{% if Product.extras is not empty %}
<form id="extra_options">
<table class="table">
{% for label,data in Product.extras %}
{% set extraId = loop.index0 %}
<tr class="extra-option">
<input type="hidden" class="form-control mb-1" id="extra_price_{{Product.id ~ '_' ~ loop.index0}}" name="extras[{{label}}][price]" value="{{data.price}}" />
{% if data.type == 'input' %}
<td>
<div class="label">
{{label}}
</div>
<span class="price">+ € {{data.price|number_format(2, ',', '.')}}</span>
</td>
<td><input type="text" class="form-control" name="extras[{{label}}][value]" /></td>
{% elseif data.type == 'checkbox' %}
<td><label>{{label}}</label></td>
<td>
{% for opt in data.options %}
<div class="form-check">
<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}}"/>
<label class="form-check-label" for="flexCheckDefault{{opt.label}}">{{opt.label}}<span class="price">+ € {{opt.price|number_format(2, ',', '.')}}</span></label>
</div>
{% endfor %}
</td>
{% elseif data.type == 'select' %}
<td><div>{{label}}<span class="price"></span></div></td>
<td>
<select class="form-select" required name="extras[{{label}}][value]" onchange="onExtraChangeSelect(this, {{Product.id}}, {{extraId}});">
<option value="">{{ 'Selecteer een optie' | trans({}, 'webshop', app.request.locale) }}</option>
{% for opt in data.options %}
<option value="{{opt.label}}" data-price="{{opt.price}}">{{opt.label}} + € {{opt.price|number_format(2, ',', '.')}}</option>
{% endfor %}
</select>
</td>
{% elseif data.type == 'radio' %}
<td>
<div>{{label}}<span class="price"></span></div>
</td>
<td>
{% for ind, opt in data.options %}
<div class="form-check">
<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}});">
<label class="form-check-label" for="flexRadioDefault{{label ~ '-' ~ ind}}">
{{opt.label}}
<span class="price">+ € {{opt.price|number_format(2, ',', '.')}}</span>
</label>
</div>
{% endfor %}
</td>
{% endif %}
</tr>
{% endfor %}
</table>
</form>
<script>
function onExtraChangeSelect(el, id, ind) {
var price = $(el).find(":selected").data('price');
console.log('#extra_price_' + id + '_' + ind);
$('#extra_price_' + id + '_' + ind).val(price);
}
function onExtraChangeCheckbox(el, id, ind) {
var price = 0;
$('.extra_checkbox_' + id + ':checked').each(function(){
price += $(this).data('price');
});
console.log('#extra_price_' + id + '_' + ind);
$('#extra_price_' + id + '_' + ind).val(price);
}
function onExtraChangeRadio(el, id, ind) {
var price = $('.extra_radio_' + id + ':checked').data('price');
console.log('#extra_price_' + id + '_' + ind);
$('#extra_price_' + id + '_' + ind).val(price);
}
</script>
{% endif %}
{# end extra options #}
{% if WebshopSettings.getB2b and WebshopSettings.hidePricesGuest %}
{% else %}
{% if Product.super.count > 0 %}
{% else %}
<div class="button-wrapper d-flex align-items-center checkoud-btn-wrapper {{Product.type == 1 ? 'd-none' : ''}}">
<div class="{{Product.canOrder ? '' : 'd-none'}} w-100">
<div id="product_can_order" class="d-flex align-items-center w-100">
{% if not Settings.getIsCatalog %}
{% if Product.type != 2 %}
<div class="product-cart-counter">
<button onclick="decreaseCart();" type="button">
<i class="fa fa-fw fa-minus"></i>
</button>
<input type="text" name="amount" id="amount" value="1"/>
<button onclick="increaseCart();" type="button">
<i class="fa fa-fw fa-plus"></i>
</button>
{% if Product.minOrder and Product.minOrder > 0 %}
<div style="text-align: center;font-size: 12px;font-weight: bold;">
Minimaal: {{Product.minOrder}}
</div>
{% endif %}
</div>
{% endif %}
{% 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') %}
<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;">
<i style="margin-right: 4px;" class="fa fa-shopping-cart"></i>
{{'Toevoegen'|trans({}, 'webshop', app.request.locale)}}
</button>
<a href="#" class="add-to-list d-none {{isLinked ? 'active' : ''}}" data-id="{{Product.id}}" title="Toevoegen aan favorieten">
<i class="{{isLinked ? 'fa' : 'far'}} fa-heart"></i>
</a>
{% else %}
<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;">
{{'Neem contact op'|trans({}, 'webshop', app.request.locale)}}
</a>
{% endif %}
</div>
</div>
<div class="{{Product.canOrder ? 'd-none' : ''}} w-100">
<div id="product_cannot_order" class="w-100">
{% 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') %}
<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">
<i class="fa fa-times"></i>
{{'Niet op voorraad'|trans({}, 'webshop', app.request.locale)}}
</button>
</div>
</div>
</div>
</div>
<div class="select-specs-first {{Product.type == 1 ? '' : 'd-none'}}">
{{'Maak hierboven een keuze'|trans({}, 'webshop', app.request.locale)}}
</div>
{% endif %}
{% endif %}
{% if Product.canOrder or Product.type > 0 %}
{# #}
{% else %}
{% if WebshopSettings.restockMail %}
<div class="stock-notify">
{% if app.request.get('notify-restock') %}
<p style="padding-top: 25px;"><strong>{{'Je bent nu aangemeld voor voorraadmeldingen op dit product.'|trans({})|raw}}</strong></p>
{% else %}
<form method="post">
<h3>{{'Helaas, dit product is niet op voorraad'|trans({})|raw}}</h3>
<p>
{{'Een e-mailnotificatie ontvangen wanneer het product weer op voorraad is? Vul dan onderstaande gegevens in.'|trans({})|raw}}
</p>
<div class="stock-notify-form">
<input type="email" name="signupstock" placeholder="{{'E-mailadres'|trans({})|raw}}" />
<button type="submit" class="btn">{{'Inschrijven'|trans({})|raw}}</button>
</div>
</form>
{% endif %}
</div>
{% endif %}
{% endif %}
</div>
<div class="card additional-info">
<div class="base-info">
<span id="pd-intro">
{{Product.intro|raw}} <a href="#product" class="more-info">Meer informatie</a>
</span>
</div>
</div>
<input type="hidden" id="prod_compare_id" value="{{Product.id}}" />
<input type="hidden" id="prod_compare_label" value="{{(Product.Brand ? Product.Brand.label ~ ' ' : '') ~ Product.label}}" />
<input type="hidden" id="prod_compare_media" value="{{Product.media.count ? '/' ~ Product.media.first.webPath : WebshopSettings.defaultProductImage}}" />
</div>
{% if WebshopSettings.custom6 %}
<div class="custom-block">
{{WebshopSettings.custom6|raw}}
</div>
{% endif %}
{% if WebshopSettings.usps %}
<div class="custom-block">
{{WebshopSettings.usps|raw}}
</div>
{% endif %}
</div>
<script>
var product = {
'id' : '{{Product.id}}',
'maxcompare': '{{ 'U kunt maximaal 4 producten vergelijken.' | trans({}, 'webshop', app.request.locale) | raw }}',
'compareUrl': '{{path('webshop_compare')}}',
'configurableUrl': '{{path('webshop_configurable',{Product: OriginalProduct.id})}}',
'maginfier': {% if WebshopSettings.magnifier %}true{% else %}false{% endif %},
'enableReviews': {% if WebshopSettings.enablereviews %}true{% else %}false{% endif %},
'productReviewMsg': '{{'Reviews'|trans({}, 'webshop', app.request.locale)}}'
};
</script>
</div>
</div>
</div>
</div>
</section>
{% if Product.super.count > 0 %}
{# Super #}
<div class="container super-products" style="padding: 50px 0;">
<div style="text-align: center;margin-bottom: 30px;"><h5>{{'Selecteer productspecificaties'|trans({}, 'webshop', app.request.locale)}}</h5></div>
<div class="row">
{% set i = 0 %}
{% for Child in Product.super %}
{% set both = Child.superOptions|length > 0 %}
{% set ignore = false %}
{% for lbl,opts in Child.superOptions %}
{% if lbl matches '/OPRUIMING/' %}
{% set ignore = true %}
{% endif %}
{% endfor %}
{% if ignore %}
{# #}
{% else %}
{% set type = (i == 0 ? 'links' : 'rechts') %}
<div class="col-12 {{both ? 'col-md-6' : ''}}" style="{{both and type == 'links' ? 'border-right: solid 1px #ddd;' : ''}}">
<div style="text-align: center;font-size: 15px;font-weight: bold;margin-bottom: 15px;">{{type}}</div>
<table style="width:100%;">
{% for lbl,opts in Child.superOptions %}
<tr>
{% if both %}
{% if type == 'links' %}
<td style="width: 50%;text-align:right;padding-right: 30px;">{{lbl}}</td>
{% endif %}
<td class="{{type == 'links' ? 'left' : 'right'}}" style="width: 50%;text-align: {{type == 'links' ? 'right' : 'left'}};">
<select class="super_options super_{{type}}" data-pid="{{Child.id}}" data-lbl="{{lbl}}" name="super_options[{{Child.id}}][{{lbl}}]">
{% if opts|length > 1 %}
<option value="" selected>- Maak een keuze -</option>
{% endif %}
{% for opt in opts %}
<option value="{{opt.value}}">{{opt.value}}</option>
{% endfor %}
</select>
</td>
{% if type == 'rechts' %}
<td style="width: 50%;padding-left: 30px;">{{lbl}}</td>
{% endif %}
{% else %}
<td style="width: 50%;text-align:right;padding-right: 30px;">{{lbl}}</td>
<td style="width: 50%;text-align: left;">
<select class="super_options super_{{type}}" data-pid="{{Child.id}}" data-lbl="{{lbl}}" name="super_options[{{Child.id}}][{{lbl}}]">
{% if opts|length > 1 %}
<option value="" selected>- Maak een keuze -</option>
{% endif %}
{% for opt in opts %}
<option value="{{opt.value}}">{{opt.value}}</option>
{% endfor %}
</select>
</td>
{% endif %}
</tr>
{% endfor %}
<tr>
{% if type == 'links' %}
<td style="width: 50%;text-align:right;padding-right: 30px;">Aantal</td>
{% endif %}
<td class="{{type == 'links' ? 'left' : 'right'}}" style="width: 50%;text-align: {{type == 'links' ? 'right' : 'left'}};">
{% if Child.superTierPrices|length > 0 %}
<select class="grouped_product super_{{type}}" data-id="{{Child.id}}" name="grouped[{{Child.id}}]">
<option value="0">0</option>
{% for opt in Child.superTierPrices %}
<option value="{{opt[0]|number_format(0)}}">{{opt[0]|number_format(0)}} stuks (€ {{(opt[0] * opt[1])|number_format(2, ',', '.')}})</option>
{% endfor %}
</select>
{% else %}
<input class="grouped_product" data-id="{{Child.id}}" type="text" name="grouped[{{Child.id}}]" value="0" />
{% endif %}
</td>
{% if type == 'rechts' %}
<td style="width: 50%;padding-left: 30px;">Aantal</td>
{% endif %}
</tr>
</table>
</div>
{% set i = (i + 1) %}
{% endif %}
{% endfor %}
</div>
<script>
function mergeSuperLeftToRight() {
$.each($('.super_options.super_links'), function(ind, opt){
var val = $(opt).val();
var lbl = $(opt).data('lbl');
$('[data-lbl="' + lbl + '"]').val(val);
});
}
</script>
<button style="display:none;" id="copyRightBtn" type="button" onclick="mergeSuperLeftToRight()">Kopieer links naar rechts</button>
<script type="text/javascript">
$(function(){
if($('td.right').length > 0){
$('#copyRightBtn').show();
}
});
</script>
{% 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') %}
<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;">
<i style="margin-right: 4px;" class="fa fa-shopping-cart"></i> {{'Toevoegen'|trans({}, 'webshop', app.request.locale)}}
</button>
</div>
{% endif %}
{% if WebshopSettings.productDisplay == 'tab' %}
{# Legacy tabs display #}
<section class="tabs-section product-details-tabs">
{% if Product.type != 2 %}
<div class="container d-none d-md-block">
<ul class="nav nav-tabs" id="myTab" role="tablist" style="position:relative;">
<li class="nav-item">
<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>
</li>
{% if Product.giftcard is empty %}
<li class="nav-item">
<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>
</li>
{% endif %}
{% if WebshopSettings.enablereviews %}
<li class="nav-item">
<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>
</li>
{% endif %}
{#{% if Product.relations is not empty %}
<li class="nav-item">
<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>
</li>
{% endif %}#}
</ul>
</div>
<div class="tab-content" id="accordion">
<div class="tab-pane fade show active" id="product" role="tabpanel" aria-labelledby="product-tab" style="{{Product.type == 1 ? 'display: none;' : ''}}">
<div class="container">
<div class="accordion-title d-block d-md-none" data-bs-toggle="collapse" data-bs-target="#accordion1" aria-expanded="true" aria-controls="accordion1">
{{'Productinformatie'|trans({}, 'webshop', app.request.locale)}}
</div>
<div id="accordion1" class="collapse show" aria-labelledby="accordiongroup">
<h2 class="tab-title d-none d-md-block">{{'Productinformatie'|trans({}, 'webshop', app.request.locale)}}</h2>
<div class="tab-container">
<div id="pd-description">
{{Product.description|raw}}
</div>
</div>
</div>
</div>
</div>
{% if Product.giftcard is empty %}
<div class="tab-pane fade" id="specs" role="tabpanel" aria-labelledby="specs-tab" style="{{Product.type == 1 ? 'display: none;' : ''}}">
<div class="container">
<div class="accordion-title d-block d-md-none collapsed" data-bs-toggle="collapse" data-bs-target="#accordion2" aria-expanded="true" aria-controls="accordion2">
{{'Specificaties'|trans({}, 'webshop', app.request.locale)}}
</div>
<div id="accordion2" class="collapse" aria-labelledby="accordiongroup">
<h2 class="tab-title d-none d-md-block specs2">{{'Specificaties'|trans({}, 'webshop', app.request.locale)}}</h2>
<div class="tab-container">
<table>
{% set sf = 0 %}
{% if Product.weight %}
{% set sf = (sf + 1) %}
<tr>
<td style="padding-right:30px;">Gewicht</td>
<td>
{% if Product.weight >= 1000 %}
{{Product.weight / 1000}} Kg.
{% else %}
{{Product.weight}} g
{% endif %}
</td>
</tr>
{% endif %}
{% for spec_id, spec in specs %}
{% if spec.value is not empty and spec.hidden == false %}
{% set value = [] %}
{% for v in spec.value %}
{% if v.value %}
{% if spec.type == 'yes_no' %}
{% if v.value == 1 %}
{% set value = value|merge(['<i style="color:green;" class="fa fa-check"></i>']) %}
{% else %}
{% set value = value|merge(['<i style="color:red;" class="fa fa-times"></i>']) %}
{% endif %}
{% elseif spec.type == 'color' %}
{% 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>']) %}
{% elseif v is iterable %}
{% for v in v %}
{% if v.value %}
{% set value = value | merge([v.value]) %}
{% endif %}
{% endfor %}
{% elseif v.value is defined %}
{% set value = value | merge([v.value]) %}
{% else %}
{% endif %}
{% endif %}
{% endfor %}
{% if value is not empty %}
<tr>
<td style="padding-right:30px;">{{spec.label}}</td>
<td>
{% if spec.type == 'color' %}
{{(value|join(' '))|raw}}
{% else %}
{{(value|join(', '))|raw}}
{% endif %}
</td>
</tr>
{% set sf = (sf + 1) %}
{% endif %}
{% endif %}
{% endfor %}
{% if sf == 0 %}
<tr>
<td colspan="2">
<p>{{'Er zijn geen specificaties beschikbaar voor dit product.'|trans({}, 'webshop', app.request.locale)}}</p>
</td>
</tr>
{% endif %}
</table>
</div>
</div>
</div>
</div>
{% endif %}
{% if WebshopSettings.enablereviews %}
<div class="tab-pane fade" id="reviews" role="tabpanel" aria-labelledby="reviews-tab">
<div class="accordion-item">
<div class="container">
<div class="accordion-title d-block d-md-none collapsed" data-bs-toggle="collapse" data-bs-target="#accordion3" aria-expanded="true" aria-controls="accordion3">
{{'Reviews'|trans({}, 'webshop', app.request.locale)}} ({{total_rating.total}})
</div>
<div id="accordion3" class="collapse" aria-labelledby="accordiongroup">
<h2 class="tab-title d-none d-md-block text-center mb-3">{{ 'Reviews' | trans({}, 'webshop', app.request.locale) | raw }}</h2>
<div class="tab-container tab-reviews">
<div id="review-list"></div>
{% if (app.user or WebshopSettings.anonimousReview) and WebshopSettings.enablereviews %}
<div class="text-center mt-3">
<a href="{{path('webshop_review', {id: Product.id})}}" class="popup btn">{{'Review plaatsen'|trans({}, 'webshop', app.request.locale)}}</a>
<br /><br />
</div>
{% endif %}
</div>
</div>
</div>
</div>
</div>
{% endif %}
{# {% if Product.relations is not empty %}
<div class="tab-pane fade" id="related" role="tabpanel" aria-labelledby="related-tab">
<div class="container">
<div class="accordion-title d-block d-md-none collapsed" data-bs-toggle="collapse" data-bs-target="#accordion4" aria-expanded="true" aria-controls="accordion4">
{{'Reviews'|trans({}, 'webshop', app.request.locale)}}
</div>
<div id="accordion4" class="collapse" aria-labelledby="accordiongroup">
<div class="tab-container">
<h2>Gerelateerd</h2>
<div id="relations" class="category-tabs">
<div class="cat-group row card">
{% for Prod in Product.relations %}
{% set prodCat = (Prod.getCategory | first) %}
<div class="product col-sm col-md-4 col-lg-4">
<div class="card">
<img class="card-img-top" src="http://via.placeholder.com/350x200" alt="Card image cap">
<div class="card-body">
<h5 class="card-title">Card title</h5>
<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>
<p class="pricing">
{% if i == 3 or i == 2 %}
<span class="price sale">€ 5.199,00</span>
<span class="price old">€ 5.899,00</span>
{% else %}
<span class="price">€ 5.199,00</span>
{% endif %}
</p>
</div>
</div>
</div>
{% endfor %}
</div>
</div>
</div>
</div>
</div>
</div>
{% endif %} #}
</div>
{% endif %}
{% if Product.type == 2 %}
<div class="container d-none d-md-block">
<ul class="nav nav-tabs" id="myTab" role="tablist" style="position:relative;">
<li class="nav-item">
<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>
</li>
</ul>
</div>
<div class="tab-content" id="myTabContent">
<div class="tab-pane fade show active" id="product" role="tabpanel" aria-labelledby="product-tab" style="{{Product.type == 1 ? 'display: none;' : ''}}">
<div class="accordion-item">
<div class="container">
<div class="accordion-title d-block d-md-none" data-bs-toggle="collapse" data-bs-target="#accordion1" aria-expanded="true" aria-controls="accordion1">
{{'Productinformatie'|trans({}, 'webshop', app.request.locale)}}
</div>
<div id="accordion1" class="collapse show" aria-labelledby="accordiongroup">
<h2 class="tab-title d-none d-md-block">{{'Productinformatie'|trans({}, 'webshop', app.request.locale)}}</h2>
<div class="tab-container">
<div id="pd-description">
{{Product.description|raw}}
</div>
</div>
</div>
<div id="accordion2" class="collapse">
<table>
{% set sf = 0 %}
{% if Product.weight %}
{% set sf = (sf + 1) %}
<tr>
<td style="padding-right:30px;">Gewicht</td>
<td>
{% if Product.weight >= 1000 %}
{{Product.weight / 1000}} Kg.
{% else %}
{{Product.weight}} g
{% endif %}
</td>
</tr>
{% endif %}
{% for spec_id, spec in specs %}
{% if spec.value is not empty and spec.hidden == false %}
{% set value = [] %}
{% for v in spec.value %}
{% if v.value %}
{% if spec.type == 'yes_no' %}
{% if v.value == 1 %}
{% set value = value|merge(['<i style="color:green;" class="fa fa-check"></i>']) %}
{% else %}
{% set value = value|merge(['<i style="color:red;" class="fa fa-times"></i>']) %}
{% endif %}
{% elseif spec.type == 'color' %}
{% 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>']) %}
{% elseif v is iterable %}
{% for v in v %}
{% if v.value %}
{% set value = value | merge([v.value]) %}
{% endif %}
{% endfor %}
{% elseif v.value is defined %}
{% set value = value | merge([v.value]) %}
{% else %}
{% endif %}
{% endif %}
{% endfor %}
{% if value is not empty %}
<tr>
<td style="padding-right:30px;">{{spec.label}}</td>
<td>
{% if spec.type == 'color' %}
{{(value|join(' '))|raw}}
{% else %}
{{(value|join(', '))|raw}}
{% endif %}
</td>
</tr>
{% set sf = (sf + 1) %}
{% endif %}
{% endif %}
{% endfor %}
{% if sf == 0 %}
<tr>
<td colspan="2">
<p>{{'Er zijn geen specificaties beschikbaar voor dit product.'|trans({}, 'webshop', app.request.locale)}}</p>
</td>
</tr>
{% endif %}
</table>
</div>
</div>
</div>
</div>
</div>
{% endif %}
</section>
{% else %}
{# New column display #}
<section class="tabs-section product-details-columns">
{% if Product.type != 2 %}
<div class="product-info" id="accordion">
<div class="container">
<div class="row">
<div class="col-12 col-lg-{{WebshopSettings.enablereviews ? '6' : '12'}}">
<div id="product">
<div class="accordion-item" id="acc-product">
<div class="accordion-title d-block d-md-none" data-bs-toggle="collapse" data-bs-target="#accordion1" aria-expanded="true" aria-controls="accordion1">
{{'Productinformatie'|trans({}, 'webshop', app.request.locale)}}
</div>
<div id="accordion1" class="collapse show" aria-labelledby="accordiongroup">
<h4 class="tab-title d-none d-md-block">{{'Productinformatie'|trans({}, 'webshop', app.request.locale)}}</h4>
<div class="tab-container">
<div id="pd-description">
{{Product.description|raw}}
</div>
</div>
</div>
</div>
</div>
<div id="specs" style="{{Product.type == 1 ? 'display: none;' : ''}}">
<div class="accordion-item" id="acc-specs">
<div class="accordion-title d-block d-md-none collapsed" data-bs-toggle="collapse" data-bs-target="#accordion2" aria-expanded="true" aria-controls="accordion2">
{{'Specificaties'|trans({}, 'webshop', app.request.locale)}}
</div>
<div id="accordion2" class="collapse" aria-labelledby="accordiongroup">
<h4 class="tab-title d-none d-md-block specs3">{{'Specificaties'|trans({}, 'webshop', app.request.locale)}}</h4>
<div class="tab-container">
<table>
{% set sf = 0 %}
{% if Product.weight %}
{% set sf = (sf + 1) %}
{% endif %}
{% for spec_id, spec in specs %}
{% if spec.value is not empty and spec.hidden == false %}
{% set value = [] %}
{% for v in spec.value %}
{% if v.value %}
{% if spec.type == 'yes_no' %}
{% if v.value == 1 %}
{% set value = value|merge(['<i style="color:green;" class="fa fa-check"></i>']) %}
{% else %}
{% set value = value|merge(['<i style="color:red;" class="fa fa-times"></i>']) %}
{% endif %}
{% elseif spec.type == 'color' %}
{% 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>']) %}
{% elseif v is iterable %}
{% for v in v %}
{% if v.value %}
{% set value = value | merge([v.value]) %}
{% endif %}
{% endfor %}
{% elseif v.value is defined %}
{% set value = value | merge([v.value]) %}
{% else %}
{% endif %}
{% endif %}
{% endfor %}
{% if value is not empty %}
<tr>
<td class="pr-3">{{spec.label}}</td>
<td>
{% if spec.type == 'color' %}
{{(value|join(' '))|raw}}
{% else %}
{{(value|join(', '))|raw}}
{% endif %}
</td>
</tr>
{% set sf = (sf + 1) %}
{% endif %}
{% endif %}
{% endfor %}
{% if sf == 0 and Product.type != 2 and (Product.sku is empty and Product.ean is empty) %}
<tr>
<td colspan="2">
<p>{{'Er zijn geen specificaties beschikbaar voor dit product.'|trans({}, 'webshop', app.request.locale)}}</p>
</td>
</tr>
{% endif %}
{% if Product.type != 2 %}
{% if Product.sku %}
<tr>
<td>{{ 'SKU' | trans({}, 'webshop', app.request.locale) | raw }}</td>
<td id="pd-sku">{{Product.sku}}</td>
</tr>
{% endif %}
{% if Product.ean %}
<tr>
<td>{{ 'EAN' | trans({}, 'webshop', app.request.locale) | raw }}</td>
<td id="pd-ean">{{Product.ean}}</td>
</tr>
{% endif %}
{% endif %}
</table>
</div>
</div>
</div>
</div>
</div>
{% if WebshopSettings.enablereviews %}
<div class="col-12 col-lg-6">
<div class="accordion-item">
<div id="reviews">
<div class="accordion-title d-block d-md-none collapsed" data-bs-toggle="collapse" data-bs-target="#accordion3" aria-expanded="true" aria-controls="accordion3">
{{'Reviews'|trans({}, 'webshop', app.request.locale)}} ({{total_rating.total}})
</div>
<div id="accordion3" class="collapse" aria-labelledby="accordiongroup">
<h4 class="tab-title d-none d-md-block mb-3">{{ 'Reviews' | trans({}, 'webshop', app.request.locale) | raw }}</h4>
<div class="tab-container tab-reviews">
<div id="review-list"></div>
{% if app.user or WebshopSettings.anonimousReview %}
<div class="text-center mt-3">
<a href="{{path('webshop_review', {id: Product.id})}}" class="popup btn">{{'Review plaatsen'|trans({}, 'webshop', app.request.locale)}}</a>
</div>
{% endif %}
</div>
</div>
</div>
</div>
</div>
{% endif %}
</div>
</div>
</div>
</div>
{% endif %}
{% if Product.type == 2 %}
<div class="container">
<div id="product">
<div class="accordion-item">
<div class="accordion-title d-block d-md-none" data-bs-toggle="collapse" data-bs-target="#accordion1" aria-expanded="true" aria-controls="accordion1">
{{'Productinformatie'|trans({}, 'webshop', app.request.locale)}}
</div>
<div id="accordion1" class="collapse show" aria-labelledby="accordiongroup">
<h4 class="tab-title d-none d-md-block">{{'Productinformatie'|trans({}, 'webshop', app.request.locale)}}</h4>
<div class="tab-container">
<div id="pd-description">
{{Product.description|raw}}
</div>
</div>
</div>
</div>
</div>
{# <div id="specs">
<div class="accordion-item">
<div class="accordion-title d-block d-md-none collapsed" data-bs-toggle="collapse" data-bs-target="#accordion2" aria-expanded="true" aria-controls="accordion2">
{{'Specificaties'|trans({}, 'webshop', app.request.locale)}}
</div>
<div id="accordion2" class="collapse" aria-labelledby="accordiongroup">
<h4 class="tab-title d-none d-md-block specs1">{{'Specificaties'|trans({}, 'webshop', app.request.locale)}}</h4>
<div class="tab-container">
{% if specs is not empty %}
<table>
{% set sf = 0 %}
{% if Product.weight %}
{% set sf = (sf + 1) %}
<tr>
<td style="padding-right:30px;">Gewicht</td>
<td>
{% if Product.weight >= 1000 %}
{{Product.weight / 1000}} Kg.
{% else %}
{{Product.weight}} g
{% endif %}
</td>
</tr>
{% endif %}
{% for spec_id, spec in specs %}
{% if spec.value is not empty and spec.hidden == false %}
{% set value = [] %}
{% for v in spec.value %}
{% if v.value %}
{% if spec.type == 'yes_no' %}
{% if v.value == 1 %}
{% set value = value|merge(['<i style="color:green;" class="fa fa-check"></i>']) %}
{% else %}
{% set value = value|merge(['<i style="color:red;" class="fa fa-times"></i>']) %}
{% endif %}
{% elseif spec.type == 'color' %}
{% 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>']) %}
{% elseif v is iterable %}
{% for v in v %}
{% if v.value %}
{% set value = value | merge([v.value]) %}
{% endif %}
{% endfor %}
{% elseif v.value is defined %}
{% set value = value | merge([v.value]) %}
{% else %}
{% endif %}
{% endif %}
{% endfor %}
{% if value is not empty %}
<tr>
<td style="padding-right:30px;">{{spec.label}}</td>
<td>
{% if spec.type == 'color' %}
{{(value|join(' '))|raw}}
{% else %}
{{(value|join(', '))|raw}}
{% endif %}
</td>
</tr>
{% set sf = (sf + 1) %}
{% endif %}
{% endif %}
{% endfor %}
{% if sf == 0 %}
<p>{{'Er zijn geen specificaties beschikbaar voor dit product.'|trans({}, 'webshop', app.request.locale)}}</p>
{% endif %}
</table>
{% endif %}
</div>
</div>
</div>
</div> #}
</div>
{% endif %}
</section>
{% endif %}
{% set realOriginalProduct = Product %}
{% if Product.relations is not empty %}
{% set hasRelations = false %}
{% for Product in Product.relations %}
{% if Product %}
{% if Product.visible and Product.enabled %}
{# Product is visible and enabled #}
{% if Product.type == 0 or Product.type > 2 %}
{# Not dynamic #}
{% if Product.stock %}
{# Stock management #}
{% if (Product.stockAmount - Product.outOfStockQuantity) >= 1 or Product.visibleNoStock == true %}
{# Stock above 1 or show always when no stock #}
{% set hasRelations = true %}
{% endif %}
{% else %}
{# No stock management #}
{% set hasRelations = true %}
{% endif %}
{% else %}
{% if Product.type == 1 or Product.type == 2 %}
{# Dynamic #}
{% if Product.childStockAmount > 0 %}
{# One or more childs have stock #}
{% set hasRelations = true %}
{% endif %}
{% endif %}
{% endif %}
{% endif %}
{% endif %}
{% endfor %}
{% if hasRelations %}
<section class="related-products {% if recipes|length > 0 %}nobottompadding{% endif %}">
<div class="container">
<div class="introblock">
<div class="introtitle">{{ 'Gerelateerde producten' | trans }}</div>
</div>
<div id="relations" class="category">
<div class="webshop-bundle webshop-widget">
<div class="swiper-content">
<div class="swiper-container swiper-products">
<div class="swiper-wrapper">
{% for Product in Product.relations %}
{% set prodCat = (Product.getCategory.first) %}
{% if Product %}
{% set canShow = false %}
{% if Product.visible and Product.enabled %}
{# Product is visible and enabled #}
{% if Product.type == 0 or Product.type > 2 %}
{# Not dynamic #}
{% if Product.stock %}
{# Stock management #}
{% if (Product.stockAmount - Product.outOfStockQuantity) >= 1 or Product.visibleNoStock == true %}
{# Stock above 1 or show always when no stock #}
{% set canShow = true %}
{% endif %}
{% else %}
{# No stock management #}
{% set canShow = true %}
{% endif %}
{% else %}
{% if Product.type == 1 or Product.type == 2 %}
{# Dynamic #}
{% if Product.childStockAmount > 0 %}
{# One or more childs have stock #}
{% set canShow = true %}
{% endif %}
{% endif %}
{% endif %}
{% endif %}
{% if canShow %}
{% set OriginalProduct = Product %}
{% if Product.type == 1 %}
{% set Product = Product.linkedProducts.first %}
{% endif %}
<div class="swiper-slide">
<div class="product">
{% include '@TrinityWebshop/elements/productCard.html.twig' %}
</div>
</div>
{% endif %}
{% endif %}
{% endfor %}
</div>
<div class="swiper-pagination d-md-none"></div>
<div class="swiper-button-prev d-none d-md-block"></div>
<div class="swiper-button-next d-none d-md-block"></div>
</div>
</div>
</div>
</div>
</div>
</section>
{% endif %}
{% endif %}
{% if WebshopSettings.showRecentlyViewed and productHistoryObjects is not empty %}
{% set catFix = true %}
<section class="product-history">
<div class="container">
<div class="introblock">
<div class="introtitle">{{'Eerder bekeken producten'|trans({}, 'webshop', app.request.locale)|raw}}</div>
</div>
<div class="webshop-bundle webshop-widget">
<div class="swiper-content">
<div class="swiper-container swiper-products">
<div class="swiper-wrapper">
{% for Product in productHistoryObjects %}
{% if Product %}
{% set canShow = false %}
{% if Product.visible and Product.enabled %}
{# Product is visible and enabled #}
{% if Product.type == 0 or Product.type > 2 %}
{# Not dynamic #}
{% if Product.stock %}
{# Stock management #}
{% if (Product.stockAmount - Product.outOfStockQuantity) >= 1 or Product.visibleNoStock == true %}
{# Stock above 1 or show always when no stock #}
{% set canShow = true %}
{% endif %}
{% else %}
{# No stock management #}
{% set canShow = true %}
{% endif %}
{% else %}
{% if Product.type == 1 or Product.type == 2 %}
{# Dynamic #}
{% if Product.childStockAmount > 0 %}
{# One or more childs have stock #}
{% set canShow = true %}
{% endif %}
{% endif %}
{% endif %}
{% endif %}
{% if canShow %}
{% set OriginalProduct = Product %}
{% if Product.type == 1 %}
{% set Product = Product.linkedProducts.first %}
{% endif %}
<div class="swiper-slide">
<div class="product">
{% include '@TrinityWebshop/elements/productCard.html.twig' %}
</div>
</div>
{% endif %}
{% endif %}
{% endfor %}
</div>
<div class="swiper-pagination d-md-none"></div>
<div class="swiper-button-prev d-none d-md-block"></div>
<div class="swiper-button-next d-none d-md-block"></div>
</div>
</div>
</div>
</div>
</section>
{% endif %}
{% if recipes|length > 0 and RecipesPage is defined and RecipesPage is not empty %}
<section class="blog recipe-bundle related-recipes recipe-overview">
<div class="container">
<div class="introblock">
<div class="introtitle">{{'Gerelateerde recepten'|trans({}, 'webshop', app.request.locale)}}</div>
</div>
<div class="row slider-wrapper">
{% for Recipe in recipes %}
<div class="col-12 col-md-6 col-lg-4">
<div class="item card">
{# <a href="{{path(app.request.attributes.get('_route'))}}/{{Recipe.slug}}"> #}
<a href="{{path(RecipesPage.slugkey)}}/{{Recipe.slug}}">
<div class="thumb">
<div class="lcp image">
{% if Recipe.media.first.hasBlurred %}
<picture>
{% if Recipe.media.first.hasWebp() %}
<source srcset="/{{Recipe.media.first.getBlurredWebpPath('small')}}" type="image/webp">
{% endif %}
<source srcset="/{{Recipe.media.first.getBlurredWebPath('small')}}" type="{{Recipe.media.first.mime}}">
<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}}">
</picture>
{% endif %}
<picture>
{% if Recipe.media.first.hasWebp() %}
<source srcset="/{{Recipe.media.first.getWebpPath('medium')}}" type="image/webp">
{% endif %}
<source srcset="/{{Recipe.media.first.getWebPath('medium')}}" type="{{ Recipe.media.first.mime }}">
<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;">
</picture>
</div>
</div>
<div class="content">
<h3>{{Recipe.label}}</h3>
</div>
</a>
</div>
</div>
{% endfor %}
</div>
<div class="btns text-center">
<a href="/meer/recepten" class="btn">Meer recepten <i class="fa fa-arrow-right"></i></a>
</div>
</div>
</section>
{% endif %}
{% if realOriginalProduct.upSell.count %}
<section class="additional-products">
<div class="container">
<div class="introblock">
<div class="introtitle">{{'Vergelijkbare producten'|trans({}, 'webshop', app.request.locale)}}</div>
</div>
<div class="webshop-bundle webshop-widget">
<div class="swiper-content">
<div class="swiper-container swiper-products">
<div class="swiper-wrapper">
{% set hideBlock = true %}
{% for Product in realOriginalProduct.upSell %}
{% set canShow = false %}
{% if Product.visible and Product.enabled %}
{# Product is visible and enabled #}
{% if Product.type == 0 or Product.type > 2 %}
{# Not dynamic #}
{% if Product.stock %}
{# Stock management #}
{% if (Product.stockAmount - Product.outOfStockQuantity) >= 1 or Product.visibleNoStock == true %}
{# Stock above 1 or show always when no stock #}
{% set canShow = true %}
{% endif %}
{% else %}
{# No stock management #}
{% set canShow = true %}
{% endif %}
{% else %}
{% if Product.type == 1 or Product.type == 2 %}
{# Dynamic #}
{% if Product.childStockAmount > 0 %}
{# One or more childs have stock #}
{% set canShow = true %}
{% endif %}
{% endif %}
{% endif %}
{% endif %}
{% if canShow %}
{% set hideBlock = false %}
{% set OriginalProduct = Product %}
{% set Category = Product.category.first %}
{% set hide_intro = true %}
<div class="swiper-slide">
<div class="product">
{% include '@TrinityWebshop/elements/productCard.html.twig' %}
</div>
</div>
{% endif %}
{% endfor %}
</div>
<div class="swiper-pagination d-md-none"></div>
<div class="swiper-button-prev d-none d-md-block"></div>
<div class="swiper-button-next d-none d-md-block"></div>
</div>
</div>
</div>
</div>
</section>
{% if hideBlock %}
<script>
$(function() {
$('.additional-products').hide();
});
</script>
{% endif %}
{% endif %}
</div>
{% endif %}
<script type="text/javascript">
var xhr = new XMLHttpRequest();
xhr.onreadystatechange = function (r) {
if (xhr.readyState !== 4) return;
if (xhr.status >= 200 && xhr.status < 300) {
let buttons = document.querySelectorAll('.add-to-list');
if(JSON.parse(xhr.response).logged_in){
for(let i = 0; i < buttons.length; i++){
buttons[i].classList.remove('d-none');
}
}
}
};
xhr.open('GET', '{{path('nav_account')}}');
xhr.send();
var baseUrl = '{{path('homepage')}}';
var cart_url = '{{path('cart')}}';
var product_id = '{{ Product.id }}';
var product_price = '{{ Product.realPriceIncl }}';
var product_label = '{{ Product.label }}';
</script>
{% endblock %}