{% sw_extends '@Storefront/storefront/page/product-detail/buy-widget-form.html.twig' %}
{% block page_product_detail_buy_quantity_container %}
<div class="col-auto">
{% set selectQuantityThreshold = 100 %}
{% block page_product_detail_buy_quantity %}
{{ parent() }}
{% endblock %}
</div>
{% endblock %}
{% block page_product_detail_buy_button_container %}
<div class="col">
{% block page_product_detail_buy_button %}
{% if product.translated.customFields.migration_DonMigrate_product_set_sale_only %}
<button class="btn btn-primary btn-block btn-buy disabled"
disabled
type="button">
{{ "productDetail.setOnlyAvailable"|trans|sw_sanitize }}
</button>
{% else %}
{{ parent() }}
{% endif %}
{% endblock %}
</div>
{% endblock %}
{% block page_product_detail_buy_quantity_select %}
<select name="lineItems[{{ product.id }}][quantity]"
class="{{ formSelectClass }} product-detail-quantity-select">
{% for quantity in range(product.minPurchase, product.calculatedMaxPurchase, product.purchaseSteps) %}
<option value="{{ quantity }}">
{{ quantity }}
</option>
{% endfor %}
</select>
{% endblock %}
{# Full width Paypal button #}
{% block page_product_detail_buy_container_paypal %}
{% if buyable and product.calculatedCheapestPrice.totalPrice > 0 and product.extensions[constant('Swag\\PayPal\\Checkout\\Cart\\Service\\ExcludedProductValidator::PRODUCT_EXCLUDED_FOR_PAYPAL')] is null %}
{% set expressSettings = page.extensions[constant('Swag\\PayPal\\Checkout\\ExpressCheckout\\ExpressCheckoutSubscriber::PAYPAL_EXPRESS_CHECKOUT_BUTTON_DATA_EXTENSION_ID')] %}
{#
{% if expressSettings.productDetailEnabled %}
<div class="form-row mt-3 justify-content-end">
{% sw_include '@SwagPayPal/storefront/component/ecs-spb-checkout/ecs-button.html.twig' with {button_class: 'col-12'} %}
</div>
{% endif %}
#}
{% endif %}
{# @var \Swag\PayPal\Installment\Banner\BannerData installmentBanner #}
{% set installmentBanner = page.extensions[constant('Swag\\PayPal\\Installment\\Banner\\InstallmentBannerSubscriber::PAYPAL_INSTALLMENT_BANNER_DATA_EXTENSION_ID')] %}
{% if installmentBanner is not null %}
<div class="form-row mt-3 mb-4 justify-content-end">
<div class="col-12"
data-swag-paypal-installment-banner="true"
data-swag-pay-pal-installment-banner-options="{{ installmentBanner|json_encode }}">
</div>
</div>
{% endif %}
{% endblock %}