{% sw_extends '@Storefront/storefront/page/product-detail/buy-widget.html.twig' %}
{% block page_product_detail_price %}
{% if context.customer is not null %}
<div class="product-detail-price-container">
{% if config('EmzEfbExtension.config.freightProductPropertyGroup') %}
{% set hasMatchingGroupId = false %}
{% for element in page.product.properties.elements %}
{% if element.groupId == config('EmzEfbExtension.config.freightProductPropertyGroup') %}
{% set hasMatchingGroupId = true %}
{% break %}
{% endif %}
{% endfor %}
{% if hasMatchingGroupId %}
{% sw_include '@Storefront/storefront/utilities/alert.html.twig' with {
type: 'info',
content: "freightInfo.alert"|trans|sw_sanitize
} %}
{% endif %}
{% endif %}
{% sw_include '@Storefront/storefront/page/product-detail/buy-widget-price.html.twig' %}
</div>
{% endif %}
{% endblock %}
{% block page_product_detail_tax %}
{% if context.customer is not null %}
{{ parent() }}
{% if context.salesChannel.customFields.custom_fields_sales_channel_pack_unit_info %}
{% set catId = context.salesChannel.customFields.custom_fields_sales_channel_pack_unit_info %}
{% set packUnitText = "detail.packUnitInfoLabel"|trans|sw_sanitize %}
<div class="product-detail-pack-unit-info-container">
<p class="product-detail-pack-unit-info">
<a class="product-detail-pack-unit-info-link"
href="{{ path('frontend.cms.page',{ id: catId }) }}"
title="{{ packUnitText }}"
data-toggle="modal"
data-url="{{ path('frontend.cms.page',{ id: catId }) }}">
{{ packUnitText }}
</a>
</p>
</div>
{% endif %}
{% endif %}
{% endblock %}
{% block page_product_detail_delivery_informations %}
{% if context.customer is not null %}
{% set stockInfo = decodeStockInfo(page.product, context) %}
{% if stockInfo and stockInfo.stock is defined %}
<div class="product-detail-delivery-information">
<div class="product-detail-delivery-information-stock">
{% if stockInfo.stock > 0 %}
<span class="delivery-status-indicator bg-success"></span>
{% elseif stockInfo.restock is not empty or stockInfo.reorder %}
<span class="delivery-status-indicator bg-warning"></span>
{% else %}
<span class="delivery-status-indicator bg-danger"></span>
{% endif %}
{% if stockInfo.stock > 0 %}
{% if stockInfo.stock > 1000 %}
{{ "detail.inStock"|trans({'%stock%': '1000+'})|sw_sanitize }}
{% else %}
{{ "detail.inStock"|trans({'%stock%': stockInfo.stock})|sw_sanitize }}
{% endif %}
{% else %}
{{ "detail.noStock"|trans|sw_sanitize }}
{% endif %}
</div>
{% if stockInfo.restock is defined and stockInfo.restock is iterable and stockInfo.restock|length > 0 %}
<div class="product-detail-delivery-information-restock">
<span class="product-detail-delivery-information-restock-info">
{{ "detail.restockAvailable"|trans|sw_sanitize }}
</span>
{% for cw, amount in stockInfo.restock %}
<span class="product-detail-delivery-information-restock-item">
{{ "detail.restock"|trans({'%cw%': cw, '%amount%': amount})|sw_sanitize }}
</span>
{% endfor %}
</div>
{% endif %}
{% if stockInfo.reorder %}
<div class="product-detail-delivery-information-reorder">
{{ "detail.reorder"|trans({'%cw%': stockInfo.reorder})|sw_sanitize }}
</div>
{% endif %}
</div>
{% else %}
{{ parent() }}
{% endif %}
{% endif %}
{% endblock %}
{% block page_product_detail_configurator_include %}
{% set configuratorSettings = []|merge(page.configuratorSettings|filter(setting => setting.translated.name is not same as('fallback_model'))) %}
{% if page.product.parentId and configuratorSettings|length > 0 %}
<div class="product-detail-configurator-container">
{% sw_include '@Storefront/storefront/page/product-detail/configurator.html.twig' %}
</div>
{% endif %}
{% endblock %}
{% block page_product_detail_data %}
{{ parent() }}
{% if page.product.translated.name %}
<div class="product-detail-full-name-container">
<span class="product-detail-full-name">
{{ page.product.translated.name }}
</span>
</div>
{% endif %}
{% if page.product.productNumber %}
<div class="product-detail-ordernumber-container">
<span class="product-detail-ordernumber-label">
{{ "detail.productNumberLabel"|trans|sw_sanitize }}
</span>
<meta itemprop="productID"
content="{{ page.product.id }}"/>
<span class="product-detail-ordernumber"
itemprop="sku">
{{ page.product.productNumber }}
</span>
</div>
{% endif %}
{% if page.product.ean %}
<div class="product-detail-ean-container">
<span class="product-detail-ean-label">
{{ "detail.productEanLabel"|trans|sw_sanitize }}
</span>
<span class="product-detail-ean">
{{ page.product.ean }}
</span>
</div>
{% endif %}
{% endblock %}
{% block page_product_detail_ordernumber_container %}
{% endblock %}
{% block page_product_detail_add_to_compare_button %}
{% endblock %}
{% block page_product_detail_tax_link %}
{{ taxText }}
{% endblock %}