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

Open in your IDE?
  1. {% sw_extends '@parent/storefront/base.html.twig' %}
  2. {% block base_html %}
  3. <html lang="{% if app.request.locale == 'de-DE' %}de-CH{% else %}{{ app.request.locale }}{% endif %}"
  4.       itemscope="itemscope"
  5.       itemtype="https://schema.org/WebPage"
  6.       class="no-js">
  7. {% endblock %}
  8. {% block base_body %}
  9.     {% set currentCustomerGroup = context.currentCustomerGroup.translated.name|lower %}
  10.     {% set headerBlock = false %}
  11.     {% set headerBlockElement = false %}
  12.     {% set headerBlockMedia = null %}
  13.     {% set headerBlockMediaId = null %}
  14.     {% set headerBlockVideo = false %}
  15.     {% set headerBlockTitleBlock = "" %}
  16.     {% set headerShowStickyNav = false %}
  17.     {% set headerBlockIcon = false %}
  18.     {% set headerBlockIconId = null %}
  19.     {% set headerBlockCssClass = null %}
  20.     {% for section in page.cmsPage.sections %}
  21.         {% for element in section.blocks %}
  22.             {% if element.type == "text-on-image-header" %}
  23.                 {% set headerBlock = true %}
  24.                 {% set headerBlockElement = element %}
  25.                 {% set headerBlockMedia = headerBlockElement.slots.getSlot('image') %}
  26.                 {% if headerBlockMedia.data.media.url %}
  27.                     {% set headerBlockMediaId = headerBlockMedia.data.media.id %}
  28.                 {% endif %}
  29.                 {% if headerBlockMedia.type == "vimeo-video-pro" and headerBlockMedia.config.videoID.value %}
  30.                     {% set headerBlockVideo = true %}
  31.                 {% endif %}
  32.                 {% set headerBlockTitleBlock = headerBlockElement.slots.getSlot('titleBlock') %}
  33.                 {% if activeRoute == "frontend.home.page" %}
  34.                     {% set headerShowStickyNav = true %}
  35.                 {% elseif page.header.navigation.active.name == 'Winzerportraits' %}
  36.                     {# {% set headerShowStickyNav = "winzer" %} #}
  37.                 {% endif %}
  38.                 {% set headerBlockIcon = headerBlockElement.slots.getSlot('icon') %}
  39.                 
  40.                 {% if headerBlockIcon.data.media.url %}
  41.                     {% set headerBlockIconId = headerBlockIcon.data.media.id %}
  42.                 {% endif %}
  43.                 {% if headerBlockElement.cssClass %}
  44.                     {% set headerBlockCssClass = headerBlockElement.cssClass %}
  45.                 {% endif %}
  46.             {% endif %}
  47.         {% endfor %}
  48.     {% endfor %}
  49.     {% set winzerNavigationItems = page.header.navigation.tree %}
  50.     {% set winzerNavigationRootCategory = null %}
  51.     {% set winzerNavigationActiveCategory = null %}
  52.     {% for winzerNavigationItem in winzerNavigationItems %}
  53.         {% if winzerNavigationItem.category.name == "Entdecken" %}
  54.             {% for winzerNavigationChildItem in winzerNavigationItem.children %}
  55.                 {% if winzerNavigationChildItem.category.name == "Winzerportraits" %}
  56.                     {% set winzerNavigationRootCategory = winzerNavigationChildItem %}
  57.                 {% endif %}
  58.             {% endfor %}
  59.         {% endif %}
  60.         {% if winzerNavigationActiveCategory == null and winzerNavigationItem.category.id == page.header.navigation.active.id %}
  61.             {% set winzerNavigationActiveCategory = winzerNavigationItem %}
  62.         {% else %}
  63.             {% if  winzerNavigationActiveCategory == null %}
  64.                 {% set winzerNavigationChildren = winzerNavigationItem.children %}
  65.                 {% for winzerNavigationChild in winzerNavigationChildren %}
  66.                     {% if  winzerNavigationActiveCategory == null and child.category.id == page.header.navigation.active.id %}
  67.                         {% set winzerNavigationActiveCategory = child %}
  68.                     {% else %}
  69.                         {% if  winzerNavigationActiveCategory == null %}
  70.                             {% set winzerNavigaitonSubChildren = winzerNavigationChild.children %}
  71.                             {% for winzerNavigationSubChild in winzerNavigaitonSubChildren %}
  72.                                 {% if  winzerNavigationActiveCategory == null and winzerNavigationSubChild.category.id == page.header.navigation.active.id %}
  73.                                     {% set winzerNavigationActiveCategory = winzerNavigationSubChild %}
  74.                                 {% else %}
  75.                                     {% set winzerNavigationSubSubChildren = winzerNavigationSubChild.children %}
  76.                                     {% for winzerNavigationSubSubChild in winzerNavigationSubSubChildren %}
  77.                                         {% if  winzerNavigationActiveCategory == null and winzerNavigationSubSubChild.category.id == page.header.navigation.active.id %}
  78.                                             {% set winzerNavigationActiveCategory = winzerNavigationSubSubChild %}
  79.                                         {% else %}
  80.                                             {% set winzerNavigationSubSubSubChildren = winzerNavigationSubSubChild.children %}
  81.                                             {% for winzerNavigationSubSubSubChild in winzerNavigationSubSubSubChildren %}
  82.                                                 {% if  winzerNavigationActiveCategory == null and winzerNavigationSubSubSubChild.category.id == page.header.navigation.active.id %}
  83.                                                     {% set winzerNavigationActiveCategory = winzerNavigationSubSubSubChild %}
  84.                                                 {% else %}
  85.                                                     {% set winzerNavigationLastLevelChildren = winzerNavigationSubSubSubChild.children %}                                                    
  86.                                                     {% for winzerNavigationLastLevelChild in winzerNavigationLastLevelChildren %}
  87.                                                         {% if  winzerNavigationActiveCategory == null and winzerNavigationLastLevelChild.category.id == page.header.navigation.active.id %}
  88.                                                             {% set winzerNavigationActiveCategory = winzerNavigationLastLevelChild %}
  89.                                                         {% endif %}
  90.                                                     {% endfor %}
  91.                                                 {% endif %}
  92.                                             {% endfor %}
  93.                                         {% endif %}
  94.                                     {% endfor %}
  95.                                 {% endif %}
  96.                             {% endfor %}
  97.                         {% endif %}
  98.                     {% endif %}
  99.                 {% endfor %}
  100.             {% endif %}
  101.         {% endif %}
  102.     {% endfor %}
  103.  
  104.     {% if (winzerNavigationActiveCategory.category.customFields.custom_category_attributes_land == true or winzerNavigationActiveCategory.category.customFields.custom_category_attributes_frontend_template == 'frontend_template_2') %}
  105.         {% if winzerNavigationActiveCategory.category.customFields.custom_category_attributes_image_2 and winzerNavigationActiveCategory.category.customFields.custom_category_attributes_bild_2_neues_format == true %}
  106.             {% set winzerCountryImageId = winzerNavigationActiveCategory.category.customFields.custom_category_attributes_image_2 %}
  107.             {% set mediaCollection = searchMedia([winzerCountryImageId], context.context) %}
  108.             {% set winzerCountryImage = mediaCollection.get(winzerCountryImageId) %}
  109.             {% if winzerCountryImage %}
  110.                 {% set headerBlock = true %}
  111.                 {% set headerBlockMediaId = winzerCountryImageId %}
  112.                 {% set headerBlockTitle = winzerNavigationActiveCategory.category.name %}
  113.                 {# {% if winzerNavigationActiveCategory.category.translated.customFields.custom_category_attributes_produzent_name_martel %}
  114.                     {% set headerBlockTitle = winzerNavigationActiveCategory.category.translated.customFields.custom_category_attributes_produzent_name_martel %}
  115.                 {% endif %} #}
  116.                 {% if (winzerNavigationActiveCategory.category.customFields.custom_category_attributes_land == true or winzerNavigationActiveCategory.category.customFields.custom_category_attributes_region == true or winzerNavigationActiveCategory.category.customFields.custom_category_attributes_subregion == true) %}
  117.                     {% set headerBlockImgAlt = "producer.winesFrom"|trans ~ ' ' ~ winzerNavigationActiveCategory.category.name %}
  118.                     {% set headerBlockImgTitle = "general.martelWeinwelt"|trans ~ ' - ' ~ "producer.winesFrom"|trans ~ ' ' ~ winzerNavigationActiveCategory.category.name %}
  119.                 {% elseif winzerNavigationActiveCategory.category.customFields.custom_category_attributes_weingut == true %}
  120.                     {% set headerBlockImgAlt = winzerNavigationActiveCategory.category.name %}
  121.                     {% set headerBlockImgTitle = "producer.winzer"|trans ~ ' ' ~ winzerNavigationActiveCategory.category.name %}
  122.                 {% endif %}
  123.                 {% if winzerNavigationActiveCategory.category.customFields.custom_category_attributes_weingut == true %}
  124.                     {% set headerBlockSubTitle = "producer.producersubtitle"|trans %}
  125.                 {% else %}
  126.                     {% set headerBlockSubTitle = "producer.countrysubtitle"|trans %}
  127.                 {% endif %}
  128.                 {# {% set headerShowStickyNav = "winzer" %} #}
  129.             {% endif %}
  130.         {% endif %}
  131.     {% endif %}
  132.     {# Neue Winzerportraits #}
  133.     {% if context.salesChannel.translated.customFields.custom_winzerportraits_weinregionen_cat_producers in page.header.navigation.active.path or context.salesChannel.translated.customFields.custom_winzerportraits_weinregionen_cat_producers == page.header.navigation.active.id %}
  134.         {% set foundCurrentWinzerPortrait = null %}
  135.         {% for key, element in page.header.navigation.tree %}
  136.             {% if key == context.salesChannel.translated.customFields.custom_winzerportraits_weinregionen_cat_producers %}
  137.                 {% set foundCurrentWinzerPortrait = true %}
  138.             {% else %}
  139.                 {% if not foundCurrentWinzerPortrait && element.children is defined %}
  140.                     {% for childkey, childelement in element.children %}
  141.                         {% if childkey == context.salesChannel.translated.customFields.custom_winzerportraits_weinregionen_cat_producers %}
  142.                             {% set foundCurrentWinzerPortrait = true %}
  143.                         {% endif %}
  144.                     {% endfor %}
  145.                 {% endif %}
  146.             {% endif %}
  147.         {% endfor %}
  148.         {% if foundCurrentWinzerPortrait && winzerNavigationActiveCategory.category.customFields.custom_category_attributes_weingut != true %}
  149.             {% set headerBlockTitle = "producer.producersOfTheRegionMin"|trans ~ "\n" ~ winzerNavigationActiveCategory.category.name %}
  150.             {% set headerBlockSubTitle = "producer.portraits"|trans %}
  151.         {% endif %}
  152.         {% if winzerNavigationActiveCategory.category is not null and not ( winzerNavigationActiveCategory.category.customFields.custom_category_attributes_code starts with 'country_' ) %}
  153.             {% set headerBlock = null %}
  154.         {% endif %}
  155.     {% endif %}
  156.     {# Neue Weinregionen #}
  157.     {% if context.salesChannel.translated.customFields.custom_winzerportraits_weinregionen_cat_regions in page.header.navigation.active.path or context.salesChannel.translated.customFields.custom_winzerportraits_weinregionen_cat_regions == page.header.navigation.active.id %}
  158.         {% set foundCurrentWineRegion = null %}
  159.         {% for key, element in page.header.navigation.tree %}
  160.             {% if key == context.salesChannel.translated.customFields.custom_winzerportraits_weinregionen_cat_regions %}
  161.                 {% set foundCurrentWineRegion = true %}
  162.             {% else %}
  163.                 {% if not foundCurrentWineRegion && element.children is defined %}
  164.                     {% for childkey, childelement in element.children %}
  165.                         {% if childkey == context.salesChannel.translated.customFields.custom_winzerportraits_weinregionen_cat_regions %}
  166.                             {% set foundCurrentWineRegion = true %}
  167.                         {% endif %}
  168.                     {% endfor %}
  169.                 {% endif %}
  170.             {% endif %}
  171.         {% endfor %}
  172.         {% if foundCurrentWineRegion %}
  173.             {% set headerBlockTitle = "producer.allFactsAboutWineRegion"|trans({'%location%': winzerNavigationActiveCategory.category.name }) %}
  174.             {% set headerBlockSubTitle = "producer.regions"|trans %}
  175.         {% endif %}
  176.         {% if winzerNavigationActiveCategory.category is not null and not ( winzerNavigationActiveCategory.category.customFields.custom_category_attributes_code starts with 'country_' ) %}
  177.             {% set headerBlock = null %}
  178.         {% endif %}
  179.     {% endif %}
  180.     {% set giftcardprefix = config("NextagGiftcard").config.productNumberPrefix %}
  181.     {% if context.salesChannel.customFields.custom_printathome_header_image && config("NextagGiftcard").config.enabled and (giftcardprefix in page.product.productNumber or page.product.productnumber == config("NextagGiftcard").config.productNumber)  %}
  182.         {% set headerBlock = true %}
  183.         {% set headerBlockMediaId = context.salesChannel.customFields.custom_printathome_header_image %}
  184.         {% set headerBlockTitle = "Perfektes Geschenk in letzter Minute" %}
  185.         {% set headerBlockSubTitle = "Martel Geschenkgutschein" %}
  186.         {% set headerBlockImgAlt = "Martel - Perfektes Geschenk in letzter Minute" %}
  187.         {% set headerBlockImgTitle = "Perfektes Geschenk in letzter Minute" %}
  188.     {% endif %}
  189.     <body class="{% block base_body_classes %}{% apply spaceless %}
  190.         is-ctl-{{ controllerName|lower }} is-act-{{ controllerAction|lower }} 
  191.         {% if headerBlock %}header-block-displayed{% endif %} 
  192.         {% if page.header.navigation.active.translated.customFields.custom_css_classes_value %}{{page.header.navigation.active.translated.customFields.custom_css_classes_value}}{% endif %} 
  193.         {% if page.cmsPage.translated.name == "Martel-Kategorie" %}is-shop-list{% endif %}
  194.         {% if activeRoute != 'frontend.home.page' %}show-full-header show-search keep-search-open{% endif %}
  195.         {% if currentCustomerGroup %}cg-{{currentCustomerGroup}}{% endif %}
  196.         {% if page.cmsPage.name == "Suche" %}is-search-results-page{% endif %}
  197.         {% if "martel.dev7" in app.request.uri %}dev-env{% elseif "martel.ch" in app.request.uri %}prod-env{% endif %}
  198.         no-js-show
  199.         {% endapply %}{% endblock %}">
  200.         {# Google Tag Code #}
  201.         {% if "martel.dev7" not in app.request.uri  %}
  202.             <!-- Google Tag Manager (noscript) -->
  203.             <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-MQ8CCQC" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
  204.             <!-- End Google Tag Manager (noscript) -->
  205.         {% endif %}
  206.         <!-- Meta Pixel Code -->
  207.         <noscript><img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=1387008084961365&ev=PageView&noscript=1" alt=""></noscript>
  208.         <!-- End Meta Pixel Code -->
  209.     {% block base_body_inner %}
  210.         {% block base_header %}
  211.             <header id="header-navigation" class="header-area fixed-top
  212.                  {% if headerBlock %}header-block-displayed{% endif %}
  213.             ">
  214.                 {% block base_header_inner_black %}
  215.                     {% sw_include '@parent/storefront/layout/header/header.html.twig' %}
  216.                 {% endblock %}
  217.                 {% block base_search %}
  218.                     {% sw_include '@Storefront/storefront/page/content/site-search.html.twig' %}
  219.                 {% endblock %}
  220.             </header>
  221.         {% endblock %}
  222.        <div class="page-wrapper 
  223.             {% if (page.cmsPage.type == "page" or page.cmsPage.type == "landingpage") and page.cmsPage.translated.name != "Martel-Kategorie" %}cms-page{% endif %}            
  224.             {% if page.cmsPage.translated.name == "Martel-Kategorie" %}shop-page{% endif %}
  225.         ">
  226.             {% block base_noscript %}
  227.                 {# D-I-S GA4 #}
  228.                 {# {% if config('DIScoGA4.config.googleTagEnabled') == true %}
  229.                     {% if config('DIScoGA4.config.googleTagId') and (config('DIScoGA4.config.googleTagEnabled') == true) and app.request.cookies.has('_dis_gtag')%}
  230.                         <!-- Google Tag Manager (noscript) - DisGA4 -->
  231.                         <noscript><iframe src="https://www.googletagmanager.com/ns.html?id={{ config('DIScoGA4.config.googleTagId')|raw }}"
  232.                                     height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
  233.                         <!-- End Google Tag Manager (noscript) - DisGA4 -->
  234.                     {% endif %}
  235.                 {% endif %} #}
  236.                 {% block wbm_base_tag_manager_noscript %}
  237.                     {% if wbmTagManagerConfig.gtmContainerId %}
  238.                         <noscript>
  239.                             <iframe src="https://www.googletagmanager.com/ns.html?id={{ wbmTagManagerConfig.gtmContainerId|raw }}"
  240.                                     height="0" width="0" style="display:none;visibility:hidden"></iframe>
  241.                         </noscript>
  242.                     {% endif %}
  243.                 {% endblock %}
  244.                 <noscript class="noscript-main">
  245.                     {% sw_include '@parent/storefront/utilities/alert.html.twig' with {
  246.                         type: 'info',
  247.                         content: 'general.noscriptNotice'|trans|sw_sanitize
  248.                     } %}
  249.                 </noscript>
  250.             {% endblock %}
  251.             {# {% block base_offcanvas_navigation %}
  252.                 {% if page.header.navigation %}
  253.                     <div class="d-none js-navigation-offcanvas-initial-content">
  254.                         {% block base_offcanvas_navigation_inner %}
  255.                             {% sw_include '@Storefront/storefront/layout/navigation/offcanvas/navigation.html.twig' with { navigation: page.header.navigation } %}
  256.                         {% endblock %}
  257.                     </div>
  258.                 {% endif %}
  259.             {% endblock %} #}
  260.             {% if headerBlock %}
  261.                 {% sw_include '@Storefront/storefront/layout/header/nextag-header-block.html.twig' with {
  262.                     headerBlockMedia: headerBlockMedia,
  263.                     headerBlockMediaId: headerBlockMediaId,
  264.                     headerBlockTitleBlock: headerBlockTitleBlock,
  265.                     headerBlockTitle: headerBlockTitle,
  266.                     headerBlockSubTitle: headerBlockSubTitle,
  267.                     headerShowStickyNav: headerShowStickyNav,
  268.                     headerBlockVideo: headerBlockVideo,
  269.                     headerBlockRootCategory: winzerNavigationRootCategory,
  270.                     headerBlockActiveCategory: winzerNavigationActiveCategory,
  271.                     headerBlockIconId: headerBlockIconId,
  272.                     headerBlockCssClass: headerBlockCssClass
  273.                 } %}
  274.             {% endif %}
  275.             {% block base_main %}
  276.                 <main>
  277.                     {% block base_main_inner %}                       
  278.                         {% block base_main_container %}                           
  279.                             <div class="container-main">
  280.                                 {# {% block base_breadcrumb %}
  281.                                     {% if breadcrumbList %}
  282.                                         <div class="breadcrumb-block">
  283.                                             <div class="container-fluid limited">
  284.                                                 <div class="row">
  285.                                                     <div class="col-12">
  286.                                                         <div id="breadcrumb">
  287.                                                             {% sw_include '@Storefront/storefront/layout/breadcrumb.html.twig' %}
  288.                                                         </div>
  289.                                                     </div>
  290.                                                 </div>
  291.                                             </div>
  292.                                         </div>
  293.                                     {% endif %}
  294.                                 {% endblock %} #}                                  
  295.                                 {% block base_flashbags %}
  296.                                     <div class="container-fluid limited">
  297.                                         <div class="row justify-content-center">
  298.                                             <div class="{% apply spaceless %}
  299.                                                 {% if activeRoute and ('frontend.account' in activeRoute or 'nextag.account' in activeRoute) and activeRoute != 'frontend.account.login.page' and activeRoute != 'frontend.account.recover.page' %}
  300.                                                 col-12 account-flashbags
  301.                                                 {% elseif activeRoute == 'frontend.home.page' or page.cmsPage.type == 'page' or activeRoute == 'frontend.account.login.page' or activeRoute == 'frontend.account.recover.page' %}
  302.                                                 col-12 col-lg-10
  303.                                                 {% else %}
  304.                                                 col-12
  305.                                                 {% endif %}{% endapply %}">
  306.                                                 <div class="flashbags">
  307.                                                     {% for type, messages in app.flashes %}
  308.                                                         {% sw_include '@Storefront/storefront/utilities/alert.html.twig' with { type: type, list: messages } %}
  309.                                                     {% endfor %}
  310.                                                 </div>
  311.                                             </div>
  312.                                         </div>
  313.                                     </div>
  314.                                 {% endblock %}
  315.                                 <div class="container-fluid limited">
  316.                                     {% block base_content %}{% endblock %}
  317.                                 </div>
  318.                             </div>
  319.                         {% endblock %}
  320.                     {% endblock %}
  321.                 </main>
  322.             {% endblock %}
  323.             {% block base_footer %}
  324.                 {% block base_newsletter_form %}
  325.                     {% sw_include '@Storefront/storefront/layout/footer/footer-newsletter-form.html.twig' %}
  326.                 {% endblock %}
  327.                 {% block base_footer_inner %}
  328.                     {% sw_include '@Storefront/storefront/layout/footer/footer.html.twig' %}
  329.                 {% endblock %}
  330.             {% endblock %}
  331.         </div>
  332.         {% sw_include "@Storefront/storefront/layout/navigation/mobile-menu.html.twig" %}
  333.     {% endblock %}
  334.     {% block base_scroll_up %}
  335.         {% sw_include '@Storefront/storefront/layout/scroll-up.html.twig' %}
  336.     {% endblock %}
  337.     {% block base_cookie_permission %}
  338.         {# {% sw_include '@Storefront/storefront/layout/cookie/cookie-permission.html.twig' %} #}
  339.     {% endblock %}
  340.     {% block base_pseudo_modal %}
  341.         {% sw_include '@Storefront/storefront/component/pseudo-modal.html.twig' %}
  342.     {% endblock %}
  343.     {# {% block base_promo_popup %}
  344.         {% sw_include '@Storefront/storefront/layout/footer/footer-popup.html.twig' %}
  345.     {% endblock %} #}
  346.     {% block base_login_modal %}
  347.         {% if "LP-Vorlage B2B-Aktion mit Login" in page.cmsPage.translated.name or "LP-Vorlage MEX mit Login" in page.cmsPage.translated.name %}
  348.             {% if not context.customer or context.customer is not defined or context.customer.guest == true %}
  349.                 {% sw_include '@Storefront/storefront/component/login-modal.html.twig' %}
  350.             {% endif %}
  351.             {% if page.header.navigation.active.id %}
  352.                 <div id="custom-js-seo-redirect" content="{{ seoUrl('frontend.navigation.page', { navigationId: page.header.navigation.active.id }) }}">
  353.             {% endif %}
  354.             <script>
  355.             document.addEventListener('DOMContentLoaded', function () {
  356.                 const seoUrlMeta = document.getElementById('custom-js-seo-redirect');
  357.                 const currentPath = window.location.pathname;
  358.                 const isRawNavigationUrl = currentPath.startsWith('/navigation/');
  359.                 if (seoUrlMeta && isRawNavigationUrl) {
  360.                 const seoUrl = seoUrlMeta.getAttribute('content');
  361.                 if (seoUrl && seoUrl !== currentPath) {
  362.                     setTimeout(function() {
  363.                         window.history.replaceState(null, '', seoUrl); // đŸ‘ˆ replace the URL
  364.                     }, 4000);
  365.                     
  366.                 }
  367.                 }
  368.             });
  369.             </script>
  370.         {% endif %}
  371.     {% endblock %}
  372.     {% block base_body_script %}
  373.         {% block base_script_token %}
  374.             {# <script>
  375.                  @deprecated tag:v6.4.0 apiAccessUrl will be removed 
  376.                 window.apiAccessUrl = "{{ url('frontend.api-access') }}";
  377.             </script> #}
  378.         {% endblock %}
  379.         {% block base_script_router %}
  380.             {# Register all routes that will be needed in JavaScript to the window.router object #}
  381.             <script>
  382.                 window.activeNavigationId = '{{ page.header.navigation.active.id }}';
  383.                 window.router = {
  384.                     'frontend.cart.offcanvas': '{{ path('frontend.cart.offcanvas') }}',
  385.                     'frontend.cookie.offcanvas': '{{ path('frontend.cookie.offcanvas') }}',
  386.                     'frontend.checkout.finish.page': '{{ path('frontend.checkout.finish.page') }}',
  387.                     'frontend.checkout.info': '{{ path('frontend.checkout.info') }}',
  388.                     'frontend.menu.offcanvas': '{{ path('frontend.menu.offcanvas') }}',
  389.                     'frontend.cms.page': '{{ path('frontend.cms.page') }}',
  390.                     'frontend.cms.navigation.page': '{{ path('frontend.cms.navigation.page') }}',
  391.                     'frontend.account.addressbook': '{{ path('frontend.account.addressbook') }}',
  392.                     'frontend.csrf.generateToken': '{{ path('frontend.csrf.generateToken') }}',
  393.                     'frontend.country.country-data': '{{ path('frontend.country.country.data') }}',
  394.                     'frontend.store-api.proxy': '{{ path('frontend.store-api.proxy') }}',
  395.                 };
  396.                 window.storeApiProxyToken = '{{ sw_csrf("frontend.store-api.proxy", {"mode": "token"}) }}';
  397.                 window.salesChannelId = '{{ app.request.attributes.get('sw-sales-channel-id') }}';
  398.             </script>
  399.         {% endblock %}
  400.         {% block base_script_breakpoints %}
  401.             {# Register the available viewport breakpoints the window.breakpoints object #}
  402.             <script>
  403.                 {% set breakpoint = {
  404.                     'xs': theme_config('breakpoint-sm'),
  405.                     'sm': theme_config('breakpoint-md'),
  406.                     'md': theme_config('breakpoint-lg'),
  407.                     'lg': theme_config('breakpoint-xl')
  408.                 } %}
  409.                 window.breakpoints = {{ breakpoint|json_encode()|raw }};
  410.             </script>
  411.         {% endblock %}
  412.         {% block base_script_csrf %}
  413.             <script>
  414.                 window.csrf = {
  415.                     'enabled': '{{ shopware.csrfEnabled }}',
  416.                     'mode': '{{ shopware.csrfMode }}'
  417.                 }
  418.             </script>
  419.         {% endblock %}
  420.         {% if config("core").cart.wishlistEnabled %}
  421.             {% block base_script_wishlist_state %}
  422.                 <script>
  423.                     window.customerLoggedInState = {{ context.customer is not null and not context.customer.guest ? 1 : 0 }};
  424.                     window.wishlistEnabled = {{ config("core").cart.wishlistEnabled }};
  425.                 </script>
  426.             {% endblock %}
  427.         {% endif %}
  428.         {% block base_script_hmr_mode %}
  429.             {% if isHMRMode %}
  430.                 <script type="text/javascript" src="/_webpack_hot_proxy_/js/vendor-node.js"></script>
  431.                 <script type="text/javascript" src="/_webpack_hot_proxy_/js/vendor-shared.js"></script>
  432.                 <script type="text/javascript" src="/_webpack_hot_proxy_/js/runtime.js"></script>
  433.                 <script type="text/javascript" src="/_webpack_hot_proxy_/js/app.js"></script>
  434.                 {# The storefront entry is a combined entry point which contains all plugins & themes #}
  435.                 <script type="text/javascript" src="/_webpack_hot_proxy_/js/storefront.js"></script>
  436.             {% else %}                
  437.                 {% for file in theme_config('assets.js') %}
  438.                     <script defer="defer" type="text/javascript" src="{{ asset(file, 'theme') }}"></script>
  439.                 {% endfor %}
  440.                 {# <script>
  441.                 const loadScriptsTimer = setTimeout(loadScripts, 5000);
  442.                 const userInteractionEvents = ["mouseover","keydown","touchmove","touchstart"];
  443.                 var loadScriptsDone = false;
  444.                 userInteractionEvents.forEach(function (event) {
  445.                     window.addEventListener(event, triggerScriptLoader, {
  446.                         passive: true
  447.                     });
  448.                 });
  449.                 function triggerScriptLoader() {
  450.                     if(loadScriptsDone == false) {
  451.                         loadScripts();
  452.                         clearTimeout(loadScriptsTimer);
  453.                         userInteractionEvents.forEach(function (event) {
  454.                             window.removeEventListener(event, triggerScriptLoader, {
  455.                                 passive: true
  456.                             });
  457.                         });
  458.                     }
  459.                 }
  460.                 function loadScripts() {
  461.                     {% for file in theme_config('assets.js') %}
  462.                         var d = window.document,
  463.                             b = d.body, /* appends at end of body, but you could use other methods to put where you want */
  464.                             e = d.createElement("script");
  465.                         
  466.                         e.async = true;
  467.                         e.src = "{{ asset(file, 'theme') }}";
  468.                         b.appendChild(e);
  469.                     {% endfor %}
  470.                     loadScriptsDone = true;
  471.                 }
  472.                 </script> #}
  473.             {% endif %}
  474.         {% endblock %}
  475.     {% endblock %}
  476.     {% block base_ld_json %}
  477.         <script type="application/ld+json">
  478.         {
  479.             "@context": "http://schema.org/",
  480.             "@type": "Organization",
  481.             "name": "{{ "general.longNameSG"|trans }}",
  482.             "url": "{{ absolute_url(path('frontend.home.page')) }}",
  483.             "logo": "{{ theme_config('sw-logo-desktop') }}",
  484.             "contactPoint": [
  485.                 {
  486.                     "@type": "ContactPoint",
  487.                     "telephone": "{{ "general.phoneContact"|trans }}",
  488.                     "email": "{{ "general.emailContact"|trans }}",
  489.                     "availableLanguage" : "de",
  490.                     "contactType": "{{ "general.contactTypeSales"|trans }}"
  491.                 }
  492.             ]
  493.         }
  494.         </script>
  495.     {% endblock %}
  496.     {# {% block base_cookie_consent %}
  497.         <script src="https://cdn.jsdelivr.net/npm/cookieconsent@3/build/cookieconsent.min.js" data-cfasync="false"></script>
  498.         <script>
  499.         window.cookieconsent.initialise({
  500.             "palette": {
  501.                 "popup": {
  502.                 "background": "#F6F6F6",
  503.                 "text": "#000000"
  504.                 },
  505.                 "button": {
  506.                 "background": "#A6063A",
  507.                 "text": "#ffffff"
  508.                 }
  509.             },
  510.             "content": {
  511.                 "message": "Diese Website verwendet Cookies, um die Bedienfreundlichkeit zu erhöhen.",
  512.                 "dismiss": "OK",
  513.                 "link": "DatenschutzerklĂ€rung",
  514.                 "href": "/datenschutz/"
  515.             }
  516.         });
  517.         </script>
  518.     {% endblock %} #}
  519.     </body>
  520. {% endblock %}