easyorders 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +94 -0
- package/cli/bin/cli.ts +240 -0
- package/cli/server/api.ts +56 -0
- package/cli/server/index.ts +320 -0
- package/cli/server/token-store.ts +35 -0
- package/cli/server/tunnel.ts +161 -0
- package/cli/template/theme/config.json +123 -0
- package/cli/template/theme/schema.json +145 -0
- package/cli/template/theme/script.js +412 -0
- package/cli/template/theme/sections/breadcrumbs.liquid +17 -0
- package/cli/template/theme/sections/categories.liquid +10 -0
- package/cli/template/theme/sections/fake-counter.liquid +27 -0
- package/cli/template/theme/sections/fake-stock.liquid +6 -0
- package/cli/template/theme/sections/fake-visitor.liquid +6 -0
- package/cli/template/theme/sections/featured-products.liquid +110 -0
- package/cli/template/theme/sections/fixed-buy-button.liquid +46 -0
- package/cli/template/theme/sections/footer.liquid +129 -0
- package/cli/template/theme/sections/gallery.liquid +61 -0
- package/cli/template/theme/sections/header.liquid +152 -0
- package/cli/template/theme/sections/home-products-grid.liquid +110 -0
- package/cli/template/theme/sections/list-products.liquid +93 -0
- package/cli/template/theme/sections/order-invoice.liquid +154 -0
- package/cli/template/theme/sections/product-description.liquid +30 -0
- package/cli/template/theme/sections/product-details.liquid +63 -0
- package/cli/template/theme/sections/products-grid.liquid +86 -0
- package/cli/template/theme/sections/related-products.liquid +88 -0
- package/cli/template/theme/sections/reviews.liquid +55 -0
- package/cli/template/theme/sections/slider.liquid +43 -0
- package/cli/template/theme/sections/thanks.liquid +33 -0
- package/cli/template/theme/style.css +3923 -0
- package/cli/template/theme/theme-data.json +9 -0
- package/package.json +37 -0
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
<div class="ab-invoice">
|
|
2
|
+
<div class="ab-invoice-header">
|
|
3
|
+
{% if logo and logo != "" %}
|
|
4
|
+
<img class="ab-invoice-logo" src="{{ logo }}" alt="{{ store_name }}" />
|
|
5
|
+
{% endif %}
|
|
6
|
+
<button
|
|
7
|
+
class="ab-invoice-track-btn"
|
|
8
|
+
type="button"
|
|
9
|
+
title="{{ tracking_link }}"
|
|
10
|
+
onclick="this.dispatchEvent(new CustomEvent('copy-tracking-link',{bubbles:true,detail:{link:'{{ tracking_link }}'}}));"
|
|
11
|
+
>{{ t_copy_tracking_link }}</button>
|
|
12
|
+
</div>
|
|
13
|
+
|
|
14
|
+
<div class="ab-invoice-body">
|
|
15
|
+
<div class="ab-invoice-sidebar">
|
|
16
|
+
{% if has_contact %}
|
|
17
|
+
<address class="ab-invoice-store-info">
|
|
18
|
+
<h3 class="ab-invoice-store-name">{{ store_name }}</h3>
|
|
19
|
+
<span class="ab-invoice-contact-row">
|
|
20
|
+
{% if contact_phone and contact_phone != "" %}
|
|
21
|
+
<a href="tel:{{ contact_phone }}">
|
|
22
|
+
<span class="ab-invoice-contact-label">{{ t_phone }}:</span> {{ contact_phone }}
|
|
23
|
+
</a>
|
|
24
|
+
{% endif %}
|
|
25
|
+
{% if contact_email and contact_email != "" %}
|
|
26
|
+
<a href="mailto:{{ contact_email }}">
|
|
27
|
+
<span class="ab-invoice-contact-label">{{ t_email }}:</span> {{ contact_email }}
|
|
28
|
+
</a>
|
|
29
|
+
{% endif %}
|
|
30
|
+
</span>
|
|
31
|
+
{% if contact_address and contact_address != "" %}
|
|
32
|
+
<span>
|
|
33
|
+
<span class="ab-invoice-contact-label">{{ t_address }}:</span> {{ contact_address }}
|
|
34
|
+
</span>
|
|
35
|
+
{% endif %}
|
|
36
|
+
</address>
|
|
37
|
+
{% endif %}
|
|
38
|
+
|
|
39
|
+
<div class="ab-invoice-shipping">
|
|
40
|
+
<h3 class="ab-invoice-section-title">{{ t_shipping_details }}</h3>
|
|
41
|
+
<dl class="ab-invoice-dl">
|
|
42
|
+
<div class="ab-invoice-dl-row">
|
|
43
|
+
<dt>{{ t_name }}:</dt>
|
|
44
|
+
<dd>{{ order.full_name }}</dd>
|
|
45
|
+
</div>
|
|
46
|
+
<div class="ab-invoice-dl-row">
|
|
47
|
+
<dt>{{ t_phone }}:</dt>
|
|
48
|
+
<dd>{{ order.phone }}</dd>
|
|
49
|
+
</div>
|
|
50
|
+
{% if order.email and order.email != "" %}
|
|
51
|
+
<div class="ab-invoice-dl-row">
|
|
52
|
+
<dt>{{ t_email }}:</dt>
|
|
53
|
+
<dd>{{ order.email }}</dd>
|
|
54
|
+
</div>
|
|
55
|
+
{% endif %}
|
|
56
|
+
{% if order.country and order.country != "" %}
|
|
57
|
+
<div class="ab-invoice-dl-row">
|
|
58
|
+
<dt>{{ t_country }}:</dt>
|
|
59
|
+
<dd>{{ order.country }}</dd>
|
|
60
|
+
</div>
|
|
61
|
+
{% endif %}
|
|
62
|
+
{% if order.government and order.government != "" %}
|
|
63
|
+
<div class="ab-invoice-dl-row">
|
|
64
|
+
<dt>{{ t_government }}:</dt>
|
|
65
|
+
<dd>{{ order.government }}</dd>
|
|
66
|
+
</div>
|
|
67
|
+
{% endif %}
|
|
68
|
+
{% if order.address and order.address != "" %}
|
|
69
|
+
<div class="ab-invoice-dl-row">
|
|
70
|
+
<dt>{{ t_address }}:</dt>
|
|
71
|
+
<dd>{{ order.address }}</dd>
|
|
72
|
+
</div>
|
|
73
|
+
{% endif %}
|
|
74
|
+
<div class="ab-invoice-dl-row">
|
|
75
|
+
<dt>{{ t_payment_details }}:</dt>
|
|
76
|
+
<dd>{{ order.payment_method }}</dd>
|
|
77
|
+
</div>
|
|
78
|
+
{% if order.transfer_receipt and order.transfer_receipt != "" %}
|
|
79
|
+
<div class="ab-invoice-dl-row ab-invoice-dl-row-center">
|
|
80
|
+
<img src="{{ order.transfer_receipt }}" alt="Transfer Receipt" class="ab-invoice-receipt-img" />
|
|
81
|
+
</div>
|
|
82
|
+
{% endif %}
|
|
83
|
+
</dl>
|
|
84
|
+
</div>
|
|
85
|
+
|
|
86
|
+
<div class="ab-invoice-timeline">
|
|
87
|
+
<ul class="ab-invoice-notes-list">
|
|
88
|
+
<li>
|
|
89
|
+
<span>{{ t_order_created }}</span>
|
|
90
|
+
<span class="ab-invoice-note-date">{{ order.created_at }}</span>
|
|
91
|
+
</li>
|
|
92
|
+
{% for note in order_notes %}
|
|
93
|
+
<li>
|
|
94
|
+
<span>{{ note.note }}</span>
|
|
95
|
+
<span class="ab-invoice-note-date">{{ note.created_at }}</span>
|
|
96
|
+
</li>
|
|
97
|
+
{% endfor %}
|
|
98
|
+
</ul>
|
|
99
|
+
</div>
|
|
100
|
+
</div>
|
|
101
|
+
|
|
102
|
+
<div class="ab-invoice-main">
|
|
103
|
+
<div class="ab-invoice-status-row">
|
|
104
|
+
<span class="ab-invoice-status-label">{{ t_order_status }}:</span>
|
|
105
|
+
<span class="ab-invoice-status-value">{{ order.status_label }}</span>
|
|
106
|
+
</div>
|
|
107
|
+
|
|
108
|
+
<div class="ab-invoice-items">
|
|
109
|
+
{% for item in order.cart_items %}
|
|
110
|
+
<div class="ab-invoice-item">
|
|
111
|
+
{% if item.thumb and item.thumb != "" %}
|
|
112
|
+
<img class="ab-invoice-item-img" src="{{ item.thumb }}" alt="{{ item.name }}" loading="lazy" />
|
|
113
|
+
{% endif %}
|
|
114
|
+
<div class="ab-invoice-item-details">
|
|
115
|
+
<h4 class="ab-invoice-item-name">{{ item.name }}</h4>
|
|
116
|
+
{% if item.variants and item.variants != "" %}
|
|
117
|
+
<p class="ab-invoice-item-variants">{{ item.variants }}</p>
|
|
118
|
+
{% endif %}
|
|
119
|
+
<p class="ab-invoice-item-qty">{{ t_items_count }}: {{ item.quantity }}</p>
|
|
120
|
+
<p class="ab-invoice-item-unit-price">{{ t_piece_price }}: {{ item.price }} {{ currency }}</p>
|
|
121
|
+
{% if item.metadata_html and item.metadata_html != "" %}
|
|
122
|
+
<div class="ab-invoice-item-metadata">{{ item.metadata_html }}</div>
|
|
123
|
+
{% endif %}
|
|
124
|
+
</div>
|
|
125
|
+
<span class="ab-invoice-item-total">{{ t_total }} {{ item.total }} {{ currency }}</span>
|
|
126
|
+
</div>
|
|
127
|
+
{% endfor %}
|
|
128
|
+
</div>
|
|
129
|
+
|
|
130
|
+
<div class="ab-invoice-totals">
|
|
131
|
+
<div class="ab-invoice-dl-row">
|
|
132
|
+
<dt>{{ t_product_total }}:</dt>
|
|
133
|
+
<dd>{{ order.cost }} {{ currency }}</dd>
|
|
134
|
+
</div>
|
|
135
|
+
{% unless order.is_digital %}
|
|
136
|
+
<div class="ab-invoice-dl-row">
|
|
137
|
+
<dt>{{ t_shipping_cost }}:</dt>
|
|
138
|
+
<dd>{% if order.shipping_cost %}{{ order.shipping_cost }} {{ currency }}{% else %}{{ t_free_shipping }}{% endif %}</dd>
|
|
139
|
+
</div>
|
|
140
|
+
{% endunless %}
|
|
141
|
+
{% if order.coupon_code and order.coupon_code != "" %}
|
|
142
|
+
<div class="ab-invoice-dl-row">
|
|
143
|
+
<dt>{{ t_coupon_code }}: {{ order.coupon_code }}</dt>
|
|
144
|
+
<dd>{{ order.coupon_discount }} {{ currency }}</dd>
|
|
145
|
+
</div>
|
|
146
|
+
{% endif %}
|
|
147
|
+
<div class="ab-invoice-dl-row ab-invoice-total-row">
|
|
148
|
+
<dt>{{ t_total }}:</dt>
|
|
149
|
+
<dd>{{ order.total_cost }} {{ currency }}</dd>
|
|
150
|
+
</div>
|
|
151
|
+
</div>
|
|
152
|
+
</div>
|
|
153
|
+
</div>
|
|
154
|
+
</div>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<div class="lq-desc-accordion">
|
|
2
|
+
{% if description != "" %}
|
|
3
|
+
<div class="lq-desc-item" data-open="true">
|
|
4
|
+
<button class="lq-desc-toggle" type="button" aria-expanded="true">
|
|
5
|
+
<span>{{ description_label }}</span>
|
|
6
|
+
<span class="lq-desc-chevron"></span>
|
|
7
|
+
</button>
|
|
8
|
+
<div class="lq-desc-panel" style="display:block">
|
|
9
|
+
<div class="lq-desc-content product_description">
|
|
10
|
+
<div class="ql-editor leading-10" style="text-align:start" dir="auto">{{ description }}</div>
|
|
11
|
+
</div>
|
|
12
|
+
</div>
|
|
13
|
+
</div>
|
|
14
|
+
{% endif %}
|
|
15
|
+
|
|
16
|
+
{% for policy in policies %}
|
|
17
|
+
<div class="lq-desc-item">
|
|
18
|
+
<button class="lq-desc-toggle" type="button" aria-expanded="false">
|
|
19
|
+
<span class="lq-desc-toggle-label">
|
|
20
|
+
<img src="{{ policy.icon }}" alt="" class="lq-desc-icon" />
|
|
21
|
+
<span>{{ policy.title }}</span>
|
|
22
|
+
</span>
|
|
23
|
+
<span class="lq-desc-chevron"></span>
|
|
24
|
+
</button>
|
|
25
|
+
<div class="lq-desc-panel" style="display:none">
|
|
26
|
+
<div class="lq-desc-content">{{ policy.content }}</div>
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
{% endfor %}
|
|
30
|
+
</div>
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
<div class="ab-pd">
|
|
2
|
+
<h1 class="ab-pd-name">{{ product_name }}</h1>
|
|
3
|
+
|
|
4
|
+
<div class="ab-pd-price-row">
|
|
5
|
+
{% if sale_price and sale_price < price %}
|
|
6
|
+
<span class="ab-pd-price-old">{{ price }} {{ currency }}</span>
|
|
7
|
+
<span class="ab-pd-price ab-pd-price-sale">{{ sale_price }} {{ currency }}</span>
|
|
8
|
+
{% else %}
|
|
9
|
+
<span class="ab-pd-price">{{ price }} {{ currency }}</span>
|
|
10
|
+
{% endif %}
|
|
11
|
+
</div>
|
|
12
|
+
|
|
13
|
+
{% if rating > 0 %}
|
|
14
|
+
<div class="ab-pd-rating">
|
|
15
|
+
<div class="ab-pd-stars">
|
|
16
|
+
{% assign full_stars = rating | floor %}
|
|
17
|
+
{% assign has_half = false %}
|
|
18
|
+
{% assign decimal = rating | minus: full_stars %}
|
|
19
|
+
{% if decimal >= 0.25 and decimal < 0.75 %}
|
|
20
|
+
{% assign has_half = true %}
|
|
21
|
+
{% elsif decimal >= 0.75 %}
|
|
22
|
+
{% assign full_stars = full_stars | plus: 1 %}
|
|
23
|
+
{% endif %}
|
|
24
|
+
|
|
25
|
+
{% for i in (1..5) %}
|
|
26
|
+
{% if i <= full_stars %}
|
|
27
|
+
<span class="ab-pd-star ab-pd-star-filled"></span>
|
|
28
|
+
{% elsif has_half and i == full_stars | plus: 1 %}
|
|
29
|
+
<span class="ab-pd-star ab-pd-star-half"></span>
|
|
30
|
+
{% else %}
|
|
31
|
+
<span class="ab-pd-star ab-pd-star-empty"></span>
|
|
32
|
+
{% endif %}
|
|
33
|
+
{% endfor %}
|
|
34
|
+
</div>
|
|
35
|
+
<span class="ab-pd-reviews-count">({{ reviews_count }})</span>
|
|
36
|
+
</div>
|
|
37
|
+
{% endif %}
|
|
38
|
+
|
|
39
|
+
{% if description and description != "" %}
|
|
40
|
+
<p class="ab-pd-description">{{ description }}</p>
|
|
41
|
+
{% endif %}
|
|
42
|
+
|
|
43
|
+
{% comment %} Wishlist & Compare buttons on the product detail page — dispatch toggle events handled by the storefront JS layer
|
|
44
|
+
<div class="ab-pd-actions">
|
|
45
|
+
<button
|
|
46
|
+
class="ab-pd-wishlist-btn"
|
|
47
|
+
type="button"
|
|
48
|
+
aria-label="Add to wishlist"
|
|
49
|
+
onclick="event.preventDefault();event.stopPropagation();this.dispatchEvent(new CustomEvent('toggle-wishlist',{bubbles:true,detail:{productId:'{{ product_id }}'}}));"
|
|
50
|
+
>
|
|
51
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"/></svg>
|
|
52
|
+
</button>
|
|
53
|
+
<button
|
|
54
|
+
class="ab-pd-compare-btn"
|
|
55
|
+
type="button"
|
|
56
|
+
aria-label="Compare"
|
|
57
|
+
onclick="event.preventDefault();event.stopPropagation();this.dispatchEvent(new CustomEvent('toggle-compare',{bubbles:true,detail:{productId:'{{ product_id }}'}}));"
|
|
58
|
+
>
|
|
59
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="16 3 21 8 16 13"/><line x1="21" y1="8" x2="9" y2="8"/><polyline points="8 21 3 16 8 11"/><line x1="3" y1="16" x2="15" y2="16"/></svg>
|
|
60
|
+
</button>
|
|
61
|
+
</div>
|
|
62
|
+
{% endcomment %}
|
|
63
|
+
</div>
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
|
|
2
|
+
<section class="ab-pgrid">
|
|
3
|
+
<div class="ab-pgrid-wrap ab-pgrid-wrap--no-hero">
|
|
4
|
+
{% for product in products %}
|
|
5
|
+
{% assign color_variation = product.variations | where: "type", "color" | first %}
|
|
6
|
+
{% assign image_variation = product.variations | where: "type", "image" | first %}
|
|
7
|
+
{% assign swatch_total = 0 %}
|
|
8
|
+
{% if color_variation and color_variation.props %}
|
|
9
|
+
{% assign swatch_total = color_variation.props.size %}
|
|
10
|
+
{% elsif image_variation and image_variation.props %}
|
|
11
|
+
{% assign swatch_total = image_variation.props.size %}
|
|
12
|
+
{% endif %}
|
|
13
|
+
|
|
14
|
+
<a href="/products/{{ product.slug }}" class="ab-pgrid-card ab-reveal" style="animation-delay: {{ forloop.index | times: 0.04 }}s">
|
|
15
|
+
{% if product.sale_price and product.sale_price < product.price %}
|
|
16
|
+
{% assign discount = product.price | minus: product.sale_price | times: 100 | divided_by: product.price | floor %}
|
|
17
|
+
<span class="ab-pgrid-badge ab-sale-badge">{{ sale }} -{{ discount }}%</span>
|
|
18
|
+
{% endif %}
|
|
19
|
+
|
|
20
|
+
<div class="ab-pgrid-media">
|
|
21
|
+
<img class="ab-pgrid-img-primary" src="{{ product.thumb }}" alt="{{ product.name }}" loading="lazy" />
|
|
22
|
+
{% if product.images[0] %}
|
|
23
|
+
<img class="ab-pgrid-img-hover" src="{{ product.images[0] }}" alt="{{ product.name }}" loading="lazy" />
|
|
24
|
+
{% endif %}
|
|
25
|
+
{% comment %} Wishlist & Compare action buttons — dispatch custom events caught by the storefront JS layer
|
|
26
|
+
<div class="ab-card-actions">
|
|
27
|
+
<button
|
|
28
|
+
class="ab-wishlist-btn"
|
|
29
|
+
type="button"
|
|
30
|
+
aria-label="Add to wishlist"
|
|
31
|
+
onclick="event.preventDefault();event.stopPropagation();this.dispatchEvent(new CustomEvent('toggle-wishlist',{bubbles:true,detail:{productId:'{{ product.id }}'}}));"
|
|
32
|
+
>
|
|
33
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"/></svg>
|
|
34
|
+
</button>
|
|
35
|
+
<button
|
|
36
|
+
class="ab-compare-btn"
|
|
37
|
+
type="button"
|
|
38
|
+
aria-label="Compare"
|
|
39
|
+
onclick="event.preventDefault();event.stopPropagation();this.dispatchEvent(new CustomEvent('toggle-compare',{bubbles:true,detail:{productId:'{{ product.id }}'}}));"
|
|
40
|
+
>
|
|
41
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="16 3 21 8 16 13"/><line x1="21" y1="8" x2="9" y2="8"/><polyline points="8 21 3 16 8 11"/><line x1="3" y1="16" x2="15" y2="16"/></svg>
|
|
42
|
+
</button>
|
|
43
|
+
</div>
|
|
44
|
+
{% endcomment %}
|
|
45
|
+
<button
|
|
46
|
+
class="ab-pgrid-add-btn"
|
|
47
|
+
type="button"
|
|
48
|
+
aria-label="Add to cart"
|
|
49
|
+
onclick="event.preventDefault();event.stopPropagation();this.dispatchEvent(new CustomEvent('quick-add',{bubbles:true,detail:{productId:'{{ product.id }}'}}));"
|
|
50
|
+
></button>
|
|
51
|
+
</div>
|
|
52
|
+
|
|
53
|
+
<div class="ab-pgrid-info">
|
|
54
|
+
<p class="ab-pgrid-name">{{ product.name }}</p>
|
|
55
|
+
|
|
56
|
+
<div class="ab-pgrid-price-row">
|
|
57
|
+
{% if product.sale_price and product.sale_price < product.price %}
|
|
58
|
+
<span class="ab-price-old">{{ product.price }} {{ currency }}</span>
|
|
59
|
+
<span class="ab-pgrid-price ab-price-sale">{{ product.sale_price }} {{ currency }}</span>
|
|
60
|
+
{% else %}
|
|
61
|
+
<span class="ab-pgrid-price">{{ product.price }} {{ currency }}</span>
|
|
62
|
+
{% endif %}
|
|
63
|
+
</div>
|
|
64
|
+
|
|
65
|
+
<div class="ab-pgrid-swatches">
|
|
66
|
+
{% if color_variation and color_variation.props %}
|
|
67
|
+
{% for prop in color_variation.props limit: 6 %}
|
|
68
|
+
<span class="ab-pgrid-swatch" style="background: {{ prop.value }}" title="{{ prop.name }}"></span>
|
|
69
|
+
{% endfor %}
|
|
70
|
+
{% elsif image_variation and image_variation.props %}
|
|
71
|
+
{% for prop in image_variation.props limit: 6 %}
|
|
72
|
+
<span class="ab-pgrid-swatch ab-pgrid-swatch-image" title="{{ prop.name }}">
|
|
73
|
+
<img src="{{ prop.value }}" alt="{{ prop.name }}" loading="lazy" />
|
|
74
|
+
</span>
|
|
75
|
+
{% endfor %}
|
|
76
|
+
{% endif %}
|
|
77
|
+
|
|
78
|
+
{% if swatch_total > 6 %}
|
|
79
|
+
<span class="ab-pgrid-swatch-more">+{{ swatch_total | minus: 6 }}</span>
|
|
80
|
+
{% endif %}
|
|
81
|
+
</div>
|
|
82
|
+
</div>
|
|
83
|
+
</a>
|
|
84
|
+
{% endfor %}
|
|
85
|
+
</div>
|
|
86
|
+
</section>
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
<section class="ab-plist ab-plist--related">
|
|
2
|
+
<div class="ab-plist-header">
|
|
3
|
+
{% if section_title %}
|
|
4
|
+
<h2 class="ab-plist-title ab-reveal">{{ section_title }}</h2>
|
|
5
|
+
{% endif %}
|
|
6
|
+
<div class="ab-plist-arrows">
|
|
7
|
+
<button class="ab-plist-arrow ab-plist-prev" aria-label="Previous">
|
|
8
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="15 18 9 12 15 6"/></svg>
|
|
9
|
+
</button>
|
|
10
|
+
<button class="ab-plist-arrow ab-plist-next" aria-label="Next">
|
|
11
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="9 6 15 12 9 18"/></svg>
|
|
12
|
+
</button>
|
|
13
|
+
</div>
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
<div class="ab-plist-track">
|
|
17
|
+
{% for product in products %}
|
|
18
|
+
{% assign color_variation = product.variations | where: "type", "color" | first %}
|
|
19
|
+
{% assign image_variation = product.variations | where: "type", "image" | first %}
|
|
20
|
+
|
|
21
|
+
<a href="/products/{{ product.slug }}" class="ab-plist-card ab-reveal" style="animation-delay: {{ forloop.index | times: 0.04 }}s">
|
|
22
|
+
{% if product.sale_price and product.sale_price < product.price %}
|
|
23
|
+
{% assign discount = product.price | minus: product.sale_price | times: 100 | divided_by: product.price | floor %}
|
|
24
|
+
<span class="ab-plist-badge ab-sale-badge">{{ sale }} -{{ discount }}%</span>
|
|
25
|
+
{% endif %}
|
|
26
|
+
|
|
27
|
+
<div class="ab-plist-media">
|
|
28
|
+
<img class="ab-plist-img-primary" src="{{ product.thumb }}" alt="{{ product.name }}" loading="lazy" />
|
|
29
|
+
{% if product.images[0] %}
|
|
30
|
+
<img class="ab-plist-img-hover" src="{{ product.images[0] }}" alt="{{ product.name }}" loading="lazy" />
|
|
31
|
+
{% endif %}
|
|
32
|
+
{% comment %} Wishlist & Compare action buttons — dispatch custom events caught by the storefront JS layer
|
|
33
|
+
<div class="ab-card-actions">
|
|
34
|
+
<button
|
|
35
|
+
class="ab-wishlist-btn"
|
|
36
|
+
type="button"
|
|
37
|
+
aria-label="Add to wishlist"
|
|
38
|
+
onclick="event.preventDefault();event.stopPropagation();this.dispatchEvent(new CustomEvent('toggle-wishlist',{bubbles:true,detail:{productId:'{{ product.id }}'}}));"
|
|
39
|
+
>
|
|
40
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"/></svg>
|
|
41
|
+
</button>
|
|
42
|
+
<button
|
|
43
|
+
class="ab-compare-btn"
|
|
44
|
+
type="button"
|
|
45
|
+
aria-label="Compare"
|
|
46
|
+
onclick="event.preventDefault();event.stopPropagation();this.dispatchEvent(new CustomEvent('toggle-compare',{bubbles:true,detail:{productId:'{{ product.id }}'}}));"
|
|
47
|
+
>
|
|
48
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="16 3 21 8 16 13"/><line x1="21" y1="8" x2="9" y2="8"/><polyline points="8 21 3 16 8 11"/><line x1="3" y1="16" x2="15" y2="16"/></svg>
|
|
49
|
+
</button>
|
|
50
|
+
</div>
|
|
51
|
+
{% endcomment %}
|
|
52
|
+
<button
|
|
53
|
+
class="ab-plist-add-btn"
|
|
54
|
+
type="button"
|
|
55
|
+
aria-label="Add to cart"
|
|
56
|
+
onclick="event.preventDefault();event.stopPropagation();this.dispatchEvent(new CustomEvent('quick-add',{bubbles:true,detail:{productId:'{{ product.id }}'}}));"
|
|
57
|
+
></button>
|
|
58
|
+
</div>
|
|
59
|
+
|
|
60
|
+
<div class="ab-plist-info">
|
|
61
|
+
<p class="ab-plist-name">{{ product.name }}</p>
|
|
62
|
+
<div class="ab-plist-price-row">
|
|
63
|
+
{% if product.sale_price and product.sale_price < product.price %}
|
|
64
|
+
<span class="ab-price-old">{{ product.price }} {{ currency }}</span>
|
|
65
|
+
<span class="ab-plist-price ab-price-sale">{{ product.sale_price }} {{ currency }}</span>
|
|
66
|
+
{% else %}
|
|
67
|
+
<span class="ab-plist-price">{{ product.price }} {{ currency }}</span>
|
|
68
|
+
{% endif %}
|
|
69
|
+
</div>
|
|
70
|
+
|
|
71
|
+
<div class="ab-plist-swatches">
|
|
72
|
+
{% if color_variation and color_variation.props %}
|
|
73
|
+
{% for prop in color_variation.props limit: 4 %}
|
|
74
|
+
<span class="ab-plist-swatch" style="background: {{ prop.value }}" title="{{ prop.name }}"></span>
|
|
75
|
+
{% endfor %}
|
|
76
|
+
{% elsif image_variation and image_variation.props %}
|
|
77
|
+
{% for prop in image_variation.props limit: 4 %}
|
|
78
|
+
<span class="ab-plist-swatch ab-plist-swatch-image" title="{{ prop.name }}">
|
|
79
|
+
<img src="{{ prop.value }}" alt="{{ prop.name }}" loading="lazy" />
|
|
80
|
+
</span>
|
|
81
|
+
{% endfor %}
|
|
82
|
+
{% endif %}
|
|
83
|
+
</div>
|
|
84
|
+
</div>
|
|
85
|
+
</a>
|
|
86
|
+
{% endfor %}
|
|
87
|
+
</div>
|
|
88
|
+
</section>
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
<div class="ab-reviews">
|
|
2
|
+
<div class="ab-reviews-header">
|
|
3
|
+
<h2 class="ab-reviews-title">{{ t_users_reviews }}</h2>
|
|
4
|
+
<div class="ab-reviews-summary">
|
|
5
|
+
<div class="ab-reviews-avg-stars">
|
|
6
|
+
{% assign avg_full = average_rating | floor %}
|
|
7
|
+
{% assign avg_decimal = average_rating | minus: avg_full %}
|
|
8
|
+
{% assign avg_has_half = false %}
|
|
9
|
+
{% if avg_decimal >= 0.25 and avg_decimal < 0.75 %}
|
|
10
|
+
{% assign avg_has_half = true %}
|
|
11
|
+
{% elsif avg_decimal >= 0.75 %}
|
|
12
|
+
{% assign avg_full = avg_full | plus: 1 %}
|
|
13
|
+
{% endif %}
|
|
14
|
+
{% for i in (1..5) %}
|
|
15
|
+
{% if i <= avg_full %}
|
|
16
|
+
<span class="ab-pd-star ab-pd-star-filled"></span>
|
|
17
|
+
{% elsif avg_has_half and i == avg_full | plus: 1 %}
|
|
18
|
+
<span class="ab-pd-star ab-pd-star-half"></span>
|
|
19
|
+
{% else %}
|
|
20
|
+
<span class="ab-pd-star ab-pd-star-empty"></span>
|
|
21
|
+
{% endif %}
|
|
22
|
+
{% endfor %}
|
|
23
|
+
</div>
|
|
24
|
+
<span class="ab-reviews-count">{{ average_rating_display }} ({{ reviews_count }} {{ t_reviews }})</span>
|
|
25
|
+
</div>
|
|
26
|
+
<button class="ab-reviews-write-btn" type="button" onclick="this.dispatchEvent(new CustomEvent('review-open',{bubbles:true}))">{{ t_share_your_review }}</button>
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
<div class="ab-reviews-list">
|
|
30
|
+
{% for review in reviews %}
|
|
31
|
+
<div class="ab-review-card">
|
|
32
|
+
<div class="ab-review-stars">
|
|
33
|
+
{% for i in (1..5) %}
|
|
34
|
+
{% if i <= review.rating %}
|
|
35
|
+
<span class="ab-pd-star ab-pd-star-filled"></span>
|
|
36
|
+
{% else %}
|
|
37
|
+
<span class="ab-pd-star ab-pd-star-empty"></span>
|
|
38
|
+
{% endif %}
|
|
39
|
+
{% endfor %}
|
|
40
|
+
</div>
|
|
41
|
+
{% if review.user_name and review.user_name != "" %}
|
|
42
|
+
<h3 class="ab-review-author">{{ review.user_name }}</h3>
|
|
43
|
+
{% endif %}
|
|
44
|
+
<p class="ab-review-comment" data-review-comment>{{ review.comment }}</p>
|
|
45
|
+
{% if review.image and review.image != "" %}
|
|
46
|
+
<img src="{{ review.image }}" alt="{{ review.user_name }}" class="ab-review-image" loading="lazy" />
|
|
47
|
+
{% endif %}
|
|
48
|
+
</div>
|
|
49
|
+
{% endfor %}
|
|
50
|
+
</div>
|
|
51
|
+
|
|
52
|
+
{% if reviews.size == 0 %}
|
|
53
|
+
<p class="ab-reviews-empty">{{ t_no_reviews }}</p>
|
|
54
|
+
{% endif %}
|
|
55
|
+
</div>
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<section class="ab-slider" data-autoplay="5000">
|
|
2
|
+
<div class="ab-slider-track">
|
|
3
|
+
{% for slide in slides %}
|
|
4
|
+
{% if slide.url != blank %}
|
|
5
|
+
<a
|
|
6
|
+
href="{{ slide.url }}"
|
|
7
|
+
class="ab-slider-slide{% if forloop.first %} ab-active{% endif %}"
|
|
8
|
+
aria-label="{{ slide.alt | default: "Slide image" }}"
|
|
9
|
+
>
|
|
10
|
+
<picture>
|
|
11
|
+
{% if slide.mobile_image != blank %}
|
|
12
|
+
<source media="(max-width: 425px)" srcset="{{ slide.mobile_image }}" />
|
|
13
|
+
<source media="(min-width: 426px)" srcset="{{ slide.image }}" />
|
|
14
|
+
{% endif %}
|
|
15
|
+
<img src="{{ slide.image }}" alt="{{ slide.alt | default: "Slide image" }}" loading="{% if forloop.first %}eager{% else %}lazy{% endif %}" />
|
|
16
|
+
</picture>
|
|
17
|
+
</a>
|
|
18
|
+
{% else %}
|
|
19
|
+
<div class="ab-slider-slide{% if forloop.first %} ab-active{% endif %}" aria-label="{{ slide.alt | default: "Slide image" }}">
|
|
20
|
+
<picture>
|
|
21
|
+
{% if slide.mobile_image != blank %}
|
|
22
|
+
<source media="(max-width: 425px)" srcset="{{ slide.mobile_image }}" />
|
|
23
|
+
<source media="(min-width: 426px)" srcset="{{ slide.image }}" />
|
|
24
|
+
{% endif %}
|
|
25
|
+
<img src="{{ slide.image }}" alt="{{ slide.alt | default: "Slide image" }}" loading="{% if forloop.first %}eager{% else %}lazy{% endif %}" />
|
|
26
|
+
</picture>
|
|
27
|
+
</div>
|
|
28
|
+
{% endif %}
|
|
29
|
+
{% endfor %}
|
|
30
|
+
</div>
|
|
31
|
+
|
|
32
|
+
{% if slides.size > 1 %}
|
|
33
|
+
<div class="ab-slider-controls">
|
|
34
|
+
<div class="ab-slider-progress">
|
|
35
|
+
<span class="ab-slider-progress-bar"></span>
|
|
36
|
+
</div>
|
|
37
|
+
<button class="ab-slider-pause" aria-label="Pause slideshow">
|
|
38
|
+
<svg class="ab-slider-icon-pause" viewBox="0 0 24 24" fill="currentColor"><rect x="6" y="4" width="4" height="16"/><rect x="14" y="4" width="4" height="16"/></svg>
|
|
39
|
+
<svg class="ab-slider-icon-play" viewBox="0 0 24 24" fill="currentColor"><polygon points="6,4 20,12 6,20"/></svg>
|
|
40
|
+
</button>
|
|
41
|
+
</div>
|
|
42
|
+
{% endif %}
|
|
43
|
+
</section>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<div class="ab-thanks">
|
|
2
|
+
<div class="ab-thanks-content">
|
|
3
|
+
{% if content and content != "" %}
|
|
4
|
+
<div class="ab-thanks-custom-content">{{ content }}</div>
|
|
5
|
+
{% else %}
|
|
6
|
+
<div class="ab-thanks-default">
|
|
7
|
+
<div class="ab-thanks-icon" aria-hidden="true">
|
|
8
|
+
<svg viewBox="0 0 80 80" fill="none" xmlns="http://www.w3.org/2000/svg" width="80" height="80">
|
|
9
|
+
<circle cx="40" cy="40" r="38" stroke="currentColor" stroke-width="3"/>
|
|
10
|
+
<path d="M24 42l10 10 22-24" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/>
|
|
11
|
+
</svg>
|
|
12
|
+
</div>
|
|
13
|
+
<h1 class="ab-thanks-title">{{ thanks_title }}</h1>
|
|
14
|
+
<p class="ab-thanks-message">{{ thanks_message }}</p>
|
|
15
|
+
{% if phone_message and phone_message != "" %}
|
|
16
|
+
<p class="ab-thanks-phone-msg">{{ phone_message }}</p>
|
|
17
|
+
{% endif %}
|
|
18
|
+
</div>
|
|
19
|
+
{% endif %}
|
|
20
|
+
|
|
21
|
+
{% if show_home_button %}
|
|
22
|
+
<button
|
|
23
|
+
class="ab-thanks-home-btn"
|
|
24
|
+
type="button"
|
|
25
|
+
onclick="this.dispatchEvent(new CustomEvent('go-home',{bubbles:true}));"
|
|
26
|
+
>{{ go_home_text }}</button>
|
|
27
|
+
{% endif %}
|
|
28
|
+
|
|
29
|
+
{% if offers_text and offers_text != "" %}
|
|
30
|
+
<p class="ab-thanks-offers">{{ offers_text }}</p>
|
|
31
|
+
{% endif %}
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|