vendor/store.shopware.com/swagpaypal/src/Resources/views/storefront/component/buy-widget/buy-widget-form.html.twig line 1

Open in your IDE?
  1. {% sw_extends "@Storefront/storefront/component/buy-widget/buy-widget-form.html.twig" %}
  2. {% set isBootstrap5 = feature('v6.5.0.0') or getAllFeatures()['v6.6.0.0'] is defined %}
  3. {% block buy_widget_buy_container %}
  4.     {{ parent() }}
  5.     {% block buy_widget_buy_button_container_paypal %}
  6.         {% set isProductDetail = cmsPage.type is same as 'product_detail' %}
  7.         {% if buyable and product.calculatedCheapestPrice.totalPrice > 0 and product.extensions[constant('Swag\\PayPal\\Checkout\\Cart\\Service\\ExcludedProductValidator::PRODUCT_EXCLUDED_FOR_PAYPAL')] is null %}
  8.             {% block buy_widget_buy_button_container_paypal_express %}
  9.                 {# @var \Swag\PayPal\Checkout\ExpressCheckout\ExpressCheckoutButtonData expressSettings #}
  10.                 {% set expressSettings = page.extensions[constant('Swag\\PayPal\\Checkout\\ExpressCheckout\\ExpressCheckoutSubscriber::PAYPAL_EXPRESS_CHECKOUT_BUTTON_DATA_EXTENSION_ID')] %}
  11.                 {% if expressSettings is null and cmsPage.extensions[constant('Swag\\PayPal\\Checkout\\ExpressCheckout\\ExpressCheckoutSubscriber::PAYPAL_EXPRESS_CHECKOUT_BUTTON_DATA_EXTENSION_ID')] %}
  12.                     {# @var \Swag\PayPal\Checkout\ExpressCheckout\ExpressCheckoutButtonData expressSettings #}
  13.                     {% set expressSettings = cmsPage.extensions[constant('Swag\\PayPal\\Checkout\\ExpressCheckout\\ExpressCheckoutSubscriber::PAYPAL_EXPRESS_CHECKOUT_BUTTON_DATA_EXTENSION_ID')] %}
  14.                 {% endif %}
  15.                 {% if expressSettings is null and product.extensions[constant('Swag\\PayPal\\Checkout\\ExpressCheckout\\ExpressCheckoutSubscriber::PAYPAL_EXPRESS_CHECKOUT_BUTTON_DATA_EXTENSION_ID')] %}
  16.                     {# @var \Swag\PayPal\Checkout\ExpressCheckout\ExpressCheckoutButtonData expressSettings #}
  17.                     {% set expressSettings = product.extensions[constant('Swag\\PayPal\\Checkout\\ExpressCheckout\\ExpressCheckoutSubscriber::PAYPAL_EXPRESS_CHECKOUT_BUTTON_DATA_EXTENSION_ID')] %}
  18.                 {% endif %}
  19.                 {% if (isProductDetail and expressSettings.productDetailEnabled) or (not isProductDetail and expressSettings.listingEnabled) %}
  20.                     <div class="{{ isBootstrap5 ? 'row g-2 mt-0' : 'form-row mt-3' }} justify-content-end">
  21.                         {% sw_include '@SwagPayPal/storefront/component/ecs-spb-checkout/ecs-button.html.twig' with {button_class: 'col-8'} %}
  22.                     </div>
  23.                 {% endif %}
  24.             {% endblock %}
  25.         {% endif %}
  26.         {% if isProductDetail %}
  27.             {% block buy_widget_buy_button_container_paypal_installment_banner %}
  28.                 {# @var \Swag\PayPal\Installment\Banner\BannerData installmentBanner #}
  29.                 {% set installmentBanner = page.extensions[constant('Swag\\PayPal\\Installment\\Banner\\InstallmentBannerSubscriber::PAYPAL_INSTALLMENT_BANNER_DATA_EXTENSION_ID')] %}
  30.                 {% if installmentBanner is not null and installmentBanner.detailPageEnabled %}
  31.                     <div class="{{ isBootstrap5 ? 'row g-2 mt-0' : 'form-row mt-3' }} mb-4 justify-content-end">
  32.                         <div class="{{ buyable ? 'col-8' : 'col-12' }}"
  33.                              data-swag-paypal-installment-banner="true"
  34.                              data-swag-pay-pal-installment-banner-options="{{ installmentBanner|json_encode }}">
  35.                         </div>
  36.                     </div>
  37.                 {% endif %}
  38.             {% endblock %}
  39.         {% endif %}
  40.     {% endblock %}
  41. {% endblock %}