var/cache/dev_h00fd8923ecf393ec0b25403e00167bec/twig/6b/6ba5f71a8b61ee06a777192d7ad3213f43356c9da15d39595d7653fa63cee900.php line 55

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use function Shopware\Core\Framework\Adapter\Twig\sw_get_attribute;
  4. use function Shopware\Core\Framework\Adapter\Twig\sw_escape_filter;
  5. use Twig\Error\LoaderError;
  6. use Twig\Error\RuntimeError;
  7. use Twig\Extension\SandboxExtension;
  8. use Twig\Markup;
  9. use Twig\Sandbox\SecurityError;
  10. use Twig\Sandbox\SecurityNotAllowedTagError;
  11. use Twig\Sandbox\SecurityNotAllowedFilterError;
  12. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  13. use Twig\Source;
  14. use Twig\Template;
  15. /* @econdCrossSelll/storefront/block/cms-block-econda-cross-sell.html.twig */
  16. class __TwigTemplate_61fad38f38ac9469e0906dc514c007fd extends Template
  17. {
  18.     private $source;
  19.     private $macros = [];
  20.     public function __construct(Environment $env)
  21.     {
  22.         parent::__construct($env);
  23.         $this->source $this->getSourceContext();
  24.         $this->parent false;
  25.         $this->blocks = [
  26.             'econda_cross_sell' => [$this'block_econda_cross_sell'],
  27.         ];
  28.     }
  29.     protected function doDisplay(array $context, array $blocks = [])
  30.     {
  31.         $macros $this->macros;
  32.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  33.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@econdCrossSelll/storefront/block/cms-block-econda-cross-sell.html.twig"));
  34.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  35.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@econdCrossSelll/storefront/block/cms-block-econda-cross-sell.html.twig"));
  36.         // line 1
  37.         $this->displayBlock('econda_cross_sell'$context$blocks);
  38.         
  39.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  40.         
  41.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  42.     }
  43.     public function block_econda_cross_sell($context, array $blocks = [])
  44.     {
  45.         $macros $this->macros;
  46.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  47.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""econda_cross_sell"));
  48.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  49.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""econda_cross_sell"));
  50.         // line 2
  51.         echo "    ";
  52.         $context["element"] = sw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->source, ($context["block"] ?? null), "slots", [], "any"falsefalsefalse2), "getSlot", [=> "cross_sell"], "method"falsefalsefalse2);
  53.         // line 3
  54.         echo "    ";
  55.         $context["cs_config"] = $this->env->getFilter('json_encode')->getCallable()(sw_get_attribute($this->env$this->source, ($context["element"] ?? null), "config", [], "any"falsefalsefalse3));
  56.         // line 4
  57.         echo "    ";
  58.         $context["categories"] = sw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->source, ($context["page"] ?? null), "header", [], "any"falsefalsefalse4), "navigation", [], "any"falsefalsefalse4), "active", [], "any"falsefalsefalse4), "breadcrumb", [], "any"falsefalsefalse4);
  59.         // line 5
  60.         echo "
  61.     ";
  62.         // line 6
  63.         if ((sw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->source, ($context["page"] ?? null), "product", [], "any"falsefalsefalse6), "productNumber", [], "any"falsefalsefalse6) != null)) {
  64.             // line 7
  65.             echo "        ";
  66.             $context["productid"] = sw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->source, ($context["page"] ?? null), "product", [], "any"falsefalsefalse7), "productNumber", [], "any"falsefalsefalse7);
  67.             // line 8
  68.             echo "    ";
  69.         }
  70.         // line 9
  71.         echo "
  72.     ";
  73.         // line 11
  74.         $context["columns"] = 1;
  75.         // line 12
  76.         echo "
  77.     ";
  78.         // line 13
  79.         if ((($context["ecFlag"] ?? null) == false)) {
  80.             // line 14
  81.             echo "        <div class=\"col-12\" id=\"ec-";
  82.             echo sw_escape_filter($this->envsw_get_attribute($this->env$this->source, ($context["element"] ?? null), "id", [], "any"falsefalsefalse14), "html"nulltrue);
  83.             echo "\" data-element-id=\"";
  84.             echo sw_escape_filter($this->envsw_get_attribute($this->env$this->source, ($context["element"] ?? null), "id", [], "any"falsefalsefalse14), "html"nulltrue);
  85.             echo "\" data-element-type=\"";
  86.             echo sw_escape_filter($this->envsw_get_attribute($this->env$this->source, ($context["element"] ?? null), "type", [], "any"falsefalsefalse14), "html"nulltrue);
  87.             echo "\" data-widget-id=\"";
  88.             echo sw_escape_filter($this->envsw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->source, ($context["element"] ?? null), "config", [], "any"falsefalsefalse14), "widgetId", [], "any"falsefalsefalse14), "value", [], "any"falsefalsefalse14), "html"nulltrue);
  89.             echo "\" data-cross-sell-instance=\"";
  90.             echo sw_escape_filter($this->env, (($__internal_compile_0 = ($context["ECS"] ?? null)) && is_array($__internal_compile_0) || $__internal_compile_0 instanceof ArrayAccess ? ($__internal_compile_0["econdCrossSelll.config.clientId"] ?? null) : null), "html"nulltrue);
  91.             echo "\" data-csConfig=\"";
  92.             echo sw_escape_filter($this->env, ($context["cs_config"] ?? null), "html"nulltrue);
  93.             echo "\" data-category=\"";
  94.             echo sw_escape_filter($this->env$this->env->getFilter('json_encode')->getCallable()(($context["categories"] ?? null)), "html"nulltrue);
  95.             echo "\" data-productid=\"";
  96.             echo sw_escape_filter($this->env, ($context["productid"] ?? null), "html"nulltrue);
  97.             echo "\" data-econda-cross-sell>
  98.     ";
  99.         }
  100.         // line 16
  101.         echo "        ";
  102.         if (($context["cs_response"] ?? null)) {
  103.             // line 17
  104.             echo "            ";
  105.             if ((sw_get_attribute($this->env$this->source, ($context["cs_response"] ?? null), "emcsParams", [], "any"falsefalsefalse17) == null)) {
  106.                 // line 18
  107.                 echo "                <div>
  108.                     <p style=\"background: red;text-align: center;color: white;font-size: 20px;height: 60px;\">
  109.                         ";
  110.                 // line 20
  111.                 echo sw_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ecdcrosssell.crosssell.errMsg"), "html"nulltrue);
  112.                 echo "
  113.                     </p>
  114.                 </div>
  115.             ";
  116.             } else {
  117.                 // line 24
  118.                 echo "                ";
  119.                 $context["emcsParams"] = sw_get_attribute($this->env$this->source, ($context["cs_response"] ?? null), "emcsParams", [], "any"falsefalsefalse24);
  120.                 // line 25
  121.                 echo "                ";
  122.                 $context["sliderConfig"] = sw_get_attribute($this->env$this->source, ($context["cs_response"] ?? null), "csConfig", [], "any"falsefalsefalse25);
  123.                 // line 26
  124.                 echo "                ";
  125.                 $context["element"] = sw_get_attribute($this->env$this->source, ($context["cs_response"] ?? null), "elementType", [], "any"falsefalsefalse26);
  126.                 // line 27
  127.                 echo "                ";
  128.                 $__internal_compile_1 null;
  129.                 try {
  130.                     $__internal_compile_1 =                     $this->loadTemplate("@econdCrossSelll/storefront/element/cms-element-econda-cross-sell.html.twig""@econdCrossSelll/storefront/block/cms-block-econda-cross-sell.html.twig"27);
  131.                 } catch (LoaderError $e) {
  132.                     // ignore missing template
  133.                 }
  134.                 if ($__internal_compile_1) {
  135.                     $__internal_compile_1->display($context);
  136.                 }
  137.                 // line 28
  138.                 echo "            ";
  139.             }
  140.             // line 29
  141.             echo "        ";
  142.         }
  143.         // line 30
  144.         echo "    ";
  145.         if ((($context["ecFlag"] ?? null) == false)) {
  146.             // line 31
  147.             echo "        </div>
  148.     ";
  149.         }
  150.         
  151.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  152.         
  153.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  154.     }
  155.     public function getTemplateName()
  156.     {
  157.         return "@econdCrossSelll/storefront/block/cms-block-econda-cross-sell.html.twig";
  158.     }
  159.     public function getDebugInfo()
  160.     {
  161.         return array (  160 => 31,  157 => 30,  154 => 29,  151 => 28,  140 => 27,  137 => 26,  134 => 25,  131 => 24,  124 => 20,  120 => 18,  117 => 17,  114 => 16,  94 => 14,  92 => 13,  89 => 12,  87 => 11,  83 => 9,  80 => 8,  77 => 7,  75 => 6,  72 => 5,  69 => 4,  66 => 3,  63 => 2,  44 => 1,);
  162.     }
  163.     public function getSourceContext()
  164.     {
  165.         return new Source("{% block econda_cross_sell %}
  166.     {% set element = block.slots.getSlot('cross_sell') %}
  167.     {% set cs_config = element.config|json_encode()%}
  168.     {% set categories = page.header.navigation.active.breadcrumb %}
  169.     {% if page.product.productNumber != null %}
  170.         {% set productid = page.product.productNumber %}
  171.     {% endif %}
  172.     {% set columns = 1 %}
  173.     {% if ecFlag == false %}
  174.         <div class=\"col-12\" id=\"ec-{{ element.id }}\" data-element-id=\"{{ element.id }}\" data-element-type=\"{{ element.type }}\" data-widget-id=\"{{ element.config.widgetId.value }}\" data-cross-sell-instance=\"{{ ECS['econdCrossSelll.config.clientId'] }}\" data-csConfig=\"{{ cs_config }}\" data-category=\"{{ categories|json_encode }}\" data-productid=\"{{ productid }}\" data-econda-cross-sell>
  175.     {% endif %}
  176.         {% if cs_response %}
  177.             {% if (cs_response.emcsParams == null) %}
  178.                 <div>
  179.                     <p style=\"background: red;text-align: center;color: white;font-size: 20px;height: 60px;\">
  180.                         {{ \"ecdcrosssell.crosssell.errMsg\"|trans }}
  181.                     </p>
  182.                 </div>
  183.             {% else %}
  184.                 {% set emcsParams = cs_response.emcsParams %}
  185.                 {% set sliderConfig = cs_response.csConfig %}
  186.                 {% set element = cs_response.elementType %}
  187.                 {% sw_include \"@Storefront/storefront/element/cms-element-econda-cross-sell.html.twig\" ignore missing %}
  188.             {% endif %}
  189.         {% endif %}
  190.     {% if ecFlag == false %}
  191.         </div>
  192.     {% endif %}
  193. {% endblock %}""@econdCrossSelll/storefront/block/cms-block-econda-cross-sell.html.twig""/var/www/shopware6/custom/plugins/econdCrossSelll/src/Resources/views/storefront/block/cms-block-econda-cross-sell.html.twig");
  194.     }
  195. }