<?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;
/* @econdCrossSelll/storefront/block/cms-block-econda-cross-sell.html.twig */
class __TwigTemplate_61fad38f38ac9469e0906dc514c007fd extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
'econda_cross_sell' => [$this, 'block_econda_cross_sell'],
];
}
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", "@econdCrossSelll/storefront/block/cms-block-econda-cross-sell.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@econdCrossSelll/storefront/block/cms-block-econda-cross-sell.html.twig"));
// line 1
$this->displayBlock('econda_cross_sell', $context, $blocks);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
public function block_econda_cross_sell($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", "econda_cross_sell"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "econda_cross_sell"));
// line 2
echo " ";
$context["element"] = sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["block"] ?? null), "slots", [], "any", false, false, false, 2), "getSlot", [0 => "cross_sell"], "method", false, false, false, 2);
// line 3
echo " ";
$context["cs_config"] = $this->env->getFilter('json_encode')->getCallable()(sw_get_attribute($this->env, $this->source, ($context["element"] ?? null), "config", [], "any", false, false, false, 3));
// line 4
echo " ";
$context["categories"] = 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, false, false, 4), "navigation", [], "any", false, false, false, 4), "active", [], "any", false, false, false, 4), "breadcrumb", [], "any", false, false, false, 4);
// line 5
echo "
";
// line 6
if ((sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["page"] ?? null), "product", [], "any", false, false, false, 6), "productNumber", [], "any", false, false, false, 6) != null)) {
// line 7
echo " ";
$context["productid"] = sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["page"] ?? null), "product", [], "any", false, false, false, 7), "productNumber", [], "any", false, false, false, 7);
// line 8
echo " ";
}
// line 9
echo "
";
// line 11
$context["columns"] = 1;
// line 12
echo "
";
// line 13
if ((($context["ecFlag"] ?? null) == false)) {
// line 14
echo " <div class=\"col-12\" id=\"ec-";
echo sw_escape_filter($this->env, sw_get_attribute($this->env, $this->source, ($context["element"] ?? null), "id", [], "any", false, false, false, 14), "html", null, true);
echo "\" data-element-id=\"";
echo sw_escape_filter($this->env, sw_get_attribute($this->env, $this->source, ($context["element"] ?? null), "id", [], "any", false, false, false, 14), "html", null, true);
echo "\" data-element-type=\"";
echo sw_escape_filter($this->env, sw_get_attribute($this->env, $this->source, ($context["element"] ?? null), "type", [], "any", false, false, false, 14), "html", null, true);
echo "\" data-widget-id=\"";
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, ($context["element"] ?? null), "config", [], "any", false, false, false, 14), "widgetId", [], "any", false, false, false, 14), "value", [], "any", false, false, false, 14), "html", null, true);
echo "\" data-cross-sell-instance=\"";
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", null, true);
echo "\" data-csConfig=\"";
echo sw_escape_filter($this->env, ($context["cs_config"] ?? null), "html", null, true);
echo "\" data-category=\"";
echo sw_escape_filter($this->env, $this->env->getFilter('json_encode')->getCallable()(($context["categories"] ?? null)), "html", null, true);
echo "\" data-productid=\"";
echo sw_escape_filter($this->env, ($context["productid"] ?? null), "html", null, true);
echo "\" data-econda-cross-sell>
";
}
// line 16
echo " ";
if (($context["cs_response"] ?? null)) {
// line 17
echo " ";
if ((sw_get_attribute($this->env, $this->source, ($context["cs_response"] ?? null), "emcsParams", [], "any", false, false, false, 17) == null)) {
// line 18
echo " <div>
<p style=\"background: red;text-align: center;color: white;font-size: 20px;height: 60px;\">
";
// line 20
echo sw_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ecdcrosssell.crosssell.errMsg"), "html", null, true);
echo "
</p>
</div>
";
} else {
// line 24
echo " ";
$context["emcsParams"] = sw_get_attribute($this->env, $this->source, ($context["cs_response"] ?? null), "emcsParams", [], "any", false, false, false, 24);
// line 25
echo " ";
$context["sliderConfig"] = sw_get_attribute($this->env, $this->source, ($context["cs_response"] ?? null), "csConfig", [], "any", false, false, false, 25);
// line 26
echo " ";
$context["element"] = sw_get_attribute($this->env, $this->source, ($context["cs_response"] ?? null), "elementType", [], "any", false, false, false, 26);
// line 27
echo " ";
$__internal_compile_1 = null;
try {
$__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);
} catch (LoaderError $e) {
// ignore missing template
}
if ($__internal_compile_1) {
$__internal_compile_1->display($context);
}
// line 28
echo " ";
}
// line 29
echo " ";
}
// line 30
echo " ";
if ((($context["ecFlag"] ?? null) == false)) {
// line 31
echo " </div>
";
}
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
public function getTemplateName()
{
return "@econdCrossSelll/storefront/block/cms-block-econda-cross-sell.html.twig";
}
public function getDebugInfo()
{
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,);
}
public function getSourceContext()
{
return new Source("{% block econda_cross_sell %}
{% set element = block.slots.getSlot('cross_sell') %}
{% set cs_config = element.config|json_encode()%}
{% set categories = page.header.navigation.active.breadcrumb %}
{% if page.product.productNumber != null %}
{% set productid = page.product.productNumber %}
{% endif %}
{% set columns = 1 %}
{% if ecFlag == false %}
<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>
{% endif %}
{% if cs_response %}
{% if (cs_response.emcsParams == null) %}
<div>
<p style=\"background: red;text-align: center;color: white;font-size: 20px;height: 60px;\">
{{ \"ecdcrosssell.crosssell.errMsg\"|trans }}
</p>
</div>
{% else %}
{% set emcsParams = cs_response.emcsParams %}
{% set sliderConfig = cs_response.csConfig %}
{% set element = cs_response.elementType %}
{% sw_include \"@Storefront/storefront/element/cms-element-econda-cross-sell.html.twig\" ignore missing %}
{% endif %}
{% endif %}
{% if ecFlag == false %}
</div>
{% endif %}
{% 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");
}
}