custom/plugins/CkoShopware6/src/Resources/views/storefront/base.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/base.html.twig' %}
  2. {% block base_main %}
  3.     {{ parent() }}
  4.     {% block checkout_com_base_main %}
  5.         {% set METHOD_TYPE_APPLE_PAY = staticFuncCall('Cko\\Shopware6\\Handler\\Method\\ApplePayHandler::getPaymentMethodType') %}
  6.         {% set METHOD_TYPE_GOOGLE_PAY = staticFuncCall('Cko\\Shopware6\\Handler\\Method\\GooglePayHandler::getPaymentMethodType') %}
  7.         {% set applePayActive = false %}
  8.         {% set googlePayActive = false %}
  9.         {% for payment in page.salesChannelPaymentMethods %}
  10.             {% if payment.customFields.checkoutConfig.methodType == METHOD_TYPE_APPLE_PAY %}
  11.                 {% set applePayActive = true %}
  12.                 {% block checkout_com_base_main_sales_channel_apple_pay_direct %}
  13.                     {% sw_include '@CkoShopware6/storefront/checkout-com/component/apple/apple-pay-direct.html.twig' %}
  14.                 {% endblock %}
  15.             {% elseif payment.customFields.checkoutConfig.methodType == METHOD_TYPE_GOOGLE_PAY %}
  16.                 {% set googlePayActive = true %}
  17.                 {% block checkout_com_base_main_sales_channel_google_pay_direct %}
  18.                     {% sw_include '@CkoShopware6/storefront/checkout-com/component/google/google-pay-direct.html.twig' %}
  19.                 {% endblock %}
  20.             {% endif %}
  21.         {% endfor %}
  22.         {% block checkout_com_base_main_sales_channel_apple_pay_display %}
  23.             {% sw_include '@CkoShopware6/storefront/checkout-com/component/apple/apple-pay-display.html.twig' with {active: applePayActive} %}
  24.         {% endblock %}
  25.         {% block checkout_com_base_main_sales_channel_google_pay_display %}
  26.             {% sw_include '@CkoShopware6/storefront/checkout-com/component/google/google-pay-display.html.twig' with {active: googlePayActive} %}
  27.         {% endblock %}
  28.     {% endblock %}
  29. {% endblock %}