HEX
Server: Microsoft-IIS/10.0
System: Windows NT ITPWINWEBSVR22 10.0 build 20348 (Windows Server 2022) AMD64
User: www.conferencesearch.co.uk (0)
PHP: 8.3.30
Disabled: NONE
Upload Files
File: D:/web/matomo.circ/tmp/templates_c/bf/bf9a7bb005ba03e9727ea58b12535f7d.php
<?php

use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\CoreExtension;
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;

/* @Live/_actionEcommerce.twig */
class __TwigTemplate_7c6406f79285c3f59f53433fbc1e6d02 extends Template
{
    private $source;
    private $macros = [];

    public function __construct(Environment $env)
    {
        parent::__construct($env);

        $this->source = $this->getSourceContext();

        $this->parent = false;

        $this->blocks = [
        ];
    }

    protected function doDisplay(array $context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 1
        yield "<li class=\"action\"
    title=\"";
        // line 2
        yield $this->env->getFunction('postEvent')->getCallable()("Live.renderActionTooltip", (isset($context["action"]) || array_key_exists("action", $context) ? $context["action"] : (function () { throw new RuntimeError('Variable "action" does not exist.', 2, $this->source); })()), (isset($context["visitInfo"]) || array_key_exists("visitInfo", $context) ? $context["visitInfo"] : (function () { throw new RuntimeError('Variable "visitInfo" does not exist.', 2, $this->source); })()));
        yield "\">
    <div>
        ";
        // line 5
        yield "        <img src=\"";
        yield \Piwik\piwik_escape_filter($this->env, ((CoreExtension::getAttribute($this->env, $this->source, ($context["action"] ?? null), "iconSVG", [], "any", true, true, false, 5)) ? (Twig\Extension\CoreExtension::default(CoreExtension::getAttribute($this->env, $this->source, ($context["action"] ?? null), "iconSVG", [], "any", false, false, false, 5), CoreExtension::getAttribute($this->env, $this->source, (isset($context["action"]) || array_key_exists("action", $context) ? $context["action"] : (function () { throw new RuntimeError('Variable "action" does not exist.', 5, $this->source); })()), "icon", [], "any", false, false, false, 5))) : (CoreExtension::getAttribute($this->env, $this->source, (isset($context["action"]) || array_key_exists("action", $context) ? $context["action"] : (function () { throw new RuntimeError('Variable "action" does not exist.', 5, $this->source); })()), "icon", [], "any", false, false, false, 5))), "html", null, true);
        yield "\" class=\"action-list-action-icon\"/>
        ";
        // line 6
        if ((CoreExtension::getAttribute($this->env, $this->source, (isset($context["action"]) || array_key_exists("action", $context) ? $context["action"] : (function () { throw new RuntimeError('Variable "action" does not exist.', 6, $this->source); })()), "type", [], "any", false, false, false, 6) == "ecommerceOrder")) {
            // line 7
            yield "            <strong>";
            yield \Piwik\piwik_escape_filter($this->env, $this->env->getFilter('translate')->getCallable()("Goals_EcommerceOrder"), "html", null, true);
            yield "</strong>
            <span style='color:#666;'>(";
            // line 8
            yield \Piwik\piwik_escape_filter($this->env, CoreExtension::getAttribute($this->env, $this->source, (isset($context["action"]) || array_key_exists("action", $context) ? $context["action"] : (function () { throw new RuntimeError('Variable "action" does not exist.', 8, $this->source); })()), "orderId", [], "any", false, false, false, 8), "html", null, true);
            yield ")</span>
        ";
        } else {
            // line 10
            yield "            <strong>";
            yield \Piwik\piwik_escape_filter($this->env, $this->env->getFilter('translate')->getCallable()("Goals_AbandonedCart"), "html", null, true);
            yield "</strong>

            ";
            // line 13
            yield "        ";
        }
        // line 14
        yield "        <p>
            <span>
                ";
        // line 16
        if ((CoreExtension::getAttribute($this->env, $this->source, (isset($context["action"]) || array_key_exists("action", $context) ? $context["action"] : (function () { throw new RuntimeError('Variable "action" does not exist.', 16, $this->source); })()), "type", [], "any", false, false, false, 16) == "ecommerceOrder")) {
            // line 17
            yield "                ";
            // line 18
            yield "                ";
            $context["ecommerceOrderTooltip"] = ('' === $tmp = \Twig\Extension\CoreExtension::captureOutput((function () use (&$context, $macros, $blocks) {
                yield \Piwik\piwik_escape_filter($this->env, $this->env->getFilter('translate')->getCallable()("General_ColumnRevenue"), "html", null, true);
                yield ": ";
                yield $this->env->getFilter('money')->getCallable()(CoreExtension::getAttribute($this->env, $this->source, (isset($context["action"]) || array_key_exists("action", $context) ? $context["action"] : (function () { throw new RuntimeError('Variable "action" does not exist.', 18, $this->source); })()), "revenue", [], "any", false, false, false, 18), CoreExtension::getAttribute($this->env, $this->source, (isset($context["visitInfo"]) || array_key_exists("visitInfo", $context) ? $context["visitInfo"] : (function () { throw new RuntimeError('Variable "visitInfo" does not exist.', 18, $this->source); })()), "idSite", [], "any", false, false, false, 18));
                yield "
                    ";
                // line 19
                if ( !Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env, $this->source, (isset($context["action"]) || array_key_exists("action", $context) ? $context["action"] : (function () { throw new RuntimeError('Variable "action" does not exist.', 19, $this->source); })()), "revenueSubTotal", [], "any", false, false, false, 19))) {
                    yield " - ";
                    yield \Piwik\piwik_escape_filter($this->env, $this->env->getFilter('translate')->getCallable()("General_Subtotal"), "html", null, true);
                    yield ": ";
                    yield $this->env->getFilter('money')->getCallable()(CoreExtension::getAttribute($this->env, $this->source, (isset($context["action"]) || array_key_exists("action", $context) ? $context["action"] : (function () { throw new RuntimeError('Variable "action" does not exist.', 19, $this->source); })()), "revenueSubTotal", [], "any", false, false, false, 19), CoreExtension::getAttribute($this->env, $this->source, (isset($context["visitInfo"]) || array_key_exists("visitInfo", $context) ? $context["visitInfo"] : (function () { throw new RuntimeError('Variable "visitInfo" does not exist.', 19, $this->source); })()), "idSite", [], "any", false, false, false, 19));
                }
                // line 20
                yield "
                    ";
                // line 21
                if ( !Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env, $this->source, (isset($context["action"]) || array_key_exists("action", $context) ? $context["action"] : (function () { throw new RuntimeError('Variable "action" does not exist.', 21, $this->source); })()), "revenueTax", [], "any", false, false, false, 21))) {
                    yield " - ";
                    yield \Piwik\piwik_escape_filter($this->env, $this->env->getFilter('translate')->getCallable()("General_Tax"), "html", null, true);
                    yield ": ";
                    yield $this->env->getFilter('money')->getCallable()(CoreExtension::getAttribute($this->env, $this->source, (isset($context["action"]) || array_key_exists("action", $context) ? $context["action"] : (function () { throw new RuntimeError('Variable "action" does not exist.', 21, $this->source); })()), "revenueTax", [], "any", false, false, false, 21), CoreExtension::getAttribute($this->env, $this->source, (isset($context["visitInfo"]) || array_key_exists("visitInfo", $context) ? $context["visitInfo"] : (function () { throw new RuntimeError('Variable "visitInfo" does not exist.', 21, $this->source); })()), "idSite", [], "any", false, false, false, 21));
                }
                // line 22
                yield "
                    ";
                // line 23
                if ( !Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env, $this->source, (isset($context["action"]) || array_key_exists("action", $context) ? $context["action"] : (function () { throw new RuntimeError('Variable "action" does not exist.', 23, $this->source); })()), "revenueShipping", [], "any", false, false, false, 23))) {
                    yield " - ";
                    yield \Piwik\piwik_escape_filter($this->env, $this->env->getFilter('translate')->getCallable()("General_Shipping"), "html", null, true);
                    yield ": ";
                    yield $this->env->getFilter('money')->getCallable()(CoreExtension::getAttribute($this->env, $this->source, (isset($context["action"]) || array_key_exists("action", $context) ? $context["action"] : (function () { throw new RuntimeError('Variable "action" does not exist.', 23, $this->source); })()), "revenueShipping", [], "any", false, false, false, 23), CoreExtension::getAttribute($this->env, $this->source, (isset($context["visitInfo"]) || array_key_exists("visitInfo", $context) ? $context["visitInfo"] : (function () { throw new RuntimeError('Variable "visitInfo" does not exist.', 23, $this->source); })()), "idSite", [], "any", false, false, false, 23));
                }
                // line 24
                yield "
                    ";
                // line 25
                if ( !Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env, $this->source, (isset($context["action"]) || array_key_exists("action", $context) ? $context["action"] : (function () { throw new RuntimeError('Variable "action" does not exist.', 25, $this->source); })()), "revenueDiscount", [], "any", false, false, false, 25))) {
                    yield " - ";
                    yield \Piwik\piwik_escape_filter($this->env, $this->env->getFilter('translate')->getCallable()("General_Discount"), "html", null, true);
                    yield ": ";
                    yield $this->env->getFilter('money')->getCallable()(CoreExtension::getAttribute($this->env, $this->source, (isset($context["action"]) || array_key_exists("action", $context) ? $context["action"] : (function () { throw new RuntimeError('Variable "action" does not exist.', 25, $this->source); })()), "revenueDiscount", [], "any", false, false, false, 25), CoreExtension::getAttribute($this->env, $this->source, (isset($context["visitInfo"]) || array_key_exists("visitInfo", $context) ? $context["visitInfo"] : (function () { throw new RuntimeError('Variable "visitInfo" does not exist.', 25, $this->source); })()), "idSite", [], "any", false, false, false, 25));
                }
                // line 26
                yield "                ";
                return; yield '';
            })())) ? '' : new Markup($tmp, $this->env->getCharset());
            // line 27
            yield "                <abbr title=\"";
            yield \Piwik\piwik_escape_filter($this->env, (isset($context["ecommerceOrderTooltip"]) || array_key_exists("ecommerceOrderTooltip", $context) ? $context["ecommerceOrderTooltip"] : (function () { throw new RuntimeError('Variable "ecommerceOrderTooltip" does not exist.', 27, $this->source); })()), "html", null, true);
            yield "\">";
            yield \Piwik\piwik_escape_filter($this->env, $this->env->getFilter('translate')->getCallable()("General_ColumnRevenue"), "html", null, true);
            yield ":
                    ";
        } else {
            // line 29
            yield "                        ";
            $context["revenueLeft"] = ('' === $tmp = \Twig\Extension\CoreExtension::captureOutput((function () use (&$context, $macros, $blocks) {
                yield \Piwik\piwik_escape_filter($this->env, $this->env->getFilter('translate')->getCallable()("General_ColumnRevenue"), "html", null, true);
                return; yield '';
            })())) ? '' : new Markup($tmp, $this->env->getCharset());
            // line 30
            yield "                        ";
            yield \Piwik\piwik_escape_filter($this->env, $this->env->getFilter('translate')->getCallable()("Goals_LeftInCart", (isset($context["revenueLeft"]) || array_key_exists("revenueLeft", $context) ? $context["revenueLeft"] : (function () { throw new RuntimeError('Variable "revenueLeft" does not exist.', 30, $this->source); })())), "html", null, true);
            yield ":
                    ";
        }
        // line 32
        yield "                    <strong>";
        yield $this->env->getFilter('money')->getCallable()(CoreExtension::getAttribute($this->env, $this->source, (isset($context["action"]) || array_key_exists("action", $context) ? $context["action"] : (function () { throw new RuntimeError('Variable "action" does not exist.', 32, $this->source); })()), "revenue", [], "any", false, false, false, 32), CoreExtension::getAttribute($this->env, $this->source, (isset($context["visitInfo"]) || array_key_exists("visitInfo", $context) ? $context["visitInfo"] : (function () { throw new RuntimeError('Variable "visitInfo" does not exist.', 32, $this->source); })()), "idSite", [], "any", false, false, false, 32));
        yield "</strong>
                    ";
        // line 33
        if ((CoreExtension::getAttribute($this->env, $this->source, (isset($context["action"]) || array_key_exists("action", $context) ? $context["action"] : (function () { throw new RuntimeError('Variable "action" does not exist.', 33, $this->source); })()), "type", [], "any", false, false, false, 33) == "ecommerceOrder")) {
            // line 34
            yield "                </abbr>
                ";
        }
        // line 35
        yield ", ";
        yield \Piwik\piwik_escape_filter($this->env, $this->env->getFilter('translate')->getCallable()("General_Quantity"), "html", null, true);
        yield ": ";
        yield \Piwik\piwik_escape_filter($this->env, CoreExtension::getAttribute($this->env, $this->source, (isset($context["action"]) || array_key_exists("action", $context) ? $context["action"] : (function () { throw new RuntimeError('Variable "action" does not exist.', 35, $this->source); })()), "items", [], "any", false, false, false, 35), "html", null, true);
        yield "

                ";
        // line 38
        yield "                ";
        if ( !Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env, $this->source, (isset($context["action"]) || array_key_exists("action", $context) ? $context["action"] : (function () { throw new RuntimeError('Variable "action" does not exist.', 38, $this->source); })()), "itemDetails", [], "any", false, false, false, 38))) {
            // line 39
            yield "                    <ul style='list-style:square;margin-left:";
            if ((isset($context["isWidget"]) || array_key_exists("isWidget", $context) ? $context["isWidget"] : (function () { throw new RuntimeError('Variable "isWidget" does not exist.', 39, $this->source); })())) {
                yield "15";
            } else {
                yield "22";
            }
            yield "px;margin-bottom: 4px;'>
                        ";
            // line 40
            $context['_parent'] = $context;
            $context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, (isset($context["action"]) || array_key_exists("action", $context) ? $context["action"] : (function () { throw new RuntimeError('Variable "action" does not exist.', 40, $this->source); })()), "itemDetails", [], "any", false, false, false, 40));
            foreach ($context['_seq'] as $context["_key"] => $context["product"]) {
                // line 41
                yield "                            <li>
                                ";
                // line 42
                yield \Piwik\piwik_escape_filter($this->env, CoreExtension::getAttribute($this->env, $this->source, $context["product"], "itemSKU", [], "any", false, false, false, 42), "html", null, true);
                if ( !Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env, $this->source, $context["product"], "itemName", [], "any", false, false, false, 42))) {
                    yield ": ";
                    yield \Piwik\piwik_escape_filter($this->env, CoreExtension::getAttribute($this->env, $this->source, $context["product"], "itemName", [], "any", false, false, false, 42), "html", null, true);
                }
                // line 43
                if ((CoreExtension::getAttribute($this->env, $this->source, $context["product"], "categories", [], "any", true, true, false, 43) &&  !Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env, $this->source, $context["product"], "categories", [], "any", false, false, false, 43)))) {
                    yield " (";
                    $context['_parent'] = $context;
                    $context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, $context["product"], "categories", [], "any", false, false, false, 43));
                    $context['loop'] = [
                      'parent' => $context['_parent'],
                      'index0' => 0,
                      'index'  => 1,
                      'first'  => true,
                    ];
                    if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
                        $length = count($context['_seq']);
                        $context['loop']['revindex0'] = $length - 1;
                        $context['loop']['revindex'] = $length;
                        $context['loop']['length'] = $length;
                        $context['loop']['last'] = 1 === $length;
                    }
                    foreach ($context['_seq'] as $context["_key"] => $context["category"]) {
                        yield \Piwik\piwik_escape_filter($this->env, $context["category"], "html", null, true);
                        if ( !CoreExtension::getAttribute($this->env, $this->source, $context["loop"], "last", [], "any", false, false, false, 43)) {
                            yield ", ";
                        }
                        ++$context['loop']['index0'];
                        ++$context['loop']['index'];
                        $context['loop']['first'] = false;
                        if (isset($context['loop']['length'])) {
                            --$context['loop']['revindex0'];
                            --$context['loop']['revindex'];
                            $context['loop']['last'] = 0 === $context['loop']['revindex0'];
                        }
                    }
                    $_parent = $context['_parent'];
                    unset($context['_seq'], $context['_iterated'], $context['_key'], $context['category'], $context['_parent'], $context['loop']);
                    $context = array_intersect_key($context, $_parent) + $_parent;
                    yield ")";
                }
                yield ",
                                ";
                // line 44
                yield \Piwik\piwik_escape_filter($this->env, $this->env->getFilter('translate')->getCallable()("General_Quantity"), "html", null, true);
                yield ": ";
                yield \Piwik\piwik_escape_filter($this->env, CoreExtension::getAttribute($this->env, $this->source, $context["product"], "quantity", [], "any", false, false, false, 44), "html", null, true);
                yield ",
                                ";
                // line 45
                yield \Piwik\piwik_escape_filter($this->env, $this->env->getFilter('translate')->getCallable()("General_Price"), "html", null, true);
                yield ": ";
                yield $this->env->getFilter('money')->getCallable()(CoreExtension::getAttribute($this->env, $this->source, $context["product"], "price", [], "any", false, false, false, 45), CoreExtension::getAttribute($this->env, $this->source, (isset($context["visitInfo"]) || array_key_exists("visitInfo", $context) ? $context["visitInfo"] : (function () { throw new RuntimeError('Variable "visitInfo" does not exist.', 45, $this->source); })()), "idSite", [], "any", false, false, false, 45));
                yield "
                            </li>
                        ";
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['_iterated'], $context['_key'], $context['product'], $context['_parent'], $context['loop']);
            $context = array_intersect_key($context, $_parent) + $_parent;
            // line 48
            yield "                    </ul>
                ";
        }
        // line 50
        yield "            </span>
        </p>
    </div>
</li>";
        return; yield '';
    }

    /**
     * @codeCoverageIgnore
     */
    public function getTemplateName()
    {
        return "@Live/_actionEcommerce.twig";
    }

    /**
     * @codeCoverageIgnore
     */
    public function isTraitable()
    {
        return false;
    }

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo()
    {
        return array (  253 => 50,  249 => 48,  238 => 45,  232 => 44,  193 => 43,  187 => 42,  184 => 41,  180 => 40,  171 => 39,  168 => 38,  160 => 35,  156 => 34,  154 => 33,  149 => 32,  143 => 30,  137 => 29,  129 => 27,  125 => 26,  118 => 25,  115 => 24,  108 => 23,  105 => 22,  98 => 21,  95 => 20,  88 => 19,  80 => 18,  78 => 17,  76 => 16,  72 => 14,  69 => 13,  63 => 10,  58 => 8,  53 => 7,  51 => 6,  46 => 5,  41 => 2,  38 => 1,);
    }

    public function getSourceContext()
    {
        return new Source("<li class=\"action\"
    title=\"{{ postEvent('Live.renderActionTooltip', action, visitInfo) }}\">
    <div>
        {# Ecommerce Abandoned Cart / Ecommerce Order #}
        <img src=\"{{ action.iconSVG|default(action.icon) }}\" class=\"action-list-action-icon\"/>
        {% if action.type == 'ecommerceOrder' %}
            <strong>{{ 'Goals_EcommerceOrder'|translate }}</strong>
            <span style='color:#666;'>({{ action.orderId }})</span>
        {% else %}
            <strong>{{ 'Goals_AbandonedCart'|translate }}</strong>

            {# TODO: would be nice to have the icons Orders / Cart in the ecommerce log footer #}
        {% endif %}
        <p>
            <span>
                {% if action.type == 'ecommerceOrder' %}
                {# spacing is important for tooltip to look nice #}
                {% set ecommerceOrderTooltip %}{{ 'General_ColumnRevenue'|translate }}: {{ action.revenue|money(visitInfo.idSite)|raw }}
                    {% if action.revenueSubTotal is not empty %} - {{ 'General_Subtotal'|translate }}: {{ action.revenueSubTotal|money(visitInfo.idSite)|raw }}{% endif %}

                    {% if action.revenueTax is not empty %} - {{ 'General_Tax'|translate }}: {{ action.revenueTax|money(visitInfo.idSite)|raw }}{% endif %}

                    {% if action.revenueShipping is not empty %} - {{ 'General_Shipping'|translate }}: {{ action.revenueShipping|money(visitInfo.idSite)|raw }}{% endif %}

                    {% if action.revenueDiscount is not empty %} - {{ 'General_Discount'|translate }}: {{ action.revenueDiscount|money(visitInfo.idSite)|raw }}{% endif %}
                {% endset %}
                <abbr title=\"{{ ecommerceOrderTooltip }}\">{{ 'General_ColumnRevenue'|translate }}:
                    {% else %}
                        {% set revenueLeft %}{{ 'General_ColumnRevenue'|translate }}{% endset %}
                        {{ 'Goals_LeftInCart'|translate(revenueLeft) }}:
                    {% endif %}
                    <strong>{{ action.revenue|money(visitInfo.idSite)|raw }}</strong>
                    {% if action.type == 'ecommerceOrder' %}
                </abbr>
                {% endif %}, {{ 'General_Quantity'|translate }}: {{ action.items }}

                {# Ecommerce items in Cart/Order #}
                {% if action.itemDetails is not empty %}
                    <ul style='list-style:square;margin-left:{% if isWidget %}15{% else %}22{% endif %}px;margin-bottom: 4px;'>
                        {% for product in action.itemDetails %}
                            <li>
                                {{ product.itemSKU }}{% if product.itemName is not empty %}: {{ product.itemName }}{% endif -%}
                                {%- if product.categories is defined and product.categories is not empty %} ({% for category in product.categories %}{{ category }}{% if not loop.last %}, {% endif %}{% endfor %}){% endif %},
                                {{ 'General_Quantity'|translate }}: {{ product.quantity }},
                                {{ 'General_Price'|translate }}: {{ product.price|money(visitInfo.idSite)|raw }}
                            </li>
                        {% endfor %}
                    </ul>
                {% endif %}
            </span>
        </p>
    </div>
</li>", "@Live/_actionEcommerce.twig", "D:\\web\\matomo.circ\\plugins\\Live\\templates\\_actionEcommerce.twig");
    }
}