custom/plugins/MolliePayments/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_container %}
  3.     {{ parent() }}
  4.     {% block page_product_detail_buy_container_apple_direct %}
  5.         {# this is for Shopware < 6.4 #}
  6.         {% set buyableLegacy = (not page.product.isCloseout or (page.product.availableStock >= page.product.minPurchase)) and page.product.childCount <= 0 %}
  7.         {# this is for Shopware >= 6.4 #}
  8.         {% set buyable = product.available and product.childCount <= 0 and product.calculatedMaxPurchase > 0 %}
  9.         {% set productPrice = 0 %}
  10.         {% if product.calculatedPrices|length == 1 %}
  11.             {% set productPrice = product.calculatedPrices.first.unitPrice %}
  12.         {% else %}
  13.             {% set productPrice = product.calculatedPrice.unitPrice %}
  14.             {% if listPrice.percentage > 0 %}
  15.                 {% set productPrice = listPrice.price %}
  16.             {% endif %}
  17.         {% endif %}
  18.         {% if mollie_applepaydirect_enabled and ('pdp' not in mollie_applepaydirect_restrictions) and  ((buyableLegacy) or (buyable and productPrice) > 0) %}
  19.             {% block page_product_detail_buy_container_apple_direct_component %}
  20.                 <div class="form-row mt-3 justify-content-end js-apple-pay-container">
  21.                     {% include '@MolliePayments/mollie/component/apple-pay-direct-button.twig' with {cols: 'col-8'} %}
  22.                 </div>
  23.             {% endblock %}
  24.         {% endif %}
  25.     {% endblock %}
  26. {% endblock %}
  27. {% block page_product_detail_buy_button %}
  28.     {% if mollie_subscriptions_enabled and page.product.customFields.mollie_payments_product_subscription_enabled %}
  29.         <button class="btn btn-primary btn-block btn-buy" title="{{ "molliePayments.subscriptions.product.addToCartText"|trans|sw_sanitize }}" aria-label="{{ "molliePayments.subscriptions.product.addToCartText"|trans|sw_sanitize }}">
  30.             {{ "molliePayments.subscriptions.product.addToCartText"|trans|sw_sanitize }}
  31.         </button>
  32.     {% else %}
  33.         {{ parent() }}
  34.     {% endif %}
  35. {% endblock %}