var/cache/dev_hb199fda60d64cb4aeee9e3d553e0f6c1/twig/29/29384587b6b6f9fb5c8ccf7c95644cab8caf70e5f00171475061d09b8b0ef1d2.php line 40

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\SandboxExtension;
  6. use Twig\Markup;
  7. use Twig\Sandbox\SecurityError;
  8. use Twig\Sandbox\SecurityNotAllowedTagError;
  9. use Twig\Sandbox\SecurityNotAllowedFilterError;
  10. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  11. use Twig\Source;
  12. use Twig\Template;
  13. /* @Storefront/storefront/page/product-detail/meta.html.twig */
  14. class __TwigTemplate_5cf0162eb8812a11426a6f71043452ac extends Template
  15. {
  16.     private $source;
  17.     private $macros = [];
  18.     public function __construct(Environment $env)
  19.     {
  20.         parent::__construct($env);
  21.         $this->source $this->getSourceContext();
  22.         $this->blocks = [
  23.             'layout_head_meta_tags_opengraph' => [$this'block_layout_head_meta_tags_opengraph'],
  24.             'layout_head_title_inner' => [$this'block_layout_head_title_inner'],
  25.             'layout_head_canonical' => [$this'block_layout_head_canonical'],
  26.         ];
  27.     }
  28.     protected function doGetParent(array $context)
  29.     {
  30.         // line 2
  31.         return "@Storefront/storefront/layout/meta.html.twig";
  32.     }
  33.     protected function doDisplay(array $context, array $blocks = [])
  34.     {
  35.         $macros $this->macros;
  36.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  37.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@Storefront/storefront/page/product-detail/meta.html.twig"));
  38.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  39.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@Storefront/storefront/page/product-detail/meta.html.twig"));
  40.         // line 0
  41.         echo "<!-- INCLUDE BEGIN @Storefront/storefront/page/product-detail/meta.html.twig (vendor/shopware/storefront/Resources/views/storefront/page/product-detail/meta.html.twig) -->";
  42.         echo "<!-- INCLUDE END @Storefront/storefront/page/product-detail/meta.html.twig -->";
  43.         // line 2
  44.         $this->parent $this->loadTemplate("@Storefront/storefront/layout/meta.html.twig""@Storefront/storefront/page/product-detail/meta.html.twig"2);
  45.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  46.         
  47.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  48.         
  49.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  50.     }
  51.     // line 3
  52.     public function block_layout_head_meta_tags_opengraph($context, array $blocks = [])
  53.     {
  54.         $macros $this->macros;
  55.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  56.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""layout_head_meta_tags_opengraph"));
  57.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  58.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""layout_head_meta_tags_opengraph"));
  59.         // line 4
  60.         echo "    <meta property=\"og:type\"
  61.           content=\"product\"/>
  62.     <meta property=\"og:site_name\"
  63.           content=\"";
  64.         // line 7
  65.         echo twig_escape_filter($this->env$this->extensions['Shopware\Storefront\Framework\Twig\Extension\ConfigExtension']->config($context"core.basicInformation.shopName"), "html"nulltrue);
  66.         echo "\"/>
  67.     <meta property=\"og:url\"
  68.           content=\"";
  69.         // line 9
  70.         echo twig_escape_filter($this->env$this->extensions['Shopware\Core\Framework\Adapter\Twig\Extension\SeoUrlFunctionExtension']->seoUrl("frontend.detail.page", ["productId" => twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, ($context["page"] ?? null), "product", [], "any"falsefalsefalse9), "id", [], "any"falsefalsefalse9)]), "html"nulltrue);
  71.         echo "\"/>
  72.     <meta property=\"og:title\"
  73.           content=\"";
  74.         // line 11
  75.         echo twig_escape_filter($this->env, ($context["metaTitle"] ?? null), "html"nulltrue);
  76.         echo "\"/>
  77.     <meta property=\"og:description\"
  78.           content=\"";
  79.         // line 14
  80.         echo twig_escape_filter($this->env, ($context["metaDescription"] ?? null), "html"nulltrue);
  81.         echo "\"/>
  82.     <meta property=\"og:image\"
  83.           content=\"";
  84.         // line 16
  85.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, ($context["page"] ?? null), "product", [], "any"falsefalsefalse16), "cover", [], "any"falsefalsefalse16), "media", [], "any"falsefalsefalse16), "url", [], "any"falsefalsefalse16), "html"nulltrue);
  86.         echo "\"/>
  87.     ";
  88.         // line 18
  89.         if (twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, ($context["page"] ?? null), "product", [], "any"falsefalsefalse18), "manufacturer", [], "any"falsefalsefalse18)) {
  90.             // line 19
  91.             echo "        <meta property=\"product:brand\"
  92.               content=\"";
  93.             // line 20
  94.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, ($context["page"] ?? null), "product", [], "any"falsefalsefalse20), "manufacturer", [], "any"falsefalsefalse20), "translated", [], "any"falsefalsefalse20), "name", [], "any"falsefalsefalse20), "html"nulltrue);
  95.             echo "\"/>
  96.     ";
  97.         }
  98.         // line 22
  99.         echo "
  100.     ";
  101.         // line 23
  102.         $context["metaPrice"] = twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, ($context["page"] ?? null), "product", [], "any"falsefalsefalse23), "calculatedPrice", [], "any"falsefalsefalse23);
  103.         // line 24
  104.         echo "    ";
  105.         if ((twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, ($context["page"] ?? null), "product", [], "any"falsefalsefalse24), "calculatedPrices", [], "any"falsefalsefalse24), "count", [], "any"falsefalsefalse24) > 0)) {
  106.             // line 25
  107.             echo "        ";
  108.             $context["metaPrice"] = twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, ($context["page"] ?? null), "product", [], "any"falsefalsefalse25), "calculatedPrices", [], "any"falsefalsefalse25), "last", [], "any"falsefalsefalse25);
  109.             // line 26
  110.             echo "    ";
  111.         }
  112.         // line 27
  113.         echo "    <meta property=\"product:price:amount\"
  114.           content=\"";
  115.         // line 28
  116.         echo twig_escape_filter($this->envtwig_round(twig_get_attribute($this->env$this->source, ($context["metaPrice"] ?? null), "unitPrice", [], "any"falsefalsefalse28), twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, ($context["context"] ?? null), "currency", [], "any"falsefalsefalse28), "itemRounding", [], "any"falsefalsefalse28), "decimals", [], "any"falsefalsefalse28)), "html"nulltrue);
  117.         echo "\"/>
  118.     <meta property=\"product:price:currency\"
  119.           content=\"";
  120.         // line 30
  121.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, ($context["context"] ?? null), "currency", [], "any"falsefalsefalse30), "isoCode", [], "any"falsefalsefalse30), "html"nulltrue);
  122.         echo "\"/>
  123.     <meta property=\"product:product_link\"
  124.           content=\"";
  125.         // line 32
  126.         echo twig_escape_filter($this->env$this->extensions['Shopware\Core\Framework\Adapter\Twig\Extension\SeoUrlFunctionExtension']->seoUrl("frontend.detail.page", ["productId" => twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, ($context["page"] ?? null), "product", [], "any"falsefalsefalse32), "id", [], "any"falsefalsefalse32)]), "html"nulltrue);
  127.         echo "\"/>
  128.     <meta name=\"twitter:card\"
  129.           content=\"product\"/>
  130.     <meta name=\"twitter:site\"
  131.           content=\"";
  132.         // line 37
  133.         echo twig_escape_filter($this->env$this->extensions['Shopware\Storefront\Framework\Twig\Extension\ConfigExtension']->config($context"core.basicInformation.shopName"), "html"nulltrue);
  134.         echo "\"/>
  135.     <meta name=\"twitter:title\"
  136.           content=\"";
  137.         // line 39
  138.         echo twig_escape_filter($this->env, ($context["metaTitle"] ?? null), "html"nulltrue);
  139.         echo "\"/>
  140.     <meta name=\"twitter:description\"
  141.           content=\"";
  142.         // line 41
  143.         echo twig_escape_filter($this->env, ($context["metaDescription"] ?? null), "html"nulltrue);
  144.         echo "\"/>
  145.     <meta name=\"twitter:image\"
  146.           content=\"";
  147.         // line 43
  148.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, ($context["page"] ?? null), "product", [], "any"falsefalsefalse43), "cover", [], "any"falsefalsefalse43), "media", [], "any"falsefalsefalse43), "url", [], "any"falsefalsefalse43), "html"nulltrue);
  149.         echo "\"/>
  150. ";
  151.         
  152.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  153.         
  154.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  155.     }
  156.     // line 46
  157.     public function block_layout_head_title_inner($context, array $blocks = [])
  158.     {
  159.         $macros $this->macros;
  160.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  161.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""layout_head_title_inner"));
  162.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  163.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""layout_head_title_inner"));
  164.         // line 47
  165.         echo "    ";
  166.         if (twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, ($context["page"] ?? null), "metaInformation", [], "any"falsefalsefalse47), "metaTitle", [], "any"falsefalsefalse47)) {
  167.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, ($context["page"] ?? null), "metaInformation", [], "any"falsefalsefalse47), "metaTitle", [], "any"falsefalsefalse47), "html"nulltrue);
  168.         } else {
  169.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, ($context["page"] ?? null), "product", [], "any"falsefalsefalse47), "translated", [], "any"falsefalsefalse47), "name", [], "any"falsefalsefalse47), "html"nulltrue);
  170.             if (twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, ($context["page"] ?? null), "product", [], "any"falsefalsefalse47), "variation", [], "any"falsefalsefalse47)) {
  171.                 echo " - ";
  172.                 $context['_parent'] = $context;
  173.                 $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, ($context["page"] ?? null), "product", [], "any"falsefalsefalse47), "variation", [], "any"falsefalsefalse47));
  174.                 foreach ($context['_seq'] as $context["_key"] => $context["variation"]) {
  175.                     echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["variation"], "group", [], "any"falsefalsefalse47), "html"nulltrue);
  176.                     echo ": ";
  177.                     echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["variation"], "option", [], "any"falsefalsefalse47), "html"nulltrue);
  178.                     if ((twig_last($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, ($context["page"] ?? null), "product", [], "any"falsefalsefalse47), "variation", [], "any"falsefalsefalse47)) != $context["variation"])) {
  179.                         echo " | ";
  180.                     }
  181.                 }
  182.                 $_parent $context['_parent'];
  183.                 unset($context['_seq'], $context['_iterated'], $context['_key'], $context['variation'], $context['_parent'], $context['loop']);
  184.                 $context array_intersect_key($context$_parent) + $_parent;
  185.             }
  186.         }
  187.         
  188.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  189.         
  190.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  191.     }
  192.     // line 50
  193.     public function block_layout_head_canonical($context, array $blocks = [])
  194.     {
  195.         $macros $this->macros;
  196.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  197.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""layout_head_canonical"));
  198.         // line 0
  199.         echo "<!-- BLOCK BEGIN layout_head_canonical (vendor/shopware/storefront/Resources/views/storefront/page/product-detail/meta.html.twig) -->";
  200.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  201.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""layout_head_canonical"));
  202.         // line 51
  203.         echo "    ";
  204.         $context["canonicalUrl"] = twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, ($context["page"] ?? null), "product", [], "any"falsefalsefalse51), "id", [], "any"falsefalsefalse51);
  205.         // line 52
  206.         echo "
  207.     ";
  208.         // line 53
  209.         if (twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, ($context["page"] ?? null), "product", [], "any"falsefalsefalse53), "canonicalProductId", [], "any"falsefalsefalse53)) {
  210.             // line 54
  211.             echo "        ";
  212.             $context["canonicalUrl"] = twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, ($context["page"] ?? null), "product", [], "any"falsefalsefalse54), "canonicalProductId", [], "any"falsefalsefalse54);
  213.             // line 55
  214.             echo "    ";
  215.         }
  216.         // line 56
  217.         echo "
  218.     <link rel=\"canonical\" href=\"";
  219.         // line 57
  220.         echo twig_escape_filter($this->env$this->extensions['Shopware\Core\Framework\Adapter\Twig\Extension\SeoUrlFunctionExtension']->seoUrl("frontend.detail.page", ["productId" => ($context["canonicalUrl"] ?? null)]), "html"nulltrue);
  221.         echo "\" />
  222. ";
  223.         
  224.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  225.         // line 0
  226.         echo "<!-- BLOCK END layout_head_canonical -->";
  227.         
  228.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  229.     }
  230.     public function getTemplateName()
  231.     {
  232.         return "@Storefront/storefront/page/product-detail/meta.html.twig";
  233.     }
  234.     public function isTraitable()
  235.     {
  236.         return false;
  237.     }
  238.     public function getDebugInfo()
  239.     {
  240.         return array (  254 => 0,  247 => 57,  244 => 56,  241 => 55,  238 => 54,  236 => 53,  233 => 52,  230 => 51,  225 => 0,  218 => 50,  187 => 47,  177 => 46,  165 => 43,  160 => 41,  155 => 39,  150 => 37,  142 => 32,  137 => 30,  132 => 28,  129 => 27,  126 => 26,  123 => 25,  120 => 24,  118 => 23,  115 => 22,  110 => 20,  107 => 19,  105 => 18,  100 => 16,  95 => 14,  89 => 11,  84 => 9,  79 => 7,  74 => 4,  64 => 3,  53 => 2,  50 => 0,  37 => 2,);
  241.     }
  242.     public function getSourceContext()
  243.     {
  244.         return new Source("{% sw_extends '@Storefront/storefront/layout/meta.html.twig' %}
  245. {% block layout_head_meta_tags_opengraph %}
  246.     <meta property=\"og:type\"
  247.           content=\"product\"/>
  248.     <meta property=\"og:site_name\"
  249.           content=\"{{ config('core.basicInformation.shopName') }}\"/>
  250.     <meta property=\"og:url\"
  251.           content=\"{{ seoUrl('frontend.detail.page', { productId: page.product.id }) }}\"/>
  252.     <meta property=\"og:title\"
  253.           content=\"{{ metaTitle }}\"/>
  254.     <meta property=\"og:description\"
  255.           content=\"{{ metaDescription }}\"/>
  256.     <meta property=\"og:image\"
  257.           content=\"{{ page.product.cover.media.url }}\"/>
  258.     {% if page.product.manufacturer %}
  259.         <meta property=\"product:brand\"
  260.               content=\"{{ page.product.manufacturer.translated.name }}\"/>
  261.     {% endif %}
  262.     {% set metaPrice = page.product.calculatedPrice %}
  263.     {% if page.product.calculatedPrices.count > 0 %}
  264.         {% set metaPrice = page.product.calculatedPrices.last %}
  265.     {% endif %}
  266.     <meta property=\"product:price:amount\"
  267.           content=\"{{ metaPrice.unitPrice|round(context.currency.itemRounding.decimals) }}\"/>
  268.     <meta property=\"product:price:currency\"
  269.           content=\"{{ context.currency.isoCode }}\"/>
  270.     <meta property=\"product:product_link\"
  271.           content=\"{{ seoUrl('frontend.detail.page', { productId: page.product.id }) }}\"/>
  272.     <meta name=\"twitter:card\"
  273.           content=\"product\"/>
  274.     <meta name=\"twitter:site\"
  275.           content=\"{{ config('core.basicInformation.shopName') }}\"/>
  276.     <meta name=\"twitter:title\"
  277.           content=\"{{ metaTitle }}\"/>
  278.     <meta name=\"twitter:description\"
  279.           content=\"{{ metaDescription }}\"/>
  280.     <meta name=\"twitter:image\"
  281.           content=\"{{ page.product.cover.media.url }}\"/>
  282. {% endblock %}
  283. {% block layout_head_title_inner %}
  284.     {% if page.metaInformation.metaTitle %}{{ page.metaInformation.metaTitle }}{% else %}{{ page.product.translated.name }}{% if page.product.variation %} - {% for variation in page.product.variation %}{{ variation.group }}: {{ variation.option }}{% if page.product.variation|last != variation %}{{ \" | \" }}{% endif %}{% endfor %}{% endif %}{% endif %}
  285. {% endblock %}
  286. {% block layout_head_canonical %}
  287.     {% set canonicalUrl = page.product.id %}
  288.     {% if page.product.canonicalProductId %}
  289.         {% set canonicalUrl = page.product.canonicalProductId %}
  290.     {% endif %}
  291.     <link rel=\"canonical\" href=\"{{ seoUrl('frontend.detail.page', { productId: canonicalUrl }) }}\" />
  292. {% endblock %}
  293. ""@Storefront/storefront/page/product-detail/meta.html.twig""/home/p-a6iu1i/html/hbc-shopware-stage-qcsct/dev/vendor/shopware/storefront/Resources/views/storefront/page/product-detail/meta.html.twig");
  294.     }
  295. }