-
Notifications
You must be signed in to change notification settings - Fork 9
/
detail.html
64 lines (50 loc) · 1.93 KB
/
detail.html
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
55
56
57
58
59
60
61
62
63
64
{% extends '_layouts/cp' %}
{% if not abandonedCart %}
{% exit 404 %}
{% endif %}
{% do view.registerAssetBundle('verbb\\snipcart\\assetbundles\\SnipcartAsset') %}
{% set crumbs = [
{ label: craft.snipcart.getPluginName(), url: url('snipcart') },
{ label: 'Abandoned Carts' | t('snipcart'), url: url('snipcart/abandoned') }
] %}
{% set isTestMode = craft.app.plugins.getPlugin('snipcart').getSettings().testMode %}
{% if abandonedCart.billingAddress is null %}
{% set title = abandonedCart.email ~ (isTestMode ? ' 🚧') %}
{% else %}
{% set title = abandonedCart.billingAddress.name ~ (isTestMode ? ' 🚧') %}
{% endif %}
{% block content %}
<div class="md:flex mb-8">
<div class="md:w-1/2">
<p class="font-bold">
{{- abandonedCart.modificationDate|datetime('long') -}}
</p>
{% include 'snipcart/cp/_parts/customer-summary' with {
order: abandonedCart,
} %}
{% if not abandonedCart.billingAddress is null %}
{% include 'snipcart/cp/_parts/order-addresses' with {
order: abandonedCart,
shippingSameAsBilling: abandonedCart.shipToBillingAddress
} %}
{% endif %}
{% hook 'cp.snipcart.cart.detail' %}
<a href="{{ abandonedCart.dashboardUrl() }}" class="btn mt-4" target="_blank">
{{- "View in Snipcart Dashboard" | t('snipcart') -}}
</a>
</div>
<div class="mt-6 md:w-1/2 md:mt-0">
<h3>{{ 'Items' | t('snipcart') }}</h3>
{% include "snipcart/cp/_parts/cart-items" with {
order: abandonedCart,
type: 'abandonedCart'
} %}
</div>
</div>
<div class="block">
<hr>
{% include 'snipcart/cp/_parts/technical-details' with {
order: abandonedCart,
} %}
</div>
{% endblock %}