diff --git a/src/Resources/views/storefront/base.html.twig b/src/Resources/views/storefront/base.html.twig index 7b2ce1a1d..aee39e3d5 100644 --- a/src/Resources/views/storefront/base.html.twig +++ b/src/Resources/views/storefront/base.html.twig @@ -14,20 +14,20 @@ {% set currentRoute = app.request.attributes.get('_route') %} - {% set implementJS = false %} + {% set includeJsInHeader = false %} {# js always required on this pages #} - {% if currentRoute == 'frontend.checkout.cart.page' or currentRoute == 'frontend.checkout.confirm.page' %} - {% set implementJS = true %} + {% if currentRoute == 'frontend.checkout.cart.page' or currentRoute == 'frontend.checkout.confirm.page' or currentRoute == 'frontend.account.edit-order.page' %} + {% set includeJsInHeader = true %} {% endif %} {# requirement check for apple pay direct #} {% if mollie_applepaydirect_enabled == true or mollie_applepay_enabled == true %} {% if currentRoute in onlyShowHere|keys and onlyShowHere[currentRoute] not in mollie_applepaydirect_restrictions %} - {% set implementJS = true %} + {% set includeJsInHeader = true %} {% endif %} {% if 'offcanvas' not in mollie_applepaydirect_restrictions %} - {% set implementJS = true %} + {% set includeJsInHeader = true %} {% endif %} {% endif %} @@ -35,7 +35,7 @@ window.mollie_javascript_use_shopware = '{{ mollie_javascript_use_shopware }}' - {% if mollie_javascript_use_shopware != '1' and implementJS == true %} + {% if mollie_javascript_use_shopware != '1' and includeJsInHeader == true %} {% endif %}