<?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;
/* @TrustedShopsEasyIntegrationS6/storefront/base.html.twig */
class __TwigTemplate_0830bfd3fd747df07befb8d2f00f01cb extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'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_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@TrustedShopsEasyIntegrationS6/storefront/base.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@TrustedShopsEasyIntegrationS6/storefront/base.html.twig"));
// line 3
$context["tsConfig"] = $this->extensions['Shopware\Storefront\Framework\Twig\Extension\ConfigExtension']->config($context, "trustedShopsApp.config");
// line 4
$context["tsChannelId"] = (((sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["context"] ?? null), "salesChannel", [], "any", false, true, false, 4), "id", [], "any", true, true, false, 4) && !(null === sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["context"] ?? null), "salesChannel", [], "any", false, true, false, 4), "id", [], "any", false, false, false, 4)))) ? (sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["context"] ?? null), "salesChannel", [], "any", false, true, false, 4), "id", [], "any", false, false, false, 4)) : (null));
// line 5
$context["activeLanguageIsoCode"] = (((sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["page"] ?? null), "header", [], "any", false, true, false, 5), "activeLanguage", [], "any", false, true, false, 5), "translationCode", [], "any", false, true, false, 5), "code", [], "any", true, true, false, 5) && !(null === sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["page"] ?? null), "header", [], "any", false, true, false, 5), "activeLanguage", [], "any", false, true, false, 5), "translationCode", [], "any", false, true, false, 5), "code", [], "any", false, false, false, 5)))) ? (sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["page"] ?? null), "header", [], "any", false, true, false, 5), "activeLanguage", [], "any", false, true, false, 5), "translationCode", [], "any", false, true, false, 5), "code", [], "any", false, false, false, 5)) : (null));
// line 6
$context["tsChannelRef"] = ((($context["tsChannelId"] ?? null) . ".") . ($context["activeLanguageIsoCode"] ?? null));
// line 7
$context["expectedMapping"] = [];
// line 9
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(sw_get_attribute($this->env, $this->source, ($context["tsConfig"] ?? null), "mappedChannels", [], "any", false, false, false, 9));
foreach ($context['_seq'] as $context["_key"] => $context["mappedChannel"]) {
// line 10
$context["expectedMapping"] = twig_array_merge(($context["expectedMapping"] ?? null), [sw_get_attribute($this->env, $this->source, $context["mappedChannel"], "salesChannelRef", [], "any", false, false, false, 10) => sw_get_attribute($this->env, $this->source, $context["mappedChannel"], "eTrustedChannelRef", [], "any", false, false, false, 10)]);
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['mappedChannel'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 2
$this->parent = $this->loadTemplate("@Storefront/storefront/base.html.twig", "@TrustedShopsEasyIntegrationS6/storefront/base.html.twig", 2);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 13
public function block_base_body_script($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "base_body_script"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "base_body_script"));
// line 14
echo " ";
$this->displayParentBlock("base_body_script", $context, $blocks);
echo "
";
// line 16
if ((sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["tsConfig"] ?? null), ($context["tsChannelId"] ?? null), [], "array", false, true, false, 16), ($context["activeLanguageIsoCode"] ?? null), [], "array", false, true, false, 16), "trustbadgeConfiguration", [], "any", true, true, false, 16) && ((($__internal_compile_0 = ($context["expectedMapping"] ?? null)) && is_array($__internal_compile_0) || $__internal_compile_0 instanceof ArrayAccess ? ($__internal_compile_0[($context["tsChannelRef"] ?? null)] ?? null) : null) === sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, (($__internal_compile_1 = (($__internal_compile_2 = ($context["tsConfig"] ?? null)) && is_array($__internal_compile_2) || $__internal_compile_2 instanceof ArrayAccess ? ($__internal_compile_2[($context["tsChannelId"] ?? null)] ?? null) : null)) && is_array($__internal_compile_1) || $__internal_compile_1 instanceof ArrayAccess ? ($__internal_compile_1[($context["activeLanguageIsoCode"] ?? null)] ?? null) : null), "trustbadgeConfiguration", [], "any", false, false, false, 16), "eTrustedChannelRef", [], "any", false, false, false, 16)))) {
// line 17
echo " ";
$context["tsTrustBadgeConfiguration"] = sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, (($__internal_compile_3 = (($__internal_compile_4 = ($context["tsConfig"] ?? null)) && is_array($__internal_compile_4) || $__internal_compile_4 instanceof ArrayAccess ? ($__internal_compile_4[($context["tsChannelId"] ?? null)] ?? null) : null)) && is_array($__internal_compile_3) || $__internal_compile_3 instanceof ArrayAccess ? ($__internal_compile_3[($context["activeLanguageIsoCode"] ?? null)] ?? null) : null), "trustbadgeConfiguration", [], "any", false, false, false, 17), "children", [], "any", false, false, false, 17);
// line 18
echo "
";
// line 19
$this->loadTemplate("@TrustedShopsEasyIntegrationS6/storefront/includes/script-assembler.html.twig", "@TrustedShopsEasyIntegrationS6/storefront/base.html.twig", 19)->display(twig_array_merge($context, ["scriptConfig" => (($__internal_compile_5 = // line 20
($context["tsTrustBadgeConfiguration"] ?? null)) && is_array($__internal_compile_5) || $__internal_compile_5 instanceof ArrayAccess ? ($__internal_compile_5[0] ?? null) : null)]));
// line 22
echo " ";
}
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
public function getTemplateName()
{
return "@TrustedShopsEasyIntegrationS6/storefront/base.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 106 => 22, 104 => 20, 103 => 19, 100 => 18, 97 => 17, 95 => 16, 89 => 14, 79 => 13, 68 => 2, 62 => 10, 58 => 9, 56 => 7, 54 => 6, 52 => 5, 50 => 4, 48 => 3, 35 => 2,);
}
public function getSourceContext()
{
return new Source("{% sw_extends '@Storefront/storefront/base.html.twig' %}
{% set tsConfig = config('trustedShopsApp.config') %}
{% set tsChannelId = context.salesChannel.id ?? null %}
{% set activeLanguageIsoCode = page.header.activeLanguage.translationCode.code ?? null %}
{% set tsChannelRef = tsChannelId ~ '.' ~ activeLanguageIsoCode %}
{% set expectedMapping = [] %}
{% foreach tsConfig.mappedChannels as mappedChannel %}
{% set expectedMapping = expectedMapping|merge({ (mappedChannel.salesChannelRef): mappedChannel.eTrustedChannelRef}) %}
{% endforeach %}
{% block base_body_script %}
{{ parent() }}
{% if tsConfig[tsChannelId][activeLanguageIsoCode].trustbadgeConfiguration is defined and expectedMapping[tsChannelRef] === tsConfig[tsChannelId][activeLanguageIsoCode].trustbadgeConfiguration.eTrustedChannelRef %}
{% set tsTrustBadgeConfiguration = tsConfig[tsChannelId][activeLanguageIsoCode].trustbadgeConfiguration.children %}
{% sw_include '@Storefront/storefront/includes/script-assembler.html.twig' with {
scriptConfig: tsTrustBadgeConfiguration[0]
} %}
{% endif %}
{% endblock %}
{#
{% block base_main_inner %}
{{ parent() }}
{% if tsChannelId is not null %}
{% if tsConfig[tsChannelId].productReviewActive is defined and tsConfig[tsChannelId].productReviewActive is not null %}
<!-- added by Trusted Shops app: Start -->
<div class=\"ts-margin-container container\">
<div class=\"row\">
<div class=\"col-12\">
{% sw_include '@Storefront/storefront/includes/widget-assembler.html.twig' with {
widgets: tsConfig[tsChannelId].widgets.children.0.children,
product: product,
widgetLocationId: 'wdg-loc-lrm'
} %}
</div>
</div>
</div>
<!-- End -->
{% endif %}
{% endif %}
{% endblock %}#}
", "@TrustedShopsEasyIntegrationS6/storefront/base.html.twig", "/var/customers/webs/fporzellan/htdocs/custom/apps/TrustedShopsEasyIntegrationS6/Resources/views/storefront/base.html.twig");
}
}