src/Trinity/WebshopBundle/Resources/views/shop_wrapper.html.twig line 1

Open in your IDE?
  1. {% extends ['layouts/' ~ (tpl_override is defined ? tpl_override : WebshopSettings.defaultTemplate) ~ '.html.twig', 'layouts/default.html.twig'] %}
  2. {% trans_default_domain 'webshop' %}
  3. {% block metadata %}{% include "@Cms/page/metadata.html.twig" with metatags %}{% endblock %}
  4. {% block sitetitle %}{{Settings.getLabel|raw}}{% endblock %}
  5. {% block title %}{{Product is defined ? (Product.seoTitle is not empty ? Product.seoTitle : (Product.brand ? Product.brand.label ~ ' ' : '') ~ Product.label) : (Category is defined ? (Category.seoTitle is not empty ? Category.seoTitle : Category.label) : (custom_title is defined ? custom_title : (Cart is defined ? ('Winkelwagen'|trans({}, "webshop", app.request.locale)|raw) : (Page is defined ? Page.title : '??'))))}}{% endblock %}
  6. {% block pagetitle %}<h1>{{Product is defined ? (Product.seoTitle is not empty ? Product.seoTitle : (Product.brand ? Product.brand.label ~ ' ' : '') ~ Product.label) : (Category is defined ? Category.label : (custom_title is defined ? custom_title : (Cart is defined ? ('Winkelwagen'|trans({}, "webshop", app.request.locale)|raw) : '??')))}}</h1>{% endblock %}
  7. {% block stylesheets %}<link rel="preload" href="{{asset('/bundles/trinitywebshop/css/style.css')}}" type="text/css" as="style" onload="this.onload=null;this.rel='stylesheet';" />{% endblock %}
  8. {% block javascripts %}
  9. <script>
  10.   var script_msg_more_info = "{{ 'Meer info' | trans({}, "webshop", app.request.locale) | raw }}";
  11.   var script_msg_bezigladen = "{{ 'Bezig met laden...' | trans({}, "webshop", app.request.locale) | raw }}";
  12. </script>
  13. <script>
  14. var cart_type = '{{WebshopSettings.cartType}}';
  15. {% if tpl_override is defined %}
  16. var tpl_o = '{{tpl_override}}';
  17. {% endif %}
  18. </script>
  19. {% endblock %}
  20. {% block admin_header %}
  21. {% block pagestyle %}
  22. {% endblock %}
  23.     {% if app.request.query is not empty %}
  24.         <meta name="robots" content="noindex,nofollow" />
  25.     {% else %}
  26.         {% if Product is defined %}
  27.             <meta name="robots" content="{{Settings is defined and Settings.robots is not empty ? (Product.visible ? Settings.robots : 'noindex,nofollow') : 'noindex,nofollow' ?? 'noindex,nofollow'}}" />
  28.         {% else %}
  29.             <meta name="robots" content="{{Settings is defined and Settings.robots is not empty ? Settings.robots : 'noindex,nofollow' ?? 'noindex,nofollow'}}" />
  30.         {% endif %}
  31.     {% endif %}
  32.     {% if Product is defined %}
  33.         <meta name="description" content="{{Product.seoDescription}}" />
  34.         <meta name="keywords" content="{{Product.seoKeywords}}" />
  35.     {% elseif Category is defined %}
  36.         <meta name="description" content="{{Category.seoDescription}}" />
  37.         <meta name="keywords" content="{{Category.seoKeywords}}" />
  38.     {% endif %}
  39.     <!-- Page:metadata -->
  40.     {% include "@Cms/page/metadata.html.twig" %}
  41.     {% block ogmetatags %}{% endblock %}
  42.     {% for Language in languages %}
  43.         {% if Language.settings %}
  44.         {% for LanguageSettings in Language.settings %}
  45.             {% if LanguageSettings.host and LanguageSettings.host == Settings.host %}
  46.             <link rel="alternate" href="{{ (LanguageSettings.forceHttps ? 'https' : 'http') ~ '://' ~ LanguageSettings.host }}" hreflang="{{Language.locale}}" />
  47.             {% endif %}
  48.         {% endfor %}
  49.         {% endif %}
  50.     {% endfor %}
  51.     {% if is_granted('ROLE_ADMIN') and Settings.getInlineEdit %}
  52.         <link rel="preload" href="/bundles/cms/css/frontinject.css" type="text/css" as="style" onload="this.onload=null;this.rel='stylesheet';" />
  53.     {% endif %}
  54.     {% for incl in Settings.getLayoutIncludeCss(true) %}
  55.         <link rel="preload" href="{{incl}}" type="text/css" as="style" onload="this.onload=null;this.rel='stylesheet';" />
  56.     {% endfor %}
  57.     {% for incl in Settings.getLayoutIncludeFont(true) %}
  58.         <link rel="preload" href="{{incl}}" type="text/css" as="style" onload="this.onload=null;this.rel='stylesheet';" />
  59.     {% endfor %}
  60.     {% for incl in Settings.getLayoutIncludeJs(true) %}
  61.         {% if incl matches '/jquery-\\d.*\.min\.js/' %}
  62.         <script defer type="text/javascript" src="{{incl}}"></script>
  63.         {% endif %}
  64.     {% endfor %}
  65.     {% for incl in Settings.getLayoutIncludeJs(true) %}
  66.         {% if incl matches '{popper}' %}
  67.             <script defer type="text/javascript" src="{{incl}}"></script>
  68.         {% endif %}
  69.     {% endfor %}
  70.     {% for incl in Settings.getLayoutIncludeJs(true) %}
  71.         {% if not (incl matches '/jquery-\\d.*\.min\.js/') and not (incl matches '{popper}') %}
  72.             <script defer type="text/javascript" src="{{incl}}"></script>
  73.         {% endif %}
  74.     {% endfor %}
  75.     {% if Settings.googleCc is not empty %}
  76.         <meta name="google-site-verification" content="{{Settings.googleCc}}">
  77.     {% endif %}
  78.         {% if Settings.faceDomainKey is defined and Settings.faceDomainKey is not empty %}
  79.             <meta name="facebook-domain-verification" content="{{ Settings.faceDomainKey }}" />
  80.         {% endif %}
  81.     {% if Settings.iosAppId is not empty %}
  82.         <meta name="apple-itunes-app" content="app-id={{Settings.iosAppId}}">
  83.     {% endif %}
  84.     {% if Settings.androidAppId is not empty %}
  85.         <meta name="google-play-app" content="app-id={{Settings.androidAppId}}">
  86.         <link rel="preload" href="{{asset('bundles/cms/android-app-banner/banner.css')}}" type="text/css" as="style" onload="this.onload=null;this.rel='stylesheet';" />
  87.     {% endif %}
  88.     {% if Settings.cookiebar %}
  89.         <script defer src="/bundles/cms/js/avg.min.js"></script>
  90.     {% endif %}
  91.     {% if Settings.hasGoogleRecaptcha %}
  92.         <script>
  93.             var googleRecaptchaMode = '{{ Settings.googleRecaptchaMode }}';
  94.             var googleRecaptchaSitekey = '{{ Settings.googleRecaptchaSitekey }}';
  95.         </script>
  96.     {% endif %}
  97.     {% if Settings.cookiebar %}
  98.     {% else %}
  99.         {% if Settings.googleGtm is not empty %}
  100.             <!-- Google Tag Manager -->
  101.             <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
  102.             new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
  103.             j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
  104.             'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
  105.             })(window,document,'script','dataLayer','{{Settings.googleGtm}}');</script>
  106.             <!-- End Google Tag Manager -->
  107.         {% endif %}
  108.     {% endif %}
  109.     {% if Settings.facebookpixel is not empty %}
  110.         <script>
  111.         !function(f,b,e,v,n,t,s)
  112.         {if(f.fbq)return;n=f.fbq=function(){n.callMethod?
  113.         n.callMethod.apply(n,arguments):n.queue.push(arguments)};
  114.         if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
  115.         n.queue=[];t=b.createElement(e);t.async=!0;
  116.         t.src=v;s=b.getElementsByTagName(e)[0];
  117.         s.parentNode.insertBefore(t,s)}(window, document,'script',
  118.         'https://connect.facebook.net/en_US/fbevents.js');
  119.         fbq('init', '{{Settings.facebookpixel}}');
  120.         fbq('track', 'PageView');
  121.         </script>
  122.     {% endif %}
  123.     {% if Settings.piwikSiteId is not empty %}
  124.         <!-- Matomo -->
  125.         <script type="text/javascript">
  126.           var _paq = _paq || [];
  127.           {% if app.user %}
  128.             _paq.push(['setUserId', '{{app.user.id}}']);
  129.             _paq.push(['setCustomVariable', 1, "Email", "{{app.user.email}}", "visit"]);
  130.             _paq.push(['setCustomVariable', 2, "Gender", "{{app.user.gender}}", "visit"]);
  131.           {% endif %}
  132.           _paq.push(['trackPageView']);
  133.           _paq.push(['enableLinkTracking']);
  134.           (function() {
  135.             var u="//{{Settings.piwikUrl}}/";
  136.             _paq.push(['setTrackerUrl', u+'piwik.php']);
  137.             _paq.push(['setSiteId', '{{Settings.piwikSiteId}}']);
  138.             var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
  139.             g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
  140.           })();
  141.         </script>
  142.                 <noscript>
  143.                     <img referrerpolicy="no-referrer-when-downgrade" src="//{{Settings.piwikUrl}}/matomo.php?idsite={{Settings.piwikSiteId}}&amp;rec=1" style="border:0" alt="" />
  144.                 </noscript>
  145.         <!-- End Matomo Code -->
  146.     {% endif %}
  147.         {% set hashs = null %}
  148.         {% if Settings.piwikcontainerhashs is defined %}
  149.         {% if Settings.piwikSiteId and WebshopSettings.piwikcontainerhashs is not empty %}
  150.             {% set hashs = WebshopSettings.piwikcontainerhashs | split(',') %}
  151.         {% elseif Settings.piwikSiteId and Settings.piwikcontainerhashs is not empty %}
  152.             {%  set hashs = Settings.piwikcontainerhashs | split(',') %}
  153.         {% endif %}
  154.         {% if hashs is not empty %}
  155.             {% for hash in hashs %}
  156.                 <!-- Matomo Tag Manager -->
  157.                 <script type="text/javascript">
  158.                 var _mtm = window._mtm = window._mtm || [];
  159.                 _mtm.push({'mtm.startTime': (new Date().getTime()), 'event': 'mtm.Start'});
  160.                 var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
  161.                 g.type='text/javascript'; g.async=true; g.src='//{{Settings.piwikUrl}}//js/container_{{hash|trim}}.js'; s.parentNode.insertBefore(g,s);
  162.                 </script>
  163.                 <!-- End Matomo Tag Manager -->
  164.             {% endfor %}
  165.         {% endif %}
  166.         {% endif %}
  167.         {% if app.environment != 'dev' and Settings.company is not empty %}
  168.         <script type="application/ld+json">
  169.         {
  170.             "@context": "http://schema.org/",
  171.             "@type": "Organization",
  172.             "name": "{{Settings.company}}",
  173.             "address": {
  174.                 "@type": "PostalAddress",
  175.                 "streetAddress": "{{Settings.address}}",
  176.                 "addressLocality": "{{Settings.place}}",
  177.                 {% if Settings.state is not empty %}
  178.                 "addressRegion": "{{Settings.state}}",
  179.                 {% endif %}
  180.                 "postalCode": "{{Settings.postalcode}}"
  181.                 },
  182.             "telephone": "{{Settings.phone}}",
  183.             "email": "mailto:{{Settings.systemEmail}}"
  184.         }
  185.         </script>
  186.         {% endif %}
  187.     <script>
  188.     window.onunload = function(){};
  189.     window.onload = function(){
  190.         var pageEl = document.getElementById('page');
  191.         if(pageEl){
  192.             pageEl.value = 1;
  193.         }
  194.     };
  195.     
  196.   {% if app.user and app.user.company is not empty %}
  197.   var cust_b = true;
  198.   {% else %}
  199.   var cust_b = false;
  200.   {% endif %}
  201.     </script>
  202.     
  203.     {% if Settings.androidAppId is not empty %}
  204.         <script defer src="{{asset('bundles/cms/android-app-banner/banner.js')}}"></script>
  205.     {% endif %}    
  206.     {# for avg init, activeateVideo, recaptha and iframe fixing #}
  207.     <script defer src="{{asset('/bundles/cms/js/frontend_common.js')}}"></script>
  208.     
  209.     <script defer src="{{asset('/bundles/trinitywebshop/js/script.js')}}"></script>
  210.     {% block shop_header %}
  211.     {% endblock %}
  212. {% endblock %}
  213. {% block plain_body %}
  214.     {% block shop_body %}
  215.     {% endblock %}
  216. {% endblock %}
  217. {% block pageimage %}{% endblock %}
  218. {% block admin_footer %}
  219.     {% if Settings.androidAppId is not empty %}
  220.         <script type="text/javascript">
  221.         new SmartBanner({
  222.             daysHidden: 7,   // days to hide banner after close button is clicked (defaults to 15)
  223.             daysReminder: 14, // days to hide banner after "VIEW" button is clicked (defaults to 90)
  224.             appStoreLanguage: 'nl', // language code for the App Store (defaults to user's browser language)
  225.             title: '{{Settings.appLabel}}',
  226.             author: '{{Settings.company}}',
  227.             button: '{{ 'BEKIJKEN' | trans }}',
  228.             store: {
  229.             ios: '{{ 'In de App Store' | trans }}',
  230.                 android: '{{ 'In Google Play' | trans }}',
  231.                 windows: '{{ 'In Windows store' | trans }}'
  232.             },
  233.             price: {
  234.                 ios: '{{ 'GRATIS' | trans }}',
  235.                 android: '{{ 'GRATIS' | trans }}',
  236.                 windows: '{{ 'GRATIS' | trans }}'
  237.             }
  238.             // , theme: '' // put platform type ('ios', 'android', etc.) here to force single theme on all device
  239.             , icon: '{{Settings.getAppIcon}}' // full path to icon image if not using website icon image
  240.             // , force: 'ios' // Uncomment for platform emulation
  241.         });
  242.         </script>
  243.     {% endif %}
  244.     {% if is_granted('ROLE_PREVIOUS_ADMIN') %}
  245.         <a style="position:fixed;bottom:30px;right: 30px;" class="btn" href="{{path('admin_users')}}?_switch_user=_exit">{{ 'Exit impersonation' | trans({}) | raw }}</a>
  246.     {% endif %}
  247.     {% if Settings.test %}
  248.         <div class="test-mode-badge-wrapper">
  249.             <div class="test-mode-badge" title="{{ 'Test mode staat aan, configureer in website instellingen.' | trans }}"><i class="fa fa-exclamation-triangle"></i> {{ 'TEST MODE' | trans }}</div>
  250.         </div>
  251.     {% endif %}
  252.     {% if Settings.cookiebar %}
  253.         <script>
  254.             var avg_settings = {
  255.                 'webshop': true,
  256.                 'gtmCode': '{{Settings.googleGtm is not empty ? Settings.googleGtm|raw : ''}}',
  257.                 'gaCode': '{{Settings.googleUa is not empty ? Settings.googleUa : ''}}',
  258.                 'gCode': '{{Settings.googleG is not empty ? Settings.googleG : ''}}',
  259.                 'lbl_info' : '{{'Wij gebruiken cookies om uw gebruikservaring te optimaliseren, het webverkeer te analyseren en gerichte advertenties te kunnen tonen via derde partijen.'|trans({},'cookiebar', app.request.locale)}}</p><p class="lbl-info-more">{{'Lees meer over hoe wij cookies gebruiken en hoe u ze kunt beheren door op "Instellingen" te klikken. Als u akkoord gaat met ons gebruik van cookies, klikt u op "Alle cookies toestaan".'|trans({},'cookiebar', app.request.locale)}}',
  260.                 'lbl_settings_info' : '{{'Geef hieronder aan welke opties u wilt toestaan tijdens het gebruik van deze website.'|trans({},'cookiebar', app.request.locale)}}',
  261.                 'lbl_essential' : '{{'Essentieel'|trans({},'cookiebar', app.request.locale)}}',
  262.                 'lbl_preferences' : '{{'Voorkeuren'|trans({},'cookiebar', app.request.locale)}}',
  263.                 'lbl_statistics' : '{{'Statistieken'|trans({},'cookiebar', app.request.locale)}}',
  264.                 'lbl_marketing' : '{{'Marketing'|trans({},'cookiebar', app.request.locale)}}',
  265.                 'lbl_tooltip_essential' : '{{'Noodzakelijke cookies helpen een website bruikbaarder te maken, door basisfuncties als paginanavigatie en toegang tot beveiligde gedeelten van de website mogelijk te maken. Zonder deze cookies kan de website niet naar behoren werken.'|trans({},'cookiebar', app.request.locale)}}',
  266.                 'lbl_tooltip_preferences' : '{{'Voorkeurscookies zorgen ervoor dat een website informatie kan onthouden die van invloed is op het gedrag en de vormgeving van de website, zoals de taal van uw voorkeur of de regio waar u woont.'|trans({},'cookiebar', app.request.locale)}}',
  267.                 'lbl_tooltip_statistics' : '{{'Statistische cookies helpen eigenaren van websites begrijpen hoe bezoekers hun website gebruiken, door anoniem gegevens te verzamelen en te rapporteren.'|trans({},'cookiebar', app.request.locale)}}',
  268.                 'lbl_tooltip_marketing' : '{{'Marketingcookies worden gebruikt om bezoekers te volgen wanneer ze verschillende websites bezoeken. Hun doel is advertenties weergeven die zijn toegesneden op en relevant zijn voor de individuele gebruiker.'|trans({},'cookiebar', app.request.locale)}}',
  269.                 'lbl_back' : '{{'Terug'|trans({},'cookiebar', app.request.locale)}}',
  270.                 'lbl_settings' : '{{'Instellingen'|trans({},'cookiebar', app.request.locale)}}',
  271.                 'lbl_accept' : '{{'Alle cookies toestaan'|trans({},'cookiebar', app.request.locale)}}',
  272.                 'lbl_save' : '{{'Accepteren en sluiten'|trans({},'cookiebar', app.request.locale)}}',
  273.                 'lbl_btn_reset' : '{{'Cookie instellingen'|trans({},'cookiebar', app.request.locale)}}',
  274.                 'link_cookie' : {{(Settings.avgCookie is not empty ? '\'' ~ Settings.avgCookie ~ '\'' : 'null')|raw}},
  275.                 'link_privacy' : {{(Settings.avgPrivacy is not empty ? '\'' ~ Settings.avgPrivacy ~ '\'' : 'null')|raw}},
  276.                 'link_disclaimer' : {{(Settings.avgDisclaimer is not empty ? '\'' ~ Settings.avgDisclaimer ~ '\'' : 'null')|raw}},
  277.                 'reset_btn' : {{Settings.cookiebarButton ? 'true' : 'false'}},
  278.                 'reset_btn_position' : '{{Settings.cookiebarButtonPosition}}',
  279.                 'reset_btn_offset_right' : '{{Settings.cookiebarButtonOffset}}',
  280.             };
  281.         </script>
  282.     {% else %}
  283.         {% if Settings.googleUa is not empty %}
  284.             <script type="text/javascript">
  285.                 var _gaq = _gaq || [];
  286.                 _gaq.push(['_setAccount', '{{Settings.googleUa}}']);
  287.                 _gaq.push(['_trackPageview']);
  288.                 (function() {
  289.                 var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
  290.                 ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
  291.                 var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  292.                 })();
  293.             </script>
  294.         {% endif %}
  295.         {% if Settings.googleGtm is not empty %}
  296.             <!-- Google Tag Manager (noscript) -->
  297.             <noscript><iframe data-src="https://www.googletagmanager.com/ns.html?id={{Settings.googleGtm}}"
  298.             height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
  299.             <!-- End Google Tag Manager (noscript) -->
  300.         {% endif %}
  301.     {% endif %}
  302.     {% if Timer is defined and Timer is not empty %}
  303.         {{Timer.show(false)|raw}}
  304.     {% endif %}
  305. {% endblock %}
  306. {% block footer1 %}{{Settings.footerBlock1|raw}}{% endblock %}
  307. {% block footer2 %}{{Settings.footerBlock2|raw}}{% endblock %}
  308. {% block footer3 %}{{Settings.footerBlock3|raw}}{% endblock %}
  309. {% block footer4 %}{{Settings.footerBlock4|raw}}{% endblock %}
  310. {% block footer5 %}{{Settings.footerBlock5|raw}}{% endblock %}