custom/plugins/theme/src/Resources/views/storefront/page/product-detail/buy-widget-form.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/page/product-detail/buy-widget-form.html.twig' %}
  2. {% block page_product_detail_buy_quantity_container %}
  3.     <div class="col-auto">
  4.         {% set selectQuantityThreshold = 100 %}
  5.         {% block page_product_detail_buy_quantity %}
  6.             {{ parent() }}
  7.         {% endblock %}
  8.     </div>
  9. {% endblock %}
  10. {% block page_product_detail_buy_button_container %}
  11.     <div class="col">
  12.         {% block page_product_detail_buy_button %}
  13.             {% if product.translated.customFields.migration_DonMigrate_product_set_sale_only %}
  14.                 <button class="btn btn-primary btn-block btn-buy disabled"
  15.                         disabled
  16.                         type="button">
  17.                     {{ "productDetail.setOnlyAvailable"|trans|sw_sanitize }}
  18.                 </button>
  19.             {% else %}
  20.                 {{ parent() }}
  21.             {% endif %}
  22.         {% endblock %}
  23.     </div>
  24. {% endblock %}
  25. {% block page_product_detail_buy_quantity_select %}
  26.     <select name="lineItems[{{ product.id }}][quantity]"
  27.             class="{{ formSelectClass }} product-detail-quantity-select">
  28.         {% for quantity in range(product.minPurchase, product.calculatedMaxPurchase, product.purchaseSteps) %}
  29.             <option value="{{ quantity }}">
  30.                 {{ quantity }}
  31.             </option>
  32.         {% endfor %}
  33.     </select>
  34. {% endblock %}
  35. {# Full width Paypal button #}
  36. {% block page_product_detail_buy_container_paypal %}
  37.     {% if buyable and product.calculatedCheapestPrice.totalPrice > 0 and product.extensions[constant('Swag\\PayPal\\Checkout\\Cart\\Service\\ExcludedProductValidator::PRODUCT_EXCLUDED_FOR_PAYPAL')] is null %}
  38.         {% set expressSettings = page.extensions[constant('Swag\\PayPal\\Checkout\\ExpressCheckout\\ExpressCheckoutSubscriber::PAYPAL_EXPRESS_CHECKOUT_BUTTON_DATA_EXTENSION_ID')] %}
  39.         {#
  40.         {% if expressSettings.productDetailEnabled %}
  41.             <div class="form-row mt-3 justify-content-end">
  42.              {% sw_include '@SwagPayPal/storefront/component/ecs-spb-checkout/ecs-button.html.twig' with {button_class: 'col-12'} %}
  43.             </div>
  44.         {% endif %}
  45.         #}
  46.     {% endif %}
  47.     {# @var \Swag\PayPal\Installment\Banner\BannerData installmentBanner #}
  48.     {% set installmentBanner = page.extensions[constant('Swag\\PayPal\\Installment\\Banner\\InstallmentBannerSubscriber::PAYPAL_INSTALLMENT_BANNER_DATA_EXTENSION_ID')] %}
  49.     {% if installmentBanner is not null %}
  50.         <div class="form-row mt-3 mb-4 justify-content-end">
  51.             <div class="col-12"
  52.                     data-swag-paypal-installment-banner="true"
  53.                     data-swag-pay-pal-installment-banner-options="{{ installmentBanner|json_encode }}">
  54.             </div>
  55.         </div>
  56.     {% endif %}
  57. {% endblock %}