var/cache/dev_h41800f5fdfafa409ea382bf45d0f7c63/twig/88/88ba93389bc4872eed96716e09cd1554212b97916a65b7e0ea2f1ee08fa7a3be.php line 51

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use function Shopware\Core\Framework\Adapter\Twig\sw_get_attribute;
  4. use function Shopware\Core\Framework\Adapter\Twig\sw_escape_filter;
  5. use Twig\Error\LoaderError;
  6. use Twig\Error\RuntimeError;
  7. use Twig\Extension\SandboxExtension;
  8. use Twig\Markup;
  9. use Twig\Sandbox\SecurityError;
  10. use Twig\Sandbox\SecurityNotAllowedTagError;
  11. use Twig\Sandbox\SecurityNotAllowedFilterError;
  12. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  13. use Twig\Source;
  14. use Twig\Template;
  15. /* @TrustedShops/storefront/base.html.twig */
  16. class __TwigTemplate_3d91c7e59d0cac276a15f123603f7ab03e1bb6a242d2aa3e13de36aefe1b86b7 extends Template
  17. {
  18.     private $source;
  19.     private $macros = [];
  20.     public function __construct(Environment $env)
  21.     {
  22.         parent::__construct($env);
  23.         $this->source $this->getSourceContext();
  24.         $this->blocks = [
  25.             'base_body_inner' => [$this'block_base_body_inner'],
  26.             'base_body_script' => [$this'block_base_body_script'],
  27.         ];
  28.     }
  29.     protected function doGetParent(array $context)
  30.     {
  31.         // line 2
  32.         return "@Storefront/storefront/base.html.twig";
  33.     }
  34.     protected function doDisplay(array $context, array $blocks = [])
  35.     {
  36.         $macros $this->macros;
  37.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  38.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@TrustedShops/storefront/base.html.twig"));
  39.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  40.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@TrustedShops/storefront/base.html.twig"));
  41.         $this->parent $this->loadTemplate("@Storefront/storefront/base.html.twig""@TrustedShops/storefront/base.html.twig"2);
  42.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  43.         
  44.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  45.         
  46.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  47.     }
  48.     // line 3
  49.     public function block_base_body_inner($context, array $blocks = [])
  50.     {
  51.         $macros $this->macros;
  52.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  53.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""base_body_inner"));
  54.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  55.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""base_body_inner"));
  56.         // line 4
  57.         echo "    ";
  58.         $this->displayParentBlock("base_body_inner"$context$blocks);
  59.         echo "
  60.     ";
  61.         // line 6
  62.         if (sw_get_attribute($this->env$this->source, ($context["trustedshops"] ?? null), "tsId", [], "any"falsefalsefalse6)) {
  63.             // line 7
  64.             echo "
  65.         ";
  66.             // line 9
  67.             echo "
  68.         ";
  69.             // line 10
  70.             if (sw_get_attribute($this->env$this->source, ($context["trustedshops"] ?? null), "tsTrustbadgeExpertMode", [], "any"falsefalsefalse10)) {
  71.                 // line 11
  72.                 echo "
  73.             ";
  74.                 // line 12
  75.                 echo twig_replace_filter(sw_get_attribute($this->env$this->source, ($context["trustedshops"] ?? null), "tsExpertTrustbadeCode", [], "any"falsefalsefalse12), ["%tsid%" => sw_get_attribute($this->env$this->source, ($context["trustedshops"] ?? null), "tsId", [], "any"falsefalsefalse12)]);
  76.                 echo "
  77.         ";
  78.             } else {
  79.                 // line 15
  80.                 echo "
  81.             <script type=\"text/javascript\">
  82.                 (function () {
  83.                     var _tsid = '";
  84.                 // line 18
  85.                 echo sw_escape_filter($this->envsw_escape_filter($this->envsw_get_attribute($this->env$this->source, ($context["trustedshops"] ?? null), "tsId", [], "any"falsefalsefalse18), "js"), "html"nulltrue);
  86.                 echo "';
  87.                     _tsConfig = {
  88.                         'yOffset': '";
  89.                 // line 20
  90.                 echo sw_escape_filter($this->env_twig_default_filter(sw_escape_filter($this->envsw_get_attribute($this->env$this->source, ($context["trustedshops"] ?? null), "tsTrustbadgeOffsetY", [], "any"falsefalsefalse20), "js"), "0"), "html"nulltrue);
  91.                 echo "', /* offset from page bottom */
  92.                         'variant': '";
  93.                 // line 21
  94.                 echo sw_escape_filter($this->env_twig_default_filter(sw_escape_filter($this->envsw_get_attribute($this->env$this->source, ($context["trustedshops"] ?? null), "tsTrustbadgeVariant", [], "any"falsefalsefalse21), "js"), "default"), "html"nulltrue);
  95.                 echo "', /* reviews, default, custom, custom_reviews */
  96.                         'customElementId': '', /* required for variants custom and custom_reviews */
  97.                         'trustcardDirection': '', /* for custom variants: topRight, topLeft, bottomRight, bottomLeft */
  98.                         'customBadgeWidth': '', /* for custom variants: 40 - 90 (in pixels) */
  99.                         'customBadgeHeight': '', /* for custom variants: 40 - 90 (in pixels) */
  100.                         'disableResponsive': 'false', /* deactivate responsive behaviour */
  101.                         ";
  102.                 // line 27
  103.                 if ((=== twig_compare(sw_get_attribute($this->env$this->source, ($context["trustedshops"] ?? null), "tsTrustbadgeVariant", [], "any"falsefalsefalse27), "hide"))) {
  104.                     // line 28
  105.                     echo "                        'disableTrustbadge': 'true', /* deactivate Trustbadge® */
  106.                         ";
  107.                 } else {
  108.                     // line 30
  109.                     echo "                        'disableTrustbadge': 'false', /* deactivate Trustbadge® */
  110.                         ";
  111.                 }
  112.                 // line 32
  113.                 echo "                        'responsive': {
  114.                             'variant': '', /* floating, custom */
  115.                             'customElementId': '' /* required for variant custom */
  116.                         }
  117.                     };
  118.                     var _ts = document.createElement('script');
  119.                     _ts.type = 'text/javascript';
  120.                     _ts.charset = 'utf-8';
  121.                     _ts.async = true;
  122.                     _ts.src = '//widgets.trustedshops.com/js/' + _tsid + '.js';
  123.                     var __ts = document.getElementsByTagName('script')[0];
  124.                     __ts.parentNode.insertBefore(_ts, __ts);
  125.                 })();
  126.             </script>
  127.         ";
  128.             }
  129.             // line 48
  130.             echo "
  131.         ";
  132.             // line 50
  133.             echo "
  134.         ";
  135.             // line 52
  136.             echo "
  137.         ";
  138.             // line 92
  139.             echo "
  140.         ";
  141.             // line 94
  142.             echo "
  143.     ";
  144.         }
  145.         // line 96
  146.         echo "
  147. ";
  148.         
  149.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  150.         
  151.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  152.     }
  153.     // line 99
  154.     public function block_base_body_script($context, array $blocks = [])
  155.     {
  156.         $macros $this->macros;
  157.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  158.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""base_body_script"));
  159.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  160.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""base_body_script"));
  161.         // line 100
  162.         echo "    ";
  163.         $this->displayParentBlock("base_body_script"$context$blocks);
  164.         echo "
  165.     ";
  166.         // line 103
  167.         echo "    <script type=\"text/javascript\">
  168.         (function() {
  169.             const reviewStickerElementSelector = \".ts-rating.testimonial\";
  170.             const productRatingStarsElementSelector = \".ts-rating.productreviewsSummary\";
  171.             const productReviewsElementSelector = \".ts-rating.productreviews\";
  172.             const reviewStickerParentSelector = \"";
  173.         // line 109
  174.         if (sw_get_attribute($this->env$this->source, ($context["trustedshops"] ?? null), "tsReviewStickerExpertMode", [], "any"falsefalsefalse109)) {
  175.             echo sw_escape_filter($this->envsw_escape_filter($this->envsw_get_attribute($this->env$this->source, ($context["trustedshops"] ?? null), "tsExpertReviewStickerJquerySelector", [], "any"falsefalsefalse109), "js"), "html"nulltrue);
  176.         }
  177.         echo "\";
  178.             const productRatingStarsParentSelector = \"";
  179.         // line 110
  180.         if (sw_get_attribute($this->env$this->source, ($context["trustedshops"] ?? null), "tsProductRatingStarsExpertMode", [], "any"falsefalsefalse110)) {
  181.             echo sw_escape_filter($this->envsw_escape_filter($this->envsw_get_attribute($this->env$this->source, ($context["trustedshops"] ?? null), "tsExpertProductRatingStarsJquerySelector", [], "any"falsefalsefalse110), "js"), "html"nulltrue);
  182.         }
  183.         echo "\";
  184.             const productReviewsParentSelector = \"";
  185.         // line 111
  186.         if (sw_get_attribute($this->env$this->source, ($context["trustedshops"] ?? null), "tsProductReviewsTabExpertMode", [], "any"falsefalsefalse111)) {
  187.             echo sw_escape_filter($this->envsw_escape_filter($this->envsw_get_attribute($this->env$this->source, ($context["trustedshops"] ?? null), "tsExpertProductReviewsTabJquerySelector", [], "any"falsefalsefalse111), "js"), "html"nulltrue);
  188.         }
  189.         echo "\";
  190.             const onJqueryLoaded = function( \$ ) {
  191.                 const waitForElement = function( selector, callback ) {
  192.                     const elementChecker = window.setInterval( function() {
  193.                         if( \$( selector ).length ) {
  194.                             window.clearInterval( elementChecker );
  195.                             callback.call( \$( selector ) );
  196.                         }
  197.                     }, 10 );
  198.                 };
  199.                 if( reviewStickerParentSelector ) {
  200.                     waitForElement( reviewStickerElementSelector, function() {
  201.                         \$( reviewStickerParentSelector ).append( this );
  202.                     });
  203.                 }
  204.                 if( productRatingStarsParentSelector ) {
  205.                     waitForElement( productRatingStarsElementSelector, function() {
  206.                         \$( productRatingStarsParentSelector ).append( this );
  207.                     });
  208.                 }
  209.                 if( productReviewsParentSelector ) {
  210.                     waitForElement( productReviewsElementSelector, function() {
  211.                         \$( productReviewsParentSelector ).append( this );
  212.                     });
  213.                 }
  214.             };
  215.             window.onload = function() {
  216.                 const jqueryChecker = window.setInterval( function() {
  217.                     if( window.jQuery )
  218.                     {
  219.                         window.clearInterval( jqueryChecker );
  220.                         onJqueryLoaded( window.jQuery );
  221.                     }
  222.                 }, 100 );
  223.             };
  224.         })();
  225.     </script>
  226.     ";
  227.         // line 157
  228.         echo "
  229. ";
  230.         
  231.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  232.         
  233.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  234.     }
  235.     public function getTemplateName()
  236.     {
  237.         return "@TrustedShops/storefront/base.html.twig";
  238.     }
  239.     public function isTraitable()
  240.     {
  241.         return false;
  242.     }
  243.     public function getDebugInfo()
  244.     {
  245.         return array (  258 => 157,  208 => 111,  202 => 110,  196 => 109,  188 => 103,  182 => 100,  172 => 99,  161 => 96,  157 => 94,  154 => 92,  151 => 52,  148 => 50,  145 => 48,  127 => 32,  123 => 30,  119 => 28,  117 => 27,  108 => 21,  104 => 20,  99 => 18,  94 => 15,  88 => 12,  85 => 11,  83 => 10,  80 => 9,  77 => 7,  75 => 6,  69 => 4,  59 => 3,  36 => 2,);
  246.     }
  247.     public function getSourceContext()
  248.     {
  249.         return new Source("{% sw_extends '@Storefront/storefront/base.html.twig' %}
  250. {% block base_body_inner %}
  251.     {{ parent() }}
  252.     {% if trustedshops.tsId %}
  253.         {# Trusted Shops Trustbadge - Start #}
  254.         {% if trustedshops.tsTrustbadgeExpertMode %}
  255.             {{ trustedshops.tsExpertTrustbadeCode|replace({'%tsid%': trustedshops.tsId})|raw }}
  256.         {% else %}
  257.             <script type=\"text/javascript\">
  258.                 (function () {
  259.                     var _tsid = '{{ trustedshops.tsId|escape('js') }}';
  260.                     _tsConfig = {
  261.                         'yOffset': '{{ trustedshops.tsTrustbadgeOffsetY|escape('js')|default('0') }}', /* offset from page bottom */
  262.                         'variant': '{{ trustedshops.tsTrustbadgeVariant|escape('js')|default('default') }}', /* reviews, default, custom, custom_reviews */
  263.                         'customElementId': '', /* required for variants custom and custom_reviews */
  264.                         'trustcardDirection': '', /* for custom variants: topRight, topLeft, bottomRight, bottomLeft */
  265.                         'customBadgeWidth': '', /* for custom variants: 40 - 90 (in pixels) */
  266.                         'customBadgeHeight': '', /* for custom variants: 40 - 90 (in pixels) */
  267.                         'disableResponsive': 'false', /* deactivate responsive behaviour */
  268.                         {% if trustedshops.tsTrustbadgeVariant == 'hide' %}
  269.                         'disableTrustbadge': 'true', /* deactivate Trustbadge® */
  270.                         {% else %}
  271.                         'disableTrustbadge': 'false', /* deactivate Trustbadge® */
  272.                         {% endif %}
  273.                         'responsive': {
  274.                             'variant': '', /* floating, custom */
  275.                             'customElementId': '' /* required for variant custom */
  276.                         }
  277.                     };
  278.                     var _ts = document.createElement('script');
  279.                     _ts.type = 'text/javascript';
  280.                     _ts.charset = 'utf-8';
  281.                     _ts.async = true;
  282.                     _ts.src = '//widgets.trustedshops.com/js/' + _tsid + '.js';
  283.                     var __ts = document.getElementsByTagName('script')[0];
  284.                     __ts.parentNode.insertBefore(_ts, __ts);
  285.                 })();
  286.             </script>
  287.         {% endif %}
  288.         {# Trusted Shops Trustbadge - End #}
  289.         {# Trusted Shops Rich Snippets - Start #}
  290.         {#{% if trustedshops.tsRichSnippetsActive %}
  291.             {% if
  292.                 ( controllerName|lower == 'navigation' and controllerAction|lower == 'home' and trustedshops.tsRichSnippetsPageTypeStart ) or
  293.                 ( controllerName|lower == 'navigation' and controllerAction|lower == 'index' and trustedshops.tsRichSnippetsPageTypeCategory ) or
  294.                 ( controllerName|lower == 'product' and trustedshops.tsRichSnippetsPageTypeProduct )
  295.             %}
  296.                 {% if trustedshops.tsRichSnippetsExpertMode %}
  297.                     {% set richSnippetCode = trustedshops.tsExpertRichSnippetsCode %}
  298.                     {% set richSnippetCode = richSnippetCode|replace({'%shopname%': shopware.config.core.basicInformation.shopName}) %}
  299.                     {% set richSnippetCode = richSnippetCode|replace({'%result%': trustedshops.tsShopAvgRating}) %}
  300.                     {% set richSnippetCode = richSnippetCode|replace({'%count%': trustedshops.tsShopRatingCount}) %}
  301.                     {% set richSnippetCode = richSnippetCode|replace({'%max%': '5'}) %}
  302.                     {{ richSnippetCode|raw }}
  303.                 {% else %}
  304.                     <script type=\"application/ld+json\">
  305.                         {
  306.                             \"@context\": \"http://schema.org\",
  307.                             \"@type\": \"Organization\",
  308.                             \"name\": \"{{ shopware.config.core.basicInformation.shopName|escape('js') }}\",
  309.                             \"aggregateRating\" : {
  310.                                 \"@type\": \"AggregateRating\",
  311.                                 \"ratingValue\" : \"{{ trustedshops.tsShopAvgRating|escape('js') }}\",
  312.                                 \"bestRating\" : \"5\",
  313.                                 \"ratingCount\" : \"{{ trustedshops.tsShopRatingCount|escape('js') }}\"
  314.                             }
  315.                         }
  316.                     </script>
  317.                 {% endif %}
  318.             {% endif %}
  319.         {% endif %}#}
  320.         {# Trusted Shops Trustbadge - End #}
  321.     {% endif %}
  322. {% endblock %}
  323. {% block base_body_script %}
  324.     {{ parent() }}
  325.     {# Trusted Shops jQuery Selector - Start #}
  326.     <script type=\"text/javascript\">
  327.         (function() {
  328.             const reviewStickerElementSelector = \".ts-rating.testimonial\";
  329.             const productRatingStarsElementSelector = \".ts-rating.productreviewsSummary\";
  330.             const productReviewsElementSelector = \".ts-rating.productreviews\";
  331.             const reviewStickerParentSelector = \"{% if trustedshops.tsReviewStickerExpertMode %}{{ trustedshops.tsExpertReviewStickerJquerySelector|escape('js') }}{% endif %}\";
  332.             const productRatingStarsParentSelector = \"{% if trustedshops.tsProductRatingStarsExpertMode %}{{ trustedshops.tsExpertProductRatingStarsJquerySelector|escape('js') }}{% endif %}\";
  333.             const productReviewsParentSelector = \"{% if trustedshops.tsProductReviewsTabExpertMode %}{{ trustedshops.tsExpertProductReviewsTabJquerySelector|escape('js') }}{% endif %}\";
  334.             const onJqueryLoaded = function( \$ ) {
  335.                 const waitForElement = function( selector, callback ) {
  336.                     const elementChecker = window.setInterval( function() {
  337.                         if( \$( selector ).length ) {
  338.                             window.clearInterval( elementChecker );
  339.                             callback.call( \$( selector ) );
  340.                         }
  341.                     }, 10 );
  342.                 };
  343.                 if( reviewStickerParentSelector ) {
  344.                     waitForElement( reviewStickerElementSelector, function() {
  345.                         \$( reviewStickerParentSelector ).append( this );
  346.                     });
  347.                 }
  348.                 if( productRatingStarsParentSelector ) {
  349.                     waitForElement( productRatingStarsElementSelector, function() {
  350.                         \$( productRatingStarsParentSelector ).append( this );
  351.                     });
  352.                 }
  353.                 if( productReviewsParentSelector ) {
  354.                     waitForElement( productReviewsElementSelector, function() {
  355.                         \$( productReviewsParentSelector ).append( this );
  356.                     });
  357.                 }
  358.             };
  359.             window.onload = function() {
  360.                 const jqueryChecker = window.setInterval( function() {
  361.                     if( window.jQuery )
  362.                     {
  363.                         window.clearInterval( jqueryChecker );
  364.                         onJqueryLoaded( window.jQuery );
  365.                     }
  366.                 }, 100 );
  367.             };
  368.         })();
  369.     </script>
  370.     {# Trusted Shops jQuery Selector - End #}
  371. {% endblock %}""@TrustedShops/storefront/base.html.twig""/data/www/stage.tuerschildshop/custom/plugins/TrustedShops/src/Resources/views/storefront/base.html.twig");
  372.     }
  373. }