{% sw_extends '@Storefront/storefront/page/product-detail/buy-widget-form.html.twig' %}
{% block page_product_detail_buy_button_container %}
<div class="col-md-8">
{% block page_product_detail_buy_button %}
{% if context.customer %}
<button class="btn btn-primary btn-block btn-buy"
title="{% if context.customer is not null %}{{ "detail.addProduct"|trans|striptags }}{% else %}{{ "detail.addProductDisabled" }}{% endif %}"
aria-label="{{ "detail.addProduct"|trans|striptags }}"
{% if context.customer is null %}disabled{% endif %}
>
{{ "detail.addProduct"|trans|sw_sanitize }}
</button>
{% else %}
<a class="btn btn-primary btn-block"
href="{{ path('frontend.account.login.page') }}"
title="{{ "account.orRegisterLink"|trans|striptags }}"
>
{{ "detail.loginRequired"|trans|sw_sanitize }}
</a>
{% endif %}
{% endblock %}
</div>
{% endblock %}
{% block page_product_detail_buy_container %}
{% if not context.customer %}
<div class="mt-2">
{% sw_include '@Storefront/storefront/utilities/alert.html.twig' with {
type: "info",
content: "detail.loginRequiredAlert"|trans|sw_sanitize
} %}
</div>
{% endif %}
{{ parent() }}
{% endblock %}
{% block page_product_detail_buy_product_buy_info %}
<input type="hidden"
name="lineItems[{{ product.id }}][unit_id]"
value="{{ product.unit.id }}">
{{ parent() }}
{% endblock %}