var/cache/dev/twig/5d/5d3c5bf7dee8ca9d6c3d172dc8481c536a002a01da6c7521eca59e5411606bd7.php line 89

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. /* @SyliusShop/Product/show.html.twig */
  14. class __TwigTemplate_265b18061a0416d3b2ed1080ae0db4e7a1cf114df8010549b0fc459e36b5646b extends \Twig\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.             'stylesheets' => [$this'block_stylesheets'],
  24.             'javascripts' => [$this'block_javascripts'],
  25.             'title' => [$this'block_title'],
  26.             'breadcrumb' => [$this'block_breadcrumb'],
  27.             'content' => [$this'block_content'],
  28.         ];
  29.     }
  30.     protected function doGetParent(array $context)
  31.     {
  32.         // line 1
  33.         return "@SyliusShop/layout.html.twig";
  34.     }
  35.     protected function doDisplay(array $context, array $blocks = [])
  36.     {
  37.         $macros $this->macros;
  38.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  39.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@SyliusShop/Product/show.html.twig"));
  40.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  41.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@SyliusShop/Product/show.html.twig"));
  42.         $this->parent $this->loadTemplate("@SyliusShop/layout.html.twig""@SyliusShop/Product/show.html.twig"1);
  43.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  44.         
  45.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  46.         
  47.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  48.     }
  49.     // line 3
  50.     public function block_stylesheets($context, array $blocks = [])
  51.     {
  52.         $macros $this->macros;
  53.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  54.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""stylesheets"));
  55.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  56.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""stylesheets"));
  57.         // line 4
  58.         echo "    ";
  59.         $this->displayParentBlock("stylesheets"$context$blocks);
  60.         echo "
  61.     ";
  62.         // line 5
  63.         echo $this->extensions['Symfony\WebpackEncoreBundle\Twig\EntryFilesTwigExtension']->renderWebpackLinkTags("shop-product-detail"null"bootstrapTheme");
  64.         echo "
  65. ";
  66.         
  67.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  68.         
  69.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  70.     }
  71.     // line 8
  72.     public function block_javascripts($context, array $blocks = [])
  73.     {
  74.         $macros $this->macros;
  75.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  76.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascripts"));
  77.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  78.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascripts"));
  79.         // line 9
  80.         echo "    ";
  81.         $this->displayParentBlock("javascripts"$context$blocks);
  82.         echo "
  83.     ";
  84.         // line 10
  85.         echo $this->extensions['Symfony\WebpackEncoreBundle\Twig\EntryFilesTwigExtension']->renderWebpackScriptTags("shop-product-detail"null"bootstrapTheme");
  86.         echo "
  87.     ";
  88.         // line 12
  89.         $this->loadTemplate("@SyliusShop/_tracking/data_layer.html.twig""@SyliusShop/Product/show.html.twig"12)->display($context);
  90.         // line 13
  91.         echo "
  92.     <script>
  93.         (function () {
  94.             ";
  95.         // line 17
  96.         echo "            ";
  97.         $context["variant"] = twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'17$this->source); })()), "variants", [], "any"falsefalsefalse17), "first", [], "any"falsefalsefalse17);
  98.         // line 18
  99.         echo "            ";
  100.         $context["tier_prices"] = twig_get_attribute($this->env$this->source, (isset($context["variant"]) || array_key_exists("variant"$context) ? $context["variant"] : (function () { throw new RuntimeError('Variable "variant" does not exist.'18$this->source); })()), "getTierPricesForChannel", [=> twig_get_attribute($this->env$this->source, (isset($context["sylius"]) || array_key_exists("sylius"$context) ? $context["sylius"] : (function () { throw new RuntimeError('Variable "sylius" does not exist.'18$this->source); })()), "channel", [], "any"falsefalsefalse18), => twig_get_attribute($this->env$this->source, (isset($context["sylius"]) || array_key_exists("sylius"$context) ? $context["sylius"] : (function () { throw new RuntimeError('Variable "sylius" does not exist.'18$this->source); })()), "customer", [], "any"falsefalsefalse18)], "method"falsefalsefalse18);
  101.         // line 19
  102.         echo "
  103.             ";
  104.         // line 20
  105.         if ((twig_length_filter($this->env, (isset($context["tier_prices"]) || array_key_exists("tier_prices"$context) ? $context["tier_prices"] : (function () { throw new RuntimeError('Variable "tier_prices" does not exist.'20$this->source); })())) > 0)) {
  106.             // line 21
  107.             echo "            ";
  108.             $context["tier_price"] = twig_first($this->env, (isset($context["tier_prices"]) || array_key_exists("tier_prices"$context) ? $context["tier_prices"] : (function () { throw new RuntimeError('Variable "tier_prices" does not exist.'21$this->source); })()));
  109.             // line 22
  110.             echo "            ";
  111.             // line 23
  112.             echo "            ";
  113.             $context["unit_price"] = (twig_get_attribute($this->env$this->source, (isset($context["tier_price"]) || array_key_exists("tier_price"$context) ? $context["tier_price"] : (function () { throw new RuntimeError('Variable "tier_price" does not exist.'23$this->source); })()), "price", [], "any"falsefalsefalse23) / 100000);
  114.             // line 24
  115.             echo "            ";
  116.             // line 25
  117.             echo "            ";
  118.             $context["qty"] = twig_get_attribute($this->env$this->source, (isset($context["tier_price"]) || array_key_exists("tier_price"$context) ? $context["tier_price"] : (function () { throw new RuntimeError('Variable "tier_price" does not exist.'25$this->source); })()), "qty", [], "any"falsefalsefalse25);
  119.             // line 26
  120.             echo "            ";
  121.         } else {
  122.             // line 27
  123.             echo "            ";
  124.             $context["unit_price"] = ($this->extensions['App\Twig\PriceExtension']->calculatePriceWithTax((isset($context["variant"]) || array_key_exists("variant"$context) ? $context["variant"] : (function () { throw new RuntimeError('Variable "variant" does not exist.'27$this->source); })()), ["channel" => twig_get_attribute($this->env$this->source, (isset($context["sylius"]) || array_key_exists("sylius"$context) ? $context["sylius"] : (function () { throw new RuntimeError('Variable "sylius" does not exist.'27$this->source); })()), "channel", [], "any"falsefalsefalse27), "zone" => twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["sylius"]) || array_key_exists("sylius"$context) ? $context["sylius"] : (function () { throw new RuntimeError('Variable "sylius" does not exist.'27$this->source); })()), "channel", [], "any"falsefalsefalse27), "defaultTaxZone", [], "any"falsefalsefalse27)]) / 100000);
  125.             // line 28
  126.             echo "            ";
  127.             $context["qty"] = 1;
  128.             // line 29
  129.             echo "            ";
  130.         }
  131.         // line 30
  132.         echo "
  133.             ";
  134.         // line 32
  135.         echo "            const totalValue = ";
  136.         echo twig_escape_filter($this->envtwig_number_format_filter($this->env, ((isset($context["unit_price"]) || array_key_exists("unit_price"$context) ? $context["unit_price"] : (function () { throw new RuntimeError('Variable "unit_price" does not exist.'32$this->source); })()) * (isset($context["qty"]) || array_key_exists("qty"$context) ? $context["qty"] : (function () { throw new RuntimeError('Variable "qty" does not exist.'32$this->source); })())), 2"."""), "html"nulltrue);
  137.         echo ";
  138.             const unitPrice = ";
  139.         // line 33
  140.         echo twig_escape_filter($this->envtwig_number_format_filter($this->env, (isset($context["unit_price"]) || array_key_exists("unit_price"$context) ? $context["unit_price"] : (function () { throw new RuntimeError('Variable "unit_price" does not exist.'33$this->source); })()), 5"."""), "html"nulltrue);
  141.         echo ";
  142.             const quantity = ";
  143.         // line 34
  144.         echo twig_escape_filter($this->env, (isset($context["qty"]) || array_key_exists("qty"$context) ? $context["qty"] : (function () { throw new RuntimeError('Variable "qty" does not exist.'34$this->source); })()), "html"nulltrue);
  145.         echo ";
  146.             const item = {
  147.                 item_id: ";
  148.         // line 37
  149.         echo json_encode(twig_get_attribute($this->env$this->source, (isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'37$this->source); })()), "code", [], "any"falsefalsefalse37));
  150.         echo ",
  151.                 item_name: ";
  152.         // line 38
  153.         echo json_encode(twig_get_attribute($this->env$this->source, (isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'38$this->source); })()), "name", [], "any"falsefalsefalse38));
  154.         echo ",
  155.                 item_variant: ";
  156.         // line 39
  157.         echo json_encode(twig_get_attribute($this->env$this->source, (isset($context["variant"]) || array_key_exists("variant"$context) ? $context["variant"] : (function () { throw new RuntimeError('Variable "variant" does not exist.'39$this->source); })()), "code", [], "any"falsefalsefalse39));
  158.         echo ",
  159.                 item_category: ";
  160.         // line 40
  161.         echo ((twig_get_attribute($this->env$this->source, (isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'40$this->source); })()), "mainTaxon", [], "any"falsefalsefalse40)) ? (json_encode(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'40$this->source); })()), "mainTaxon", [], "any"falsefalsefalse40), "name", [], "any"falsefalsefalse40))) : ("\"Unknown\""));
  162.         echo ",
  163.                 price: unitPrice,   // TU JE JEDNOTKOVÁ (0.03696)
  164.                 quantity: quantity  // TU JE QUANTITY (16361)
  165.             };
  166.             ";
  167.         // line 46
  168.         echo "            window.dataLayer = window.dataLayer || [];
  169.             window.dataLayer.push({ ecommerce: null });
  170.             window.dataLayer.push({
  171.                 event: \"view_item\",
  172.                 ecommerce: {
  173.                     currency: ";
  174.         // line 51
  175.         echo json_encode(twig_get_attribute($this->env$this->source, (isset($context["sylius"]) || array_key_exists("sylius"$context) ? $context["sylius"] : (function () { throw new RuntimeError('Variable "sylius" does not exist.'51$this->source); })()), "currencyCode", [], "any"falsefalsefalse51));
  176.         echo ",
  177.                     value: totalValue, // TU JE CELKOVÁ (604.70)
  178.                     items: [item]
  179.                 }
  180.             });
  181.             console.log(\"GA4 Detailný Debug:\", {
  182.                 currency: ";
  183.         // line 58
  184.         echo json_encode(twig_get_attribute($this->env$this->source, (isset($context["sylius"]) || array_key_exists("sylius"$context) ? $context["sylius"] : (function () { throw new RuntimeError('Variable "sylius" does not exist.'58$this->source); })()), "currencyCode", [], "any"falsefalsefalse58));
  185.         echo ",
  186.                 value: totalValue, // TU JE CELKOVÁ (604.70)
  187.                 items: [item]
  188.             });
  189.         })();
  190.     </script>
  191. ";
  192.         
  193.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  194.         
  195.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  196.     }
  197.     // line 66
  198.     public function block_title($context, array $blocks = [])
  199.     {
  200.         $macros $this->macros;
  201.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  202.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  203.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  204.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  205.         // line 67
  206.         echo "    ";
  207.         echo $this->extensions['Sylius\Bundle\UiBundle\Twig\TemplateEventExtension']->render("dedi_sylius_seo_plugin.title", ["resource" => (($context["product"]) ?? (twig_get_attribute($this->env$this->source, (isset($context["sylius"]) || array_key_exists("sylius"$context) ? $context["sylius"] : (function () { throw new RuntimeError('Variable "sylius" does not exist.'67$this->source); })()), "channel", [], "any"falsefalsefalse67)))]);
  208.         echo "
  209. ";
  210.         
  211.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  212.         
  213.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  214.     }
  215.     // line 70
  216.     public function block_breadcrumb($context, array $blocks = [])
  217.     {
  218.         $macros $this->macros;
  219.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  220.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""breadcrumb"));
  221.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  222.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""breadcrumb"));
  223.         // line 71
  224.         echo "    ";
  225.         $this->loadTemplate("@SyliusShop/Product/Show/_breadcrumb.html.twig""@SyliusShop/Product/show.html.twig"71)->display($context);
  226.         
  227.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  228.         
  229.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  230.     }
  231.     // line 74
  232.     public function block_content($context, array $blocks = [])
  233.     {
  234.         $macros $this->macros;
  235.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  236.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""content"));
  237.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  238.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""content"));
  239.         // line 75
  240.         echo "    <div class=\"row product-detail\">
  241.         <div class=\"col-md-3 d-none d-lg-block\">
  242.             ";
  243.         // line 77
  244.         $this->loadTemplate("@SyliusShop/Product/Index/_sidebar.html.twig""@SyliusShop/Product/show.html.twig"77)->display($context);
  245.         // line 78
  246.         echo "        </div>
  247.         <div class=\"col-lg-9\">
  248.             ";
  249.         // line 80
  250.         $this->loadTemplate("@SyliusShop/Product/Show/_header.html.twig""@SyliusShop/Product/show.html.twig"80)->display($context);
  251.         // line 81
  252.         echo "
  253.             <div class=\"row\">
  254.                 <div class=\"col-sm-12 mb-4 col-md-6\">
  255.                     ";
  256.         // line 84
  257.         echo $this->extensions['Sylius\Bundle\UiBundle\Twig\TemplateEventExtension']->render("sylius.shop.product.show.left_sidebar"$context);
  258.         echo "
  259.                 </div>
  260.                 <div class=\"col-sm-12 col-md-6 ps-md-5\">
  261.                     ";
  262.         // line 88
  263.         echo $this->extensions['Sylius\Bundle\UiBundle\Twig\TemplateEventExtension']->render("sylius.shop.product.show.right_sidebar"$context);
  264.         echo "
  265.                 </div>
  266.             </div>
  267.             ";
  268.         // line 92
  269.         echo $this->extensions['Sylius\Bundle\UiBundle\Twig\TemplateEventExtension']->render("sylius.shop.product.show.content"$context);
  270.         echo "
  271.         </div>
  272.     </div>
  273. ";
  274.         
  275.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  276.         
  277.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  278.     }
  279.     public function getTemplateName()
  280.     {
  281.         return "@SyliusShop/Product/show.html.twig";
  282.     }
  283.     public function isTraitable()
  284.     {
  285.         return false;
  286.     }
  287.     public function getDebugInfo()
  288.     {
  289.         return array (  309 => 92,  302 => 88,  295 => 84,  290 => 81,  288 => 80,  284 => 78,  282 => 77,  278 => 75,  268 => 74,  257 => 71,  247 => 70,  234 => 67,  224 => 66,  207 => 58,  197 => 51,  190 => 46,  182 => 40,  178 => 39,  174 => 38,  170 => 37,  164 => 34,  160 => 33,  155 => 32,  152 => 30,  149 => 29,  146 => 28,  143 => 27,  140 => 26,  137 => 25,  135 => 24,  132 => 23,  130 => 22,  127 => 21,  125 => 20,  122 => 19,  119 => 18,  116 => 17,  111 => 13,  109 => 12,  104 => 10,  99 => 9,  89 => 8,  77 => 5,  72 => 4,  62 => 3,  39 => 1,);
  290.     }
  291.     public function getSourceContext()
  292.     {
  293.         return new Source("{% extends '@SyliusShop/layout.html.twig' %}
  294. {% block stylesheets %}
  295.     {{ parent() }}
  296.     {{ encore_entry_link_tags('shop-product-detail', null, 'bootstrapTheme') }}
  297. {% endblock %}
  298. {% block javascripts %}
  299.     {{ parent() }}
  300.     {{ encore_entry_script_tags('shop-product-detail', null, 'bootstrapTheme') }}
  301.     {% include '@SyliusShop/_tracking/data_layer.html.twig' %}
  302.     <script>
  303.         (function () {
  304.             {# 1. Príprava dát v Twigu #}
  305.             {% set variant = product.variants.first %}
  306.             {% set tier_prices = variant.getTierPricesForChannel(sylius.channel, sylius.customer) %}
  307.             {% if tier_prices|length > 0 %}
  308.             {% set tier_price = tier_prices|first %}
  309.             {# JEDNOTKOVÁ CENA (napr. 0.03696) #}
  310.             {% set unit_price = tier_price.price / 100000 %}
  311.             {# MNOŽSTVO (napr. 16361) #}
  312.             {% set qty = tier_price.qty %}
  313.             {% else %}
  314.             {% set unit_price = variant|sylius_calculate_price_with_tax({'channel': sylius.channel, 'zone': sylius.channel.defaultTaxZone}) / 100000 %}
  315.             {% set qty = 1 %}
  316.             {% endif %}
  317.             {# 2. Celková hodnota pre GA4 (604.70) #}
  318.             const totalValue = {{ (unit_price * qty)|number_format(2, '.', '') }};
  319.             const unitPrice = {{ unit_price|number_format(5, '.', '') }};
  320.             const quantity = {{ qty }};
  321.             const item = {
  322.                 item_id: {{ product.code|json_encode|raw }},
  323.                 item_name: {{ product.name|json_encode|raw }},
  324.                 item_variant: {{ variant.code|json_encode|raw }},
  325.                 item_category: {{ product.mainTaxon ? product.mainTaxon.name|json_encode|raw : '\"Unknown\"' }},
  326.                 price: unitPrice,   // TU JE JEDNOTKOVÁ (0.03696)
  327.                 quantity: quantity  // TU JE QUANTITY (16361)
  328.             };
  329.             {# 3. Odoslanie do DataLayer #}
  330.             window.dataLayer = window.dataLayer || [];
  331.             window.dataLayer.push({ ecommerce: null });
  332.             window.dataLayer.push({
  333.                 event: \"view_item\",
  334.                 ecommerce: {
  335.                     currency: {{ sylius.currencyCode|json_encode|raw }},
  336.                     value: totalValue, // TU JE CELKOVÁ (604.70)
  337.                     items: [item]
  338.                 }
  339.             });
  340.             console.log(\"GA4 Detailný Debug:\", {
  341.                 currency: {{ sylius.currencyCode|json_encode|raw }},
  342.                 value: totalValue, // TU JE CELKOVÁ (604.70)
  343.                 items: [item]
  344.             });
  345.         })();
  346.     </script>
  347. {% endblock %}
  348. {% block title %}
  349.     {{ sylius_template_event('dedi_sylius_seo_plugin.title', { resource: product ?? sylius.channel }) }}
  350. {% endblock %}
  351. {% block breadcrumb %}
  352.     {% include '@SyliusShop/Product/Show/_breadcrumb.html.twig' %}
  353. {% endblock %}
  354. {% block content %}
  355.     <div class=\"row product-detail\">
  356.         <div class=\"col-md-3 d-none d-lg-block\">
  357.             {% include '@SyliusShop/Product/Index/_sidebar.html.twig' %}
  358.         </div>
  359.         <div class=\"col-lg-9\">
  360.             {% include '@SyliusShop/Product/Show/_header.html.twig' %}
  361.             <div class=\"row\">
  362.                 <div class=\"col-sm-12 mb-4 col-md-6\">
  363.                     {{ sylius_template_event('sylius.shop.product.show.left_sidebar', _context) }}
  364.                 </div>
  365.                 <div class=\"col-sm-12 col-md-6 ps-md-5\">
  366.                     {{ sylius_template_event('sylius.shop.product.show.right_sidebar', _context) }}
  367.                 </div>
  368.             </div>
  369.             {{ sylius_template_event('sylius.shop.product.show.content', _context) }}
  370.         </div>
  371.     </div>
  372. {% endblock %}
  373. ""@SyliusShop/Product/show.html.twig""/var/www/sudekusa-shop-test/themes/BootstrapChildTheme/SyliusShopBundle/views/Product/show.html.twig");
  374.     }
  375. }