{% sw_extends '@Storefront/storefront/component/buy-widget/buy-widget.html.twig' %}
{% set product = page.product %}
{% block buy_widget %}
<div class="row align-items-center product-detail-headline">
{% sw_include '@Storefront/storefront/page/product-detail/headline.html.twig' %}
</div>
{{ parent() }}
{% endblock %}
{% block buy_widget_data %}
{{ parent() }}
{% if product.translated.customFields.migration_kewsw5_product_attr4 %}
<div class="product-detail-delivery-information">
{{ product.translated.customFields.migration_kewsw5_product_attr4|raw }}
</div>
{% endif %}
{% endblock %}
{% block buy_widget_tax_link %}
{% set price = product.calculatedPrice %}
{% if product.translated.customFields.migration_kewsw5_product_free_shipping_costs or price.unitPrice > 50 %}
{% set taxText = "lds.detail.shippingFree"|trans|sw_sanitize %}
{% endif %}
<a class="product-detail-tax-link" href="{{ path('frontend.cms.page',{ id: config('core.basicInformation.shippingPaymentInfoPage') }) }}" title="{{ taxText }}" {{ dataBsToggleAttr }}="modal" data-url="{{ path('frontend.cms.page',{ id: config('core.basicInformation.shippingPaymentInfoPage') }) }}">
{{ taxText }}
</a>
{% endblock %}
{% block buy_widget_ordernumber_container %}
{{parent()}}
{% set lineItems = context.extensions.promotions.lineItems %}
{% for lineItem in lineItems %}
{% if lineItem.type == 'promotion' %}
{% set Promotion = context.extensions.promotions.data.elements['promotions-code'].automaticPromotions[lineItem.id] %}
{% if Promotion %}
{% if Promotion.customFields.custom_promotion_productdetail_active %}
<br>
{% sw_include '@Storefront/storefront/utilities/alert.html.twig' with {
type: "success",
icon: "sale",
content: Promotion.customFields.custom_promotion_description|sw_sanitize
} %}
{% endif %}
{% endif %}
{% endif %}
{% endfor %}
{% endblock %}