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

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/base.html.twig' %}
  2. {# Added infobar #}
  3. {% block base_main %}
  4.     {% sw_include '@Storefront/storefront/layout/header/header-infobar.html.twig' %}
  5.     {{ parent() }}
  6. {% endblock %}
  7. {# Added Trustpilot and Leadfeeder widgets #}
  8. {% block base_body_script %}
  9.     {{ parent() }}
  10.     {% if config('ChespackTheme.config.trustpilotCode') != ''  %}
  11.         <!-- TrustBox script -->
  12.         <script type="text/javascript" src="https://widget.trustpilot.com/bootstrap/v5/tp.widget.bootstrap.min.js" async></script>
  13.         <!-- End TrustBox script -->
  14.     {% endif %}
  15.     {# Include chat widget #}
  16.     {% if config('ChespackTheme.config.activateChatWidget') and config('ChespackTheme.config.chatWidgetKey') != '' %}
  17.         {% set widgetOptions = {
  18.             widgetKey: config('ChespackTheme.config.chatWidgetKey')
  19.         } %}
  20.         <script id="chatWidget" data-chat-widget="true" data-chat-widget-options="{{ widgetOptions|json_encode }}" type="text/javascript"></script>
  21.     {% endif %}
  22.     {# Include Leadfeeder script #}
  23.     <script>(function(ss,ex){ window.ldfdr=window.ldfdr||function(){(ldfdr._q=ldfdr._q||[]).push([].slice.call(arguments));}; (function(d,s){ fs=d.getElementsByTagName(s)[0]; function ce(src){ var cs=d.createElement(s); cs.src=src; cs.async=1; fs.parentNode.insertBefore(cs,fs); }; ce('https://sc.lfeeder.com/lftracker_v1_'+ss+(ex?'_'+ex:'')+'.js'); })(document,'script'); })('Xbp1oaErmXL8EdVj');</script>
  24. {% endblock %}
  25. {# Added product request check #}
  26. {% block base_body_inner %}
  27.     {# Add check if product request should be displayed #}
  28.     {% set isProductRequest = false %}
  29.     {% if config('ChespackTheme.config.activateRequest') == true and activeRoute == 'frontend.detail.page' %}
  30.         {% if page.product.translated.customFields.migration_attribute_4_request_quote_165 == true %}
  31.             {% set isProductRequest = true %}
  32.         {% endif %}
  33.     {% endif %}
  34.     {# Add check if user is logged in #}
  35.     {% set isUserLoggedIn = false %}
  36.     {% if context.customer or context.extensions.agent.id %}
  37.         {% set isUserLoggedIn = true %}
  38.     {% endif %}
  39.     {{ parent() }}
  40. {% endblock %}