Skip to content

Commit

Permalink
NTR: fix payment in order edit (#729)
Browse files Browse the repository at this point in the history
Co-authored-by: Vitalij Mik <[email protected]>
  • Loading branch information
BlackScorp and Vitalij Mik authored Mar 20, 2024
1 parent 1903129 commit 1734730
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Resources/views/storefront/base.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,28 @@


{% 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 %}

<script>
window.mollie_javascript_use_shopware = '{{ mollie_javascript_use_shopware }}'
</script>

{% if mollie_javascript_use_shopware != '1' and implementJS == true %}
{% if mollie_javascript_use_shopware != '1' and includeJsInHeader == true %}
<script src="{{ asset('bundles/molliepayments/mollie-payments.js', 'asset') }}"></script>
{% endif %}

Expand Down

0 comments on commit 1734730

Please sign in to comment.