{% sw_extends '@Storefront/storefront/page/product-detail/index.html.twig' %}
{% block base_head %}
{% sw_include '@Storefront/storefront/page/product-detail/meta.html.twig' %}
{% endblock %}
{% block base_content %}
{% block page_product_detail %}
<div class="product-detail"
itemscope
itemtype="https://schema.org/Product">
<div class="container">
{% block page_product_detail_inner %}
{% block page_product_detail_headline %}
<div class="product-detail-headline row">
{% sw_include '@Storefront/storefront/page/product-detail/headline.html.twig' %}
{% set mediaURL = page.product.manufacturer.media.url %}
{% if mediaURL %}
<div class="product-detail-brand-image col-5 col-sm-3">
<img src="{{ mediaURL }}" alt="brand image">
</div>
{% endif %}
</div>
{% endblock %}
{% block page_product_detail_content %}
<div class="product-detail-content">
{% set mediaItems = page.product.media.media %}
{% block page_product_detail_main %}
<div class="row product-detail-main">
{% block page_product_detail_media %}
<div class="col-lg-8 product-detail-media">
{% if page.product.media %}
<div class="desktop-gallery">
{% sw_include '@Storefront/storefront/page/product-detail/image-gallery.html.twig' with {
'mediaItems': mediaItems,
'isProduct': true,
'fallbackImageTitle': page.product.translated.name,
} %}
</div>
<div class="mobile-gallery">
{% sw_include '@Storefront/storefront/element/cms-element-image-gallery.html.twig' with {
'mediaItems': mediaItems,
'zoomModal': true,
'isProduct': true,
'isGridLayout': true,
'fallbackImageTitle': page.product.translated.name,
} %}
</div>
{% endif %}
</div>
{% endblock %}
{% block page_product_detail_buy %}
<div class="col-lg-4 product-detail-buy">
<div class="product-detail-content">
{% block page_product_detail_description %}
{% if "Godkendelse" in page.product.customFields|keys %}
<p class="product-detail-approval ">{{ "product.detail.approvalLabel"|trans|sw_sanitize }}
<span class="product-variant-characteristics-option text-black-50">
{{ page.product.customFields["Godkendelse"] }}
</span>
</p>
{% endif %}
{% sw_include '@Storefront/storefront/page/product-detail/description.html.twig' %}
{% endblock %}
<div class="product-buy-widget-wrapper">
{% if context.customer %}
{# condition to show the netPrice label only if the product is not on sale #}
{% if page.product.calculatedPrice.listPrice is null %}
<p class="product-netPrice-badge product-netPrice-badge--detail">{{ "product.detail.netPriceLabel"|trans|striptags }}</p>
{% endif %}
{% endif %}
{% sw_include '@Storefront/storefront/page/product-detail/buy-widget.html.twig' %}
</div>
<div class="product-detail-features">
{% sw_include '@bjerregaard-theme/storefront/page/product-detail/properties.html.twig' %}
</div>
<div class="product-detail-property-wrapper row">
<p class="col-12 text-black font-weight-bold">{{ "product.detail.propertiesLabel"|trans|sw_sanitize }}</p>
{% set properties = page.product.sortedProperties %}
{% for property in properties %}
{% if property.translated.name|e == "Egenskaber" %}
{% for option in property.options %}
<div class="product-detail-property col-6">
{% sw_icon "checkmark-circle" %}
<span>{{ option.translated.name|e }}</span>
</div>
{% endfor %}
{% endif %}
{% endfor %}
</div>
{% set productDatasheet = page.product.customFields.datasheet %}
{% set productDatasheetENG = page.product.customFields.datasheeten %}
{% set mediaCollection = searchMedia([productDatasheet, productDatasheetENG], context.context) %}
<div class="product-detail-datasheet-wrapper">
{% if productDatasheet %}
<div class="product-detail-datasheet-container">
<a href="{{ mediaCollection.get(productDatasheet).url }}" target="_blank" class="product-detail-datasheet-link">
<p class="product-detail-datasheet__text"><span class="product-detail-datasheet__label">{{ "product.detail.datasheetLabel"|trans }}</span>{% sw_icon 'arrow-down' %}</p>
</a>
</div>
{% endif %}
{% if productDatasheetENG %}
<div class="product-detail-datasheet-container">
<a href="{{ mediaCollection.get(productDatasheetENG).url }}" target="_blank" class="product-detail-datasheet-link">
<p class="product-detail-datasheet__text"><span class="product-detail-datasheet__label">{{ "product.detail.datasheetLabelENG"|trans }}</span>{% sw_icon 'arrow-down' %}</p>
</a>
</div>
{% endif %}
</div>
</div>
{% endblock %}
</div>
{% endblock %}
</div>
<div class="product-detail-video-container col-lg-8 col-md-12 col-sm-12" id="video-link-container">
{% if page.product.customFields['VideoLink'] matches '{(?:[?&]v=|\/embed\/|\/1\/|\/v\/|https:\/\/(?:www\.)?youtu\.be\/)([^&\n?#]+)}' %}
<div style="display:none" id="videolink" data-link="{{ page.product.customFields['VideoLink'] }}"></div>
<iframe data-video-frame width="100%" height="600px" style="display:none;"
src="" id="videoIframe">
</iframe>
{% endif %}
{% if videoLink %}
{% endif %}
</div>
{% endblock %}
{% block page_product_detail_cross_selling %}
{% if page.crossSellings.elements is defined and page.crossSellings.elements|filter(item => item.total > 0)|length > 0 %}
<div class="product-detail-tabs product-detail-cross-selling">
{% sw_include '@Storefront/storefront/page/product-detail/cross-selling/tabs.html.twig' with {
crossSellings: page.crossSellings
} %}
</div>
{% endif %}
{% endblock %}
{% endblock %}
</div>
</div>
{% endblock %}
</div>
{% endblock %}