custom/plugins/MolliePayments/src/Resources/views/storefront/component/product/card/action.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/component/product/card/action.html.twig' %}
  2. {% block component_product_box_action_buy %}
  3.     {{ parent() }}
  4.     {% block component_product_box_action_buy_apple_direct %}
  5.         {% set productPrice = 0 %}
  6.         {% if product.calculatedPrices|length == 1 %}
  7.             {% set productPrice = product.calculatedPrices.first.unitPrice %}
  8.         {% else %}
  9.             {% set productPrice = product.calculatedPrice.unitPrice %}
  10.             {% if listPrice.percentage > 0 %}
  11.                 {% set productPrice = listPrice.price %}
  12.             {% endif %}
  13.         {% endif %}
  14.         {% if mollie_applepaydirect_enabled and ('plp' not in mollie_applepaydirect_restrictions) and productPrice > 0 %}
  15.             {% block component_product_box_action_buy_apple_direct_component %}
  16.                 <div class="mt-2 d-none only-support-apple-pay js-apple-pay-container mollie-apple-pay-direct-listing">
  17.                     {% include '@MolliePayments/mollie/component/apple-pay-direct-button.twig' %}
  18.                 </div>
  19.             {% endblock %}
  20.         {% endif %}
  21.     {% endblock %}
  22. {% endblock %}
  23. {% block page_product_detail_product_buy_button %}
  24.     {% if mollie_subscriptions_enabled and product.customFields.mollie_payments_product_subscription_enabled %}
  25.         <button class="btn btn-block btn-buy" title="{{ "molliePayments.subscriptions.product.addToCartText"|trans|sw_sanitize }}">
  26.             {{ "molliePayments.subscriptions.product.addToCartText"|trans|sw_sanitize }}
  27.         </button>
  28.     {% else %}
  29.         {{ parent() }}
  30.     {% endif %}
  31. {% endblock %}