Skip to content

Commit

Permalink
Improve script on page performance
Browse files Browse the repository at this point in the history
  • Loading branch information
akf-bw committed Apr 15, 2024
1 parent ff38ec9 commit 4072493
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{% sw_extends '@Storefront/storefront/base.html.twig' %}

{% block base_main %}
{% sw_extends '@Storefront/storefront/layout/meta.html.twig' %}

{% block layout_head_javascript_hmr_mode %}

{# pages where apple pay requires js with their mollie_applepaydirect_restrictions names as values #}
{% set onlyShowHere = {
Expand All @@ -12,7 +11,6 @@
'frontend.detail.page' : 'pdp'
} %}


{% set currentRoute = app.request.attributes.get('_route') %}
{% set includeJsInHeader = false %}

Expand All @@ -36,8 +34,8 @@
</script>

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

{{ parent() }}
{% endblock %}
{% endblock %}

0 comments on commit 4072493

Please sign in to comment.