<?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;
/* @EfbStorefront/storefront/page/product-detail/meta.html.twig */
class __TwigTemplate_f3f5d560aa5a5bf9c64a1b67b9c1edff extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'layout_head_meta_tags_opengraph' => [$this, 'block_layout_head_meta_tags_opengraph'],
'dreisc_seo__layout_head_meta_tags__ld_json' => [$this, 'block_dreisc_seo__layout_head_meta_tags__ld_json'],
];
}
protected function doGetParent(array $context)
{
// line 2
return "@EfbStorefront/storefront/layout/meta.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", "@EfbStorefront/storefront/page/product-detail/meta.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@EfbStorefront/storefront/page/product-detail/meta.html.twig"));
$this->parent = $this->loadTemplate("@EfbStorefront/storefront/layout/meta.html.twig", "@EfbStorefront/storefront/page/product-detail/meta.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 3
public function block_layout_head_meta_tags_opengraph($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", "layout_head_meta_tags_opengraph"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "layout_head_meta_tags_opengraph"));
// line 4
echo " <meta property=\"og:type\"
content=\"product\"/>
<meta property=\"og:site_name\"
content=\"";
// line 7
echo sw_escape_filter($this->env, $this->extensions['Shopware\Storefront\Framework\Twig\Extension\ConfigExtension']->config($context, "core.basicInformation.shopName"), "html", null, true);
echo "\"/>
<meta property=\"og:url\"
content=\"";
// line 9
echo sw_escape_filter($this->env, $this->extensions['Shopware\Core\Framework\Adapter\Twig\Extension\SeoUrlFunctionExtension']->seoUrl("frontend.detail.page", ["productId" => sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["page"] ?? null), "product", [], "any", false, false, false, 9), "id", [], "any", false, false, false, 9)]), "html", null, true);
echo "\"/>
<meta property=\"og:title\"
content=\"";
// line 11
echo sw_escape_filter($this->env, ($context["metaTitle"] ?? null), "html", null, true);
echo "\"/>
<meta property=\"og:description\"
content=\"";
// line 14
echo sw_escape_filter($this->env, ($context["metaDescription"] ?? null), "html", null, true);
echo "\"/>
<meta property=\"og:image\"
content=\"";
// line 16
echo sw_escape_filter($this->env, 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), "product", [], "any", false, false, false, 16), "cover", [], "any", false, false, false, 16), "media", [], "any", false, false, false, 16), "url", [], "any", false, false, false, 16), "html", null, true);
echo "\"/>
";
// line 18
if (sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["page"] ?? null), "product", [], "any", false, false, false, 18), "manufacturer", [], "any", false, false, false, 18)) {
// line 19
echo " <meta property=\"product:brand\"
content=\"";
// line 20
echo sw_escape_filter($this->env, 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), "product", [], "any", false, false, false, 20), "manufacturer", [], "any", false, false, false, 20), "translated", [], "any", false, false, false, 20), "name", [], "any", false, false, false, 20), "html", null, true);
echo "\"/>
";
}
// line 22
echo "
";
// line 23
$context["metaPrice"] = sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["page"] ?? null), "product", [], "any", false, false, false, 23), "calculatedPrice", [], "any", false, false, false, 23);
// line 24
echo " ";
if ((sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["page"] ?? null), "product", [], "any", false, false, false, 24), "calculatedPrices", [], "any", false, false, false, 24), "count", [], "any", false, false, false, 24) > 0)) {
// line 25
echo " ";
$context["metaPrice"] = sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["page"] ?? null), "product", [], "any", false, false, false, 25), "calculatedPrices", [], "any", false, false, false, 25), "last", [], "any", false, false, false, 25);
// line 26
echo " ";
}
// line 27
echo " ";
if (sw_get_attribute($this->env, $this->source, ($context["context"] ?? null), "customer", [], "any", false, false, false, 27)) {
// line 28
echo " <meta property=\"product:price:amount\" content=\"";
echo sw_escape_filter($this->env, twig_round(sw_get_attribute($this->env, $this->source, ($context["metaPrice"] ?? null), "unitPrice", [], "any", false, false, false, 28), sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["context"] ?? null), "currency", [], "any", false, false, false, 28), "itemRounding", [], "any", false, false, false, 28), "decimals", [], "any", false, false, false, 28)), "html", null, true);
echo "\"/>
";
}
// line 30
echo " <meta property=\"product:price:currency\"
content=\"";
// line 31
echo sw_escape_filter($this->env, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["context"] ?? null), "currency", [], "any", false, false, false, 31), "isoCode", [], "any", false, false, false, 31), "html", null, true);
echo "\"/>
<meta property=\"product:product_link\"
content=\"";
// line 33
echo sw_escape_filter($this->env, $this->extensions['Shopware\Core\Framework\Adapter\Twig\Extension\SeoUrlFunctionExtension']->seoUrl("frontend.detail.page", ["productId" => sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["page"] ?? null), "product", [], "any", false, false, false, 33), "id", [], "any", false, false, false, 33)]), "html", null, true);
echo "\"/>
<meta name=\"twitter:card\"
content=\"product\"/>
<meta name=\"twitter:site\"
content=\"";
// line 38
echo sw_escape_filter($this->env, $this->extensions['Shopware\Storefront\Framework\Twig\Extension\ConfigExtension']->config($context, "core.basicInformation.shopName"), "html", null, true);
echo "\"/>
<meta name=\"twitter:title\"
content=\"";
// line 40
echo sw_escape_filter($this->env, ($context["metaTitle"] ?? null), "html", null, true);
echo "\"/>
<meta name=\"twitter:description\"
content=\"";
// line 42
echo sw_escape_filter($this->env, ($context["metaDescription"] ?? null), "html", null, true);
echo "\"/>
<meta name=\"twitter:image\"
content=\"";
// line 44
echo sw_escape_filter($this->env, 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), "product", [], "any", false, false, false, 44), "cover", [], "any", false, false, false, 44), "media", [], "any", false, false, false, 44), "url", [], "any", false, false, false, 44), "html", null, true);
echo "\"/>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 47
public function block_dreisc_seo__layout_head_meta_tags__ld_json($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", "dreisc_seo__layout_head_meta_tags__ld_json"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "dreisc_seo__layout_head_meta_tags__ld_json"));
// line 48
echo " ";
// line 49
echo " ";
$context["richSnippetDataStruct"] = (($__internal_compile_0 = sw_get_attribute($this->env, $this->source, ($context["page"] ?? null), "extensions", [], "any", false, false, false, 49)) && is_array($__internal_compile_0) || $__internal_compile_0 instanceof ArrayAccess ? ($__internal_compile_0[twig_constant("DreiscSeoPro\\Subscriber\\Installment\\RichSnippet\\RichSnippetSubscriber::DREISC_SEO_INSTALLMENT_RICH_SNIPPET_DATA")] ?? null) : null);
// line 50
echo " ";
$context["modifiedRichSnippetDataStruct"] = [];
// line 51
echo "
";
// line 52
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(sw_get_attribute($this->env, $this->source, ($context["richSnippetDataStruct"] ?? null), "ldJson", [], "any", false, false, false, 52));
foreach ($context['_seq'] as $context["_key"] => $context["snippet"]) {
// line 53
echo " ";
if (((($__internal_compile_1 = $context["snippet"]) && is_array($__internal_compile_1) || $__internal_compile_1 instanceof ArrayAccess ? ($__internal_compile_1["@type"] ?? null) : null) == "Product")) {
// line 54
echo " ";
$context["updated_offers"] = [];
// line 55
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(sw_get_attribute($this->env, $this->source, $context["snippet"], "offers", [], "any", false, false, false, 55));
foreach ($context['_seq'] as $context["_key"] => $context["offer"]) {
// line 56
echo " ";
$context["filtered_offer"] = twig_array_merge($context["offer"], ["price" => null]);
// line 57
echo " ";
$context["filtered_offer"] = $this->extensions['Shopware\Core\Framework\Adapter\Twig\SecurityExtension']->filter(($context["filtered_offer"] ?? null), function ($__key__, $__value__) use ($context, $macros) { $context["key"] = $__key__; $context["value"] = $__value__; return (($context["key"] ?? null) != "price"); });
// line 58
echo " ";
$context["updated_offers"] = twig_array_merge(($context["updated_offers"] ?? null), [0 => ($context["filtered_offer"] ?? null)]);
// line 59
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['offer'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 60
echo "
";
// line 61
$context["snippet"] = twig_array_merge($context["snippet"], ["offers" => ($context["updated_offers"] ?? null)]);
// line 62
echo " ";
}
// line 63
echo "
";
// line 64
$context["modifiedRichSnippetDataStruct"] = twig_array_merge(($context["modifiedRichSnippetDataStruct"] ?? null), [0 => $context["snippet"]]);
// line 65
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['snippet'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 66
echo "
";
// line 67
if ( !(null === ($context["modifiedRichSnippetDataStruct"] ?? null))) {
// line 68
echo " <script type=\"application/ld+json\">
";
// line 69
echo $this->env->getFilter('json_encode')->getCallable()(($context["modifiedRichSnippetDataStruct"] ?? null));
echo "
</script>
";
}
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
public function getTemplateName()
{
return "@EfbStorefront/storefront/page/product-detail/meta.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 254 => 69, 251 => 68, 249 => 67, 246 => 66, 240 => 65, 238 => 64, 235 => 63, 232 => 62, 230 => 61, 227 => 60, 221 => 59, 218 => 58, 215 => 57, 212 => 56, 207 => 55, 204 => 54, 201 => 53, 197 => 52, 194 => 51, 191 => 50, 188 => 49, 186 => 48, 176 => 47, 164 => 44, 159 => 42, 154 => 40, 149 => 38, 141 => 33, 136 => 31, 133 => 30, 127 => 28, 124 => 27, 121 => 26, 118 => 25, 115 => 24, 113 => 23, 110 => 22, 105 => 20, 102 => 19, 100 => 18, 95 => 16, 90 => 14, 84 => 11, 79 => 9, 74 => 7, 69 => 4, 59 => 3, 36 => 2,);
}
public function getSourceContext()
{
return new Source("{% sw_extends '@Storefront/storefront/layout/meta.html.twig' %}
{% block layout_head_meta_tags_opengraph %}
<meta property=\"og:type\"
content=\"product\"/>
<meta property=\"og:site_name\"
content=\"{{ config('core.basicInformation.shopName') }}\"/>
<meta property=\"og:url\"
content=\"{{ seoUrl('frontend.detail.page', { productId: page.product.id }) }}\"/>
<meta property=\"og:title\"
content=\"{{ metaTitle }}\"/>
<meta property=\"og:description\"
content=\"{{ metaDescription }}\"/>
<meta property=\"og:image\"
content=\"{{ page.product.cover.media.url }}\"/>
{% if page.product.manufacturer %}
<meta property=\"product:brand\"
content=\"{{ page.product.manufacturer.translated.name }}\"/>
{% endif %}
{% set metaPrice = page.product.calculatedPrice %}
{% if page.product.calculatedPrices.count > 0 %}
{% set metaPrice = page.product.calculatedPrices.last %}
{% endif %}
{% if context.customer %}
<meta property=\"product:price:amount\" content=\"{{ metaPrice.unitPrice|round(context.currency.itemRounding.decimals) }}\"/>
{% endif %}
<meta property=\"product:price:currency\"
content=\"{{ context.currency.isoCode }}\"/>
<meta property=\"product:product_link\"
content=\"{{ seoUrl('frontend.detail.page', { productId: page.product.id }) }}\"/>
<meta name=\"twitter:card\"
content=\"product\"/>
<meta name=\"twitter:site\"
content=\"{{ config('core.basicInformation.shopName') }}\"/>
<meta name=\"twitter:title\"
content=\"{{ metaTitle }}\"/>
<meta name=\"twitter:description\"
content=\"{{ metaDescription }}\"/>
<meta name=\"twitter:image\"
content=\"{{ page.product.cover.media.url }}\"/>
{% endblock %}
{% block dreisc_seo__layout_head_meta_tags__ld_json %}
{# remove price from jsonld serp #}
{% set richSnippetDataStruct = page.extensions[constant('DreiscSeoPro\\\\Subscriber\\\\Installment\\\\RichSnippet\\\\RichSnippetSubscriber::DREISC_SEO_INSTALLMENT_RICH_SNIPPET_DATA')] %}
{% set modifiedRichSnippetDataStruct = [] %}
{% for snippet in richSnippetDataStruct.ldJson %}
{% if snippet['@type'] == 'Product' %}
{% set updated_offers = [] %}
{% for offer in snippet.offers %}
{% set filtered_offer = offer|merge({'price': null}) %}
{% set filtered_offer = filtered_offer|filter((key, value) => key != 'price') %}
{% set updated_offers = updated_offers|merge([filtered_offer]) %}
{% endfor %}
{% set snippet = snippet|merge({'offers': updated_offers}) %}
{% endif %}
{% set modifiedRichSnippetDataStruct = modifiedRichSnippetDataStruct|merge([snippet]) %}
{% endfor %}
{% if modifiedRichSnippetDataStruct is not null %}
<script type=\"application/ld+json\">
{{ modifiedRichSnippetDataStruct|json_encode|raw }}
</script>
{% endif %}
{% endblock %}", "@EfbStorefront/storefront/page/product-detail/meta.html.twig", "/var/www/share/efb-elektronik.dev.mc.emzcustomers.de/shopware6/custom/static-plugins/EfbStorefront/Resources/views/storefront/page/product-detail/meta.html.twig");
}
}