Welcome to mirror list, hosted at ThFree Co, Russian Federation.

_actionEcommerce.twig « templates « Live « plugins - github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a4b985810542d1fa8b2d800d46452678b173df33 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<li class="action"
    title="{{ postEvent('Live.renderActionTooltip', action, visitInfo) }}">
    <div>
        {# Ecommerce Abandoned Cart / Ecommerce Order #}
        <img src="{{ 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 not isWidget %}style='margin-left:22px;'{% endif %}>
                {% 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 %}50{% endif %}px;'>
                        {% for product in action.itemDetails %}
                            <li>
                                {{ product.itemSKU }}{% if product.itemName is not empty %}: {{ product.itemName }}{% endif %}
                                {% if product.itemCategory is not empty %} ({{ product.itemCategory }}){% endif %}
                                ,
                                {{ 'General_Quantity'|translate }}: {{ product.quantity }},
                                {{ 'General_Price'|translate }}: {{ product.price|money(visitInfo.idSite)|raw }}
                            </li>
                        {% endfor %}
                    </ul>
                {% endif %}
            </span>
        </p>
    </div>
</li>