<?php
use Twig\Environment;
use function Shopware\Core\Framework\Adapter\Twig\sw_get_attribute;
use function Shopware\Core\Framework\Adapter\Twig\sw_escape_filter;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @TrustedShops/storefront/base.html.twig */
class __TwigTemplate_3d91c7e59d0cac276a15f123603f7ab03e1bb6a242d2aa3e13de36aefe1b86b7 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'base_body_inner' => [$this, 'block_base_body_inner'],
'base_body_script' => [$this, 'block_base_body_script'],
];
}
protected function doGetParent(array $context)
{
// line 2
return "@Storefront/storefront/base.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@TrustedShops/storefront/base.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@TrustedShops/storefront/base.html.twig"));
$this->parent = $this->loadTemplate("@Storefront/storefront/base.html.twig", "@TrustedShops/storefront/base.html.twig", 2);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
// line 3
public function block_base_body_inner($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "base_body_inner"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "base_body_inner"));
// line 4
echo " ";
$this->displayParentBlock("base_body_inner", $context, $blocks);
echo "
";
// line 6
if (sw_get_attribute($this->env, $this->source, ($context["trustedshops"] ?? null), "tsId", [], "any", false, false, false, 6)) {
// line 7
echo "
";
// line 9
echo "
";
// line 10
if (sw_get_attribute($this->env, $this->source, ($context["trustedshops"] ?? null), "tsTrustbadgeExpertMode", [], "any", false, false, false, 10)) {
// line 11
echo "
";
// line 12
echo twig_replace_filter(sw_get_attribute($this->env, $this->source, ($context["trustedshops"] ?? null), "tsExpertTrustbadeCode", [], "any", false, false, false, 12), ["%tsid%" => sw_get_attribute($this->env, $this->source, ($context["trustedshops"] ?? null), "tsId", [], "any", false, false, false, 12)]);
echo "
";
} else {
// line 15
echo "
<script type=\"text/javascript\">
(function () {
var _tsid = '";
// line 18
echo sw_escape_filter($this->env, sw_escape_filter($this->env, sw_get_attribute($this->env, $this->source, ($context["trustedshops"] ?? null), "tsId", [], "any", false, false, false, 18), "js"), "html", null, true);
echo "';
_tsConfig = {
'yOffset': '";
// line 20
echo sw_escape_filter($this->env, _twig_default_filter(sw_escape_filter($this->env, sw_get_attribute($this->env, $this->source, ($context["trustedshops"] ?? null), "tsTrustbadgeOffsetY", [], "any", false, false, false, 20), "js"), "0"), "html", null, true);
echo "', /* offset from page bottom */
'variant': '";
// line 21
echo sw_escape_filter($this->env, _twig_default_filter(sw_escape_filter($this->env, sw_get_attribute($this->env, $this->source, ($context["trustedshops"] ?? null), "tsTrustbadgeVariant", [], "any", false, false, false, 21), "js"), "default"), "html", null, true);
echo "', /* reviews, default, custom, custom_reviews */
'customElementId': '', /* required for variants custom and custom_reviews */
'trustcardDirection': '', /* for custom variants: topRight, topLeft, bottomRight, bottomLeft */
'customBadgeWidth': '', /* for custom variants: 40 - 90 (in pixels) */
'customBadgeHeight': '', /* for custom variants: 40 - 90 (in pixels) */
'disableResponsive': 'false', /* deactivate responsive behaviour */
";
// line 27
if ((0 === twig_compare(sw_get_attribute($this->env, $this->source, ($context["trustedshops"] ?? null), "tsTrustbadgeVariant", [], "any", false, false, false, 27), "hide"))) {
// line 28
echo " 'disableTrustbadge': 'true', /* deactivate Trustbadge® */
";
} else {
// line 30
echo " 'disableTrustbadge': 'false', /* deactivate Trustbadge® */
";
}
// line 32
echo " 'responsive': {
'variant': '', /* floating, custom */
'customElementId': '' /* required for variant custom */
}
};
var _ts = document.createElement('script');
_ts.type = 'text/javascript';
_ts.charset = 'utf-8';
_ts.async = true;
_ts.src = '//widgets.trustedshops.com/js/' + _tsid + '.js';
var __ts = document.getElementsByTagName('script')[0];
__ts.parentNode.insertBefore(_ts, __ts);
})();
</script>
";
}
// line 48
echo "
";
// line 50
echo "
";
// line 52
echo "
";
// line 92
echo "
";
// line 94
echo "
";
}
// line 96
echo "
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 99
public function block_base_body_script($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "base_body_script"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "base_body_script"));
// line 100
echo " ";
$this->displayParentBlock("base_body_script", $context, $blocks);
echo "
";
// line 103
echo " <script type=\"text/javascript\">
(function() {
const reviewStickerElementSelector = \".ts-rating.testimonial\";
const productRatingStarsElementSelector = \".ts-rating.productreviewsSummary\";
const productReviewsElementSelector = \".ts-rating.productreviews\";
const reviewStickerParentSelector = \"";
// line 109
if (sw_get_attribute($this->env, $this->source, ($context["trustedshops"] ?? null), "tsReviewStickerExpertMode", [], "any", false, false, false, 109)) {
echo sw_escape_filter($this->env, sw_escape_filter($this->env, sw_get_attribute($this->env, $this->source, ($context["trustedshops"] ?? null), "tsExpertReviewStickerJquerySelector", [], "any", false, false, false, 109), "js"), "html", null, true);
}
echo "\";
const productRatingStarsParentSelector = \"";
// line 110
if (sw_get_attribute($this->env, $this->source, ($context["trustedshops"] ?? null), "tsProductRatingStarsExpertMode", [], "any", false, false, false, 110)) {
echo sw_escape_filter($this->env, sw_escape_filter($this->env, sw_get_attribute($this->env, $this->source, ($context["trustedshops"] ?? null), "tsExpertProductRatingStarsJquerySelector", [], "any", false, false, false, 110), "js"), "html", null, true);
}
echo "\";
const productReviewsParentSelector = \"";
// line 111
if (sw_get_attribute($this->env, $this->source, ($context["trustedshops"] ?? null), "tsProductReviewsTabExpertMode", [], "any", false, false, false, 111)) {
echo sw_escape_filter($this->env, sw_escape_filter($this->env, sw_get_attribute($this->env, $this->source, ($context["trustedshops"] ?? null), "tsExpertProductReviewsTabJquerySelector", [], "any", false, false, false, 111), "js"), "html", null, true);
}
echo "\";
const onJqueryLoaded = function( \$ ) {
const waitForElement = function( selector, callback ) {
const elementChecker = window.setInterval( function() {
if( \$( selector ).length ) {
window.clearInterval( elementChecker );
callback.call( \$( selector ) );
}
}, 10 );
};
if( reviewStickerParentSelector ) {
waitForElement( reviewStickerElementSelector, function() {
\$( reviewStickerParentSelector ).append( this );
});
}
if( productRatingStarsParentSelector ) {
waitForElement( productRatingStarsElementSelector, function() {
\$( productRatingStarsParentSelector ).append( this );
});
}
if( productReviewsParentSelector ) {
waitForElement( productReviewsElementSelector, function() {
\$( productReviewsParentSelector ).append( this );
});
}
};
window.onload = function() {
const jqueryChecker = window.setInterval( function() {
if( window.jQuery )
{
window.clearInterval( jqueryChecker );
onJqueryLoaded( window.jQuery );
}
}, 100 );
};
})();
</script>
";
// line 157
echo "
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
public function getTemplateName()
{
return "@TrustedShops/storefront/base.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
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,);
}
public function getSourceContext()
{
return new Source("{% sw_extends '@Storefront/storefront/base.html.twig' %}
{% block base_body_inner %}
{{ parent() }}
{% if trustedshops.tsId %}
{# Trusted Shops Trustbadge - Start #}
{% if trustedshops.tsTrustbadgeExpertMode %}
{{ trustedshops.tsExpertTrustbadeCode|replace({'%tsid%': trustedshops.tsId})|raw }}
{% else %}
<script type=\"text/javascript\">
(function () {
var _tsid = '{{ trustedshops.tsId|escape('js') }}';
_tsConfig = {
'yOffset': '{{ trustedshops.tsTrustbadgeOffsetY|escape('js')|default('0') }}', /* offset from page bottom */
'variant': '{{ trustedshops.tsTrustbadgeVariant|escape('js')|default('default') }}', /* reviews, default, custom, custom_reviews */
'customElementId': '', /* required for variants custom and custom_reviews */
'trustcardDirection': '', /* for custom variants: topRight, topLeft, bottomRight, bottomLeft */
'customBadgeWidth': '', /* for custom variants: 40 - 90 (in pixels) */
'customBadgeHeight': '', /* for custom variants: 40 - 90 (in pixels) */
'disableResponsive': 'false', /* deactivate responsive behaviour */
{% if trustedshops.tsTrustbadgeVariant == 'hide' %}
'disableTrustbadge': 'true', /* deactivate Trustbadge® */
{% else %}
'disableTrustbadge': 'false', /* deactivate Trustbadge® */
{% endif %}
'responsive': {
'variant': '', /* floating, custom */
'customElementId': '' /* required for variant custom */
}
};
var _ts = document.createElement('script');
_ts.type = 'text/javascript';
_ts.charset = 'utf-8';
_ts.async = true;
_ts.src = '//widgets.trustedshops.com/js/' + _tsid + '.js';
var __ts = document.getElementsByTagName('script')[0];
__ts.parentNode.insertBefore(_ts, __ts);
})();
</script>
{% endif %}
{# Trusted Shops Trustbadge - End #}
{# Trusted Shops Rich Snippets - Start #}
{#{% if trustedshops.tsRichSnippetsActive %}
{% if
( controllerName|lower == 'navigation' and controllerAction|lower == 'home' and trustedshops.tsRichSnippetsPageTypeStart ) or
( controllerName|lower == 'navigation' and controllerAction|lower == 'index' and trustedshops.tsRichSnippetsPageTypeCategory ) or
( controllerName|lower == 'product' and trustedshops.tsRichSnippetsPageTypeProduct )
%}
{% if trustedshops.tsRichSnippetsExpertMode %}
{% set richSnippetCode = trustedshops.tsExpertRichSnippetsCode %}
{% set richSnippetCode = richSnippetCode|replace({'%shopname%': shopware.config.core.basicInformation.shopName}) %}
{% set richSnippetCode = richSnippetCode|replace({'%result%': trustedshops.tsShopAvgRating}) %}
{% set richSnippetCode = richSnippetCode|replace({'%count%': trustedshops.tsShopRatingCount}) %}
{% set richSnippetCode = richSnippetCode|replace({'%max%': '5'}) %}
{{ richSnippetCode|raw }}
{% else %}
<script type=\"application/ld+json\">
{
\"@context\": \"http://schema.org\",
\"@type\": \"Organization\",
\"name\": \"{{ shopware.config.core.basicInformation.shopName|escape('js') }}\",
\"aggregateRating\" : {
\"@type\": \"AggregateRating\",
\"ratingValue\" : \"{{ trustedshops.tsShopAvgRating|escape('js') }}\",
\"bestRating\" : \"5\",
\"ratingCount\" : \"{{ trustedshops.tsShopRatingCount|escape('js') }}\"
}
}
</script>
{% endif %}
{% endif %}
{% endif %}#}
{# Trusted Shops Trustbadge - End #}
{% endif %}
{% endblock %}
{% block base_body_script %}
{{ parent() }}
{# Trusted Shops jQuery Selector - Start #}
<script type=\"text/javascript\">
(function() {
const reviewStickerElementSelector = \".ts-rating.testimonial\";
const productRatingStarsElementSelector = \".ts-rating.productreviewsSummary\";
const productReviewsElementSelector = \".ts-rating.productreviews\";
const reviewStickerParentSelector = \"{% if trustedshops.tsReviewStickerExpertMode %}{{ trustedshops.tsExpertReviewStickerJquerySelector|escape('js') }}{% endif %}\";
const productRatingStarsParentSelector = \"{% if trustedshops.tsProductRatingStarsExpertMode %}{{ trustedshops.tsExpertProductRatingStarsJquerySelector|escape('js') }}{% endif %}\";
const productReviewsParentSelector = \"{% if trustedshops.tsProductReviewsTabExpertMode %}{{ trustedshops.tsExpertProductReviewsTabJquerySelector|escape('js') }}{% endif %}\";
const onJqueryLoaded = function( \$ ) {
const waitForElement = function( selector, callback ) {
const elementChecker = window.setInterval( function() {
if( \$( selector ).length ) {
window.clearInterval( elementChecker );
callback.call( \$( selector ) );
}
}, 10 );
};
if( reviewStickerParentSelector ) {
waitForElement( reviewStickerElementSelector, function() {
\$( reviewStickerParentSelector ).append( this );
});
}
if( productRatingStarsParentSelector ) {
waitForElement( productRatingStarsElementSelector, function() {
\$( productRatingStarsParentSelector ).append( this );
});
}
if( productReviewsParentSelector ) {
waitForElement( productReviewsElementSelector, function() {
\$( productReviewsParentSelector ).append( this );
});
}
};
window.onload = function() {
const jqueryChecker = window.setInterval( function() {
if( window.jQuery )
{
window.clearInterval( jqueryChecker );
onJqueryLoaded( window.jQuery );
}
}, 100 );
};
})();
</script>
{# Trusted Shops jQuery Selector - End #}
{% endblock %}", "@TrustedShops/storefront/base.html.twig", "/data/www/stage.tuerschildshop/custom/plugins/TrustedShops/src/Resources/views/storefront/base.html.twig");
}
}