{% set formAction = path('frontend.checkout.line-item.add') %} {% block buy_widget_buy_form_inner %}
{% set DOWNLOAD_STATE = constant('Shopware\\Core\\Content\\Product\\State::IS_DOWNLOAD') %} {% set showQuantitySelect = not product.states is defined or DOWNLOAD_STATE not in product.states or (DOWNLOAD_STATE in product.states and product.maxPurchase !== 1) %} {% set buyable = product.available and product.childCount <= 0 and product.calculatedMaxPurchase > 0 %} {% block buy_widget_buy_container %} {% if buyable %}
{% block buy_widget_buy_quantity_container %} {% if showQuantitySelect %}
{% block buy_widget_buy_quantity_input_group %} {{ 'component.product.quantitySelect.legend'|trans|striptags }}
{% if product.translated.packUnit %} {% if product.minPurchase > 1 and product.translated.packUnitPlural %} {{ product.translated.packUnitPlural }} {% elseif product.translated.packUnit %} {{ product.translated.packUnit }} {% endif %} {% endif %}
{# Aria live region to tell the screen reader what quantity amount is selected when changing the quantity. #} {% block buy_widget_buy_quantity_live_area %}
{# The live region content is generated by the `QuantitySelectorPlugin` #}
{% endblock %} {% endblock %}
{% endif %} {% endblock %} {% block buy_widget_buy_redirect_input %} {# fallback redirect back to detail page is deactivated via js #} {% endblock %} {% block buy_widget_buy_product_buy_info %} {% endblock %} {% block buy_widget_product_buy_meta %} {% endblock %} {% block buy_widget_buy_button_container %}
{% block buy_widget_buy_button %}
{% endblock %}
{% endblock %}
{% endif %} {% endblock %}
{% endblock %}