{% sw_extends '@Storefront/storefront/component/buy-widget/buy-widget.html.twig' %}
{% block buy_widget_price %}
{% if context.customer %}
{{ parent() }}
{% endif %}
{% endblock %}
{% block buy_widget_tax %}
{% if context.customer %}
{{ parent() }}
{% endif %}
{% endblock %}
{% block buy_widget_tax_link %}
{% set pickupOnly = context.customer.customFields.custom_sap_pickup %}
{% set freeShippingThreshold = pickupOnly ? 0 : context.context.extensions.deliveryInformations['freeShippingThreshold'] %}
{% if freeShippingThreshold > 0 %}
<div class="product-detail-delivery-costs-container">
<p class="product-detail-delivery-costs">
<a class="product-detail-delivery-costs-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') }) }}">
{{ "proc.productDetail.freeShippingThreshold"|trans({
'%freeShippingThreshold%' : context.context.extensions.deliveryInformations['freeShippingThreshold']|floatval|currency
})|raw}}
</a>
</p>
</div>
{% elseif pickupOnly %}
{{ "proc.productDetail.taxInfo"|trans }}
{% else %}
{{ parent() }}
{% endif %}
{% endblock %}