vendor/store.shopware.com/mediameetsfbpixel/src/Resources/views/storefront/base.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/base.html.twig' %}
  2. {% block base_body_script %}
  3.     {% with %}
  4.         {% if config('mediameetsFbPixel.config.pixelIds') and config('mediameetsFbPixel.config.pixelIds') is not empty %}
  5.             {% set pluginConfig = config('mediameetsFbPixel.config') %}
  6.             {% set csrfToken = sw_csrf('frontend.mediameetsFbPixel.conversionApi', {"mode": "token"}) %}
  7.             {% if shopware.csrfMode is same as ('ajax') %}
  8.                 {% set csrfToken = null %}
  9.             {% endif %}
  10.             {% set pluginOptions = {
  11.                 'config': {
  12.                     'pixelIds': pluginConfig.pixelIds,
  13.                     'privacyMode': pluginConfig.privacyMode,
  14.                     'autoConfig': pluginConfig.autoConfig,
  15.                     'advancedMatching': pluginConfig.advancedMatching,
  16.                     'includeShippingCosts': pluginConfig.includeShippingCosts,
  17.                     'useConversionApi': pluginConfig.useConversionApi,
  18.                     'disablePushState': pluginConfig.disablePushState,
  19.                     'conversionApiDeduplication': pluginConfig.conversionApiDeduplication
  20.                 },
  21.                 'shop': {
  22.                     'controller': controllerName|lower,
  23.                     'action': controllerAction|lower,
  24.                     'currency': context.currency.isoCode
  25.                 },
  26.                 'routes': {
  27.                     'store-api.cart': path('store-api.checkout.cart.read'),
  28.                     'store-api.context': path('store-api.context'),
  29.                     'store-api.order': path('store-api.order')
  30.                 },
  31.                 'conversionApi': {
  32.                     'endpoint': path('frontend.mediameetsFbPixel.conversionApi'),
  33.                     'token': csrfToken
  34.                 }
  35.              } %}
  36.             <div data-mediameets-facebook-pixel-options='{{ pluginOptions|json_encode }}'></div>
  37.         {% endif %}
  38.     {% endwith %}
  39.     {{ parent() }}
  40. {% endblock %}