{% sw_extends '@Storefront/storefront/page/product-detail/index.html.twig' %}
{% block base_main %}
{% set categoryColor = "" %}
{% for item in page.header.navigation.tree %}
{% if item.category.uniqueIdentifier in page.product.categoryTree and item.category.uniqueIdentifier != 'a7c5001cdb8d4ad99479e16ce2f1b97b' and item.category.childCount == 0 %}
{% set categoryColor = item.category.translated.customFields.custom_category_info_color %}
{% endif %}
{# is in subcategory #}
{% if item.category.childCount > 0 %}
{% set child = item.children %}
{% for item in child %}
{% if item.category.uniqueIdentifier in page.product.categoryTree and item.category.uniqueIdentifier != 'a7c5001cdb8d4ad99479e16ce2f1b97b' %}
{% set categoryColor = item.category.translated.customFields.custom_category_info_color %}
{% endif %}
{% endfor %}
{% endif %}
{% endfor %}
<div class="product-detail-hero-banner" style="--category-color: {{ categoryColor }};"></div>
{{ parent() }}
<div class="modal fade pricelist-modal"
id="pricelistModal"
tabindex="-1"
role="dialog">
<div class="modal-dialog modal-lg modal-dialog-scrollable modal-dialog-centered"
role="document">
<div class="modal-content">
<div class="modal-header">
<div class="modal-title h5">
Preisliste
</div>
<button type="button"
class="modal-close close"
data-dismiss="modal"
aria-label="Close">
<span aria-hidden="true">
{% sw_icon 'x' style { 'size': 'sm' } %}
</span>
</button>
</div>
<div class="modal-body">
{% for price in page.product.calculatedPrices %}
<div class="product-block-prices-row"
itemprop="offers" itemscope
data-quantity="{{ price.quantity }}"
itemtype="https://schema.org/Offer">
<div class="product-block-prices-cell product-block-prices-cell-thin">
<meta itemprop="priceCurrency" content="{{ page.header.activeCurrency.translated.shortName }}" />
<meta itemprop="price" content="{{ price.unitPrice }}" />
<link itemprop="availability" href="https://schema.org/InStock" />
{% if loop.last %}
<span class="product-block-prices-quantity"> {{ "detail.priceDataInfoFrom"|trans|sw_sanitize }} {{ price.quantity }} {{ "detail.bodymed.quantity"|trans|sw_sanitize }}</span>
{% else %}
<span class="product-block-prices-quantity">{{ "detail.priceDataInfoUntil"|trans|sw_sanitize }} {{ price.quantity }} {{ "detail.bodymed.quantity"|trans|sw_sanitize }}</span>
{% endif %}
</div>
<div class="product-block-prices-cell">
{% sw_include '@Storefront/storefront/component/product/block-price.html.twig' with {
price: price
} only %}
</div>
{% if price.referencePrice is not null %}
<div class="product-block-prices-cell product-block-prices-cell-thin">
{{ price.referencePrice.price|currency }}{{ "general.star"|trans|sw_sanitize }} / {{ price.referencePrice.referenceUnit }} {{ price.referencePrice.unitName }}
</div>
{% endif %}
</div>
{% endfor %}
</div>
</div>
</div>
</div>
</div>
{% endblock %}
{% block page_product_detail_media %}
<div class="col-lg-7 product-detail-media" style="--category-color: {{ categoryColor }};">
{% sw_include '@Storefront/storefront/page/product-detail/badges.html.twig' %}
{% if page.product.media %}
{% sw_include '@Storefront/storefront/element/cms-element-image-gallery.html.twig' with {
'mediaItems': mediaItems,
'zoom': true,
'zoomModal': true,
'displayMode': 'contain',
'gutter': 5,
'minHeight': '500px',
'navigationArrows': 'inside',
'navigationDots': 'inside',
'galleryPosition': 'left',
'isProduct': true,
'fallbackImageTitle': page.product.translated.name,
'startIndexThumbnails': page.product.cover.position + 1,
'startIndexSlider': page.product.cover.position + 1
} %}
{% endif %}
<div class="row no-gutters product-detail-highlight-row">
<div class="col-auto product-detail-highlighted-properties-col">
{% sw_include '@Storefront/storefront/page/product-detail/highlighted-properties.html.twig' %}
</div>
<div class="col-auto product-detail-bbd-col">
{# @todo: MHD nur für Partner #}
{% if page.product.translated.customFields.custom_product_configuration_mhd %}
<div class="product-detail-bbd">
{{ "detail.productMHD"|trans }} {{ page.product.translated.customFields.custom_product_configuration_mhd|date("m/Y") }}
</div>
{% endif %}
</div>
</div>
</div>
{% endblock %}
{% block page_product_detail_buy %}
<div class="col-lg-5 product-detail-buy" style="--category-color: {{ categoryColor }};">
{% sw_include '@Storefront/storefront/page/product-detail/buy-widget.html.twig' %}
</div>
{% endblock %}
{% block page_product_detail_tabs %}
{% endblock %}
{% block page_product_detail_cross_selling %}
{% if page.product.extensions.webinarProduct %}
<div class="detail-webinar-product">
{% sw_include '@Storefront/storefront/page/product-detail/webinar-product.html.twig' %}
</div>
{% endif %}
{{ parent() }}
{#{% if is_mykey_product(page.product) %}
{% if is_mykey_available() %}
mykey available
{% endif %}
{% if is_mykey_allowed(page.product) %}
mykey allowed
{% endif %}
{% endif %}#}
{% endblock %}