easyorders 0.1.14 → 0.1.16
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 +93 -93
- package/dist/bin/cli.js +12 -5
- package/dist/template/theme/config.json +113 -95
- package/dist/template/theme/home-sections/Tilted-Scrolling-Marque/config.json +107 -0
- package/dist/template/theme/home-sections/Tilted-Scrolling-Marque/template.liquid +171 -0
- package/dist/template/theme/home-sections/category-mosaic/config.json +89 -4
- package/dist/template/theme/home-sections/category-mosaic/template.liquid +84 -69
- package/dist/template/theme/home-sections/different-hero/config.json +199 -0
- package/dist/template/theme/home-sections/different-hero/template.liquid +219 -0
- package/dist/template/theme/home-sections/editorial-feature/config.json +27 -1
- package/dist/template/theme/home-sections/editorial-feature/template.liquid +11 -10
- package/dist/template/theme/home-sections/newsletter-luxe/config.json +28 -2
- package/dist/template/theme/home-sections/newsletter-luxe/template.liquid +19 -13
- package/dist/template/theme/home-sections/runway-hero/config.json +87 -30
- package/dist/template/theme/home-sections/runway-hero/template.liquid +59 -29
- package/dist/template/theme/home-sections/shop-the-look/config.json +93 -1
- package/dist/template/theme/home-sections/shop-the-look/template.liquid +41 -19
- package/dist/template/theme/home-sections/slider-before-after/config.json +213 -0
- package/dist/template/theme/home-sections/slider-before-after/template.liquid +336 -0
- package/dist/template/theme/home-sections/test-hero-allbird/config.json +130 -0
- package/dist/template/theme/home-sections/test-hero-allbird/template.liquid +149 -0
- package/dist/template/theme/home-sections/trust-promise/config.json +76 -2
- package/dist/template/theme/home-sections/trust-promise/template.liquid +119 -96
- package/dist/template/theme/home-sections/zoom-parallax/config.json +48 -0
- package/dist/template/theme/home-sections/zoom-parallax/template.liquid +135 -0
- package/dist/template/theme/product-data-schema.json +27 -0
- package/dist/template/theme/schema.json +136 -151
- package/dist/template/theme/script.js +1095 -586
- package/dist/template/theme/sections/breadcrumbs.liquid +17 -17
- package/dist/template/theme/sections/categories.liquid +26 -10
- package/dist/template/theme/sections/fake-counter.liquid +27 -27
- package/dist/template/theme/sections/fake-stock.liquid +6 -6
- package/dist/template/theme/sections/fake-visitor.liquid +6 -6
- package/dist/template/theme/sections/featured-products.liquid +143 -110
- package/dist/template/theme/sections/fixed-buy-button.liquid +51 -46
- package/dist/template/theme/sections/footer.liquid +128 -129
- package/dist/template/theme/sections/gallery.liquid +65 -61
- package/dist/template/theme/sections/header.liquid +232 -152
- package/dist/template/theme/sections/home-products-grid.liquid +167 -109
- package/dist/template/theme/sections/list-products.liquid +136 -93
- package/dist/template/theme/sections/order-invoice.liquid +102 -154
- package/dist/template/theme/sections/product-description.liquid +40 -30
- package/dist/template/theme/sections/product-details.liquid +48 -63
- package/dist/template/theme/sections/products-grid.liquid +134 -86
- package/dist/template/theme/sections/related-products.liquid +152 -88
- package/dist/template/theme/sections/reviews.liquid +70 -55
- package/dist/template/theme/sections/slider.liquid +43 -43
- package/dist/template/theme/sections/thanks.liquid +33 -33
- package/dist/template/theme/style.css +5617 -3923
- package/dist/template/theme/theme-data.json +26 -9
- package/package.json +40 -40
|
@@ -1,110 +1,168 @@
|
|
|
1
|
-
|
|
2
|
-
<section
|
|
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
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
<div class="ab-pgrid-
|
|
90
|
-
{% if
|
|
91
|
-
{%
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
{%
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
1
|
+
|
|
2
|
+
<section
|
|
3
|
+
class="ab-pgrid"
|
|
4
|
+
style="
|
|
5
|
+
--ab-sale-badge-bg: {{ theme_data.sale_badge_bg_color | default: '#c94a4a' }};
|
|
6
|
+
--ab-sale-badge-text: {{ theme_data.sale_badge_text_color | default: '#ffffff' }};
|
|
7
|
+
--ab-product-card-bg: {% if theme_data.card_background_product == 'transparent' %}transparent{% else %}{{ theme_data.card_background_product_color | default: '#f5f4f2' }}{% endif %};
|
|
8
|
+
--ab-pgrid-hero-cta-color: {{ theme_data.pgrid_hero_cta_text_color | default: '#1f272b' }};
|
|
9
|
+
--ab-pgrid-hero-cta-weight: {{ theme_data.pgrid_hero_cta_font_weight | default: '600' }};
|
|
10
|
+
"
|
|
11
|
+
>
|
|
12
|
+
<div class="ab-pgrid-wrap">
|
|
13
|
+
{% for product in products limit: 7 %}
|
|
14
|
+
{% assign color_variation = product.variations | where: "type", "color" | first %}
|
|
15
|
+
{% assign image_variation = product.variations | where: "type", "image" | first %}
|
|
16
|
+
{% assign swatch_total = 0 %}
|
|
17
|
+
{% assign pgrid_has_sale = false %}
|
|
18
|
+
{% if product.sale_price and product.sale_price < product.price and theme_data.show_sale_badge != false %}
|
|
19
|
+
{% assign pgrid_has_sale = true %}
|
|
20
|
+
{% endif %}
|
|
21
|
+
{% assign pgrid_custom_badge_value = pgrid_custom_badge | default: product.custom_badge_title | default: '' %}
|
|
22
|
+
{% if color_variation and color_variation.props %}
|
|
23
|
+
{% assign swatch_total = color_variation.props.size %}
|
|
24
|
+
{% elsif image_variation and image_variation.props %}
|
|
25
|
+
{% assign swatch_total = image_variation.props.size %}
|
|
26
|
+
{% endif %}
|
|
27
|
+
|
|
28
|
+
{% if forloop.index == 1 %}
|
|
29
|
+
<a
|
|
30
|
+
href="{% if category and category.slug %}/collections/{{ category.slug }}{% else %}#{% endif %}"
|
|
31
|
+
class="ab-pgrid-hero ab-reveal"
|
|
32
|
+
style="animation-delay: {{ forloop.index | times: 0.04 }}s"
|
|
33
|
+
>
|
|
34
|
+
<img
|
|
35
|
+
src="{% if category and category.thumb %}{{ category.thumb }}{% elsif product.thumb %}{{ product.thumb }}{% endif %}"
|
|
36
|
+
alt="{% if category and category.name %}{{ category.name }}{% else %}{{ section_title }}{% endif %}"
|
|
37
|
+
loading="lazy"
|
|
38
|
+
/>
|
|
39
|
+
<span class="ab-pgrid-hero-overlay"></span>
|
|
40
|
+
<div class="ab-pgrid-hero-content">
|
|
41
|
+
{% if category and category.name %}
|
|
42
|
+
<p class="ab-pgrid-hero-cat">{{ category.name }}</p>
|
|
43
|
+
{% endif %}
|
|
44
|
+
{% if section_title %}
|
|
45
|
+
<p class="ab-pgrid-hero-title">{{ section_title }}</p>
|
|
46
|
+
{% endif %}
|
|
47
|
+
</div>
|
|
48
|
+
{% unless hide_view_all %}<span class="ab-pgrid-hero-cta">{{ shop_now }}</span>{% endunless %}
|
|
49
|
+
</a>
|
|
50
|
+
{% endif %}
|
|
51
|
+
|
|
52
|
+
{% assign pgrid_custom_badge = '' %}
|
|
53
|
+
{% if product.product_theme_data %}
|
|
54
|
+
{% assign pgrid_custom_badge = product.product_theme_data.custom_badge_title | strip %}
|
|
55
|
+
{% endif %}
|
|
56
|
+
{% assign pgrid_has_sale = false %}
|
|
57
|
+
{% if product.sale_price and product.sale_price < product.price and theme_data.show_sale_badge != false %}
|
|
58
|
+
{% assign pgrid_has_sale = true %}
|
|
59
|
+
{% endif %}
|
|
60
|
+
{% assign pgrid_has_variants = false %}
|
|
61
|
+
{% if product.variations and product.variations.size > 0 %}
|
|
62
|
+
{% assign pgrid_has_variants = true %}
|
|
63
|
+
{% endif %}
|
|
64
|
+
{% assign pgrid_disable_no_stock_str = product.disable_orders_for_no_stock | append: '' | downcase | strip %}
|
|
65
|
+
{% assign pgrid_disable_no_stock = false %}
|
|
66
|
+
{% if pgrid_disable_no_stock_str == 'true' or pgrid_disable_no_stock_str == '1' %}
|
|
67
|
+
{% assign pgrid_disable_no_stock = true %}
|
|
68
|
+
{% endif %}
|
|
69
|
+
{% assign pgrid_stock_flag_raw = product.in_stock | default: product.available %}
|
|
70
|
+
{% assign pgrid_stock_flag_str = pgrid_stock_flag_raw | append: '' | downcase | strip %}
|
|
71
|
+
{% assign pgrid_is_out_of_stock = false %}
|
|
72
|
+
{% if pgrid_stock_flag_str == 'false' or pgrid_stock_flag_str == '0' %}
|
|
73
|
+
{% assign pgrid_is_out_of_stock = true %}
|
|
74
|
+
{% elsif pgrid_stock_flag_str == 'true' or pgrid_stock_flag_str == '1' %}
|
|
75
|
+
{% assign pgrid_is_out_of_stock = false %}
|
|
76
|
+
{% else %}
|
|
77
|
+
{% assign pgrid_stock_qty = product.quantity | default: product.stock | default: product.total_quantity | default: 0 | plus: 0 %}
|
|
78
|
+
{% if pgrid_stock_qty <= 0 %}
|
|
79
|
+
{% assign pgrid_is_out_of_stock = true %}
|
|
80
|
+
{% endif %}
|
|
81
|
+
{% endif %}
|
|
82
|
+
{% assign pgrid_hide_add_btn = false %}
|
|
83
|
+
{% if pgrid_disable_no_stock and pgrid_has_variants == false and pgrid_is_out_of_stock %}
|
|
84
|
+
{% assign pgrid_hide_add_btn = true %}
|
|
85
|
+
{% endif %}
|
|
86
|
+
|
|
87
|
+
<a href="/products/{{ product.slug }}" class="ab-pgrid-card ab-reveal" style="animation-delay: {{ forloop.index | times: 0.04 }}s">
|
|
88
|
+
{% if pgrid_has_sale or pgrid_custom_badge != '' %}
|
|
89
|
+
<div class="ab-pgrid-badge-stack">
|
|
90
|
+
{% if pgrid_has_sale %}
|
|
91
|
+
{% assign discount = product.price | minus: product.sale_price | times: 100 | divided_by: product.price | floor %}
|
|
92
|
+
<span class="ab-pgrid-badge ab-sale-badge">-{{ discount }}%</span>
|
|
93
|
+
{% endif %}
|
|
94
|
+
{% if pgrid_custom_badge != '' %}
|
|
95
|
+
<span class="ab-pgrid-badge ab-product-custom-badge">{{ pgrid_custom_badge }}</span>
|
|
96
|
+
{% endif %}
|
|
97
|
+
</div>
|
|
98
|
+
{% endif %}
|
|
99
|
+
|
|
100
|
+
<div class="ab-pgrid-media">
|
|
101
|
+
<img class="ab-pgrid-img-primary" src="{{ product.thumb }}" alt="{{ product.name }}" loading="lazy" />
|
|
102
|
+
{% if product.images[0] %}
|
|
103
|
+
<img class="ab-pgrid-img-hover" src="{{ product.images[0] }}" alt="{{ product.name }}" loading="lazy" />
|
|
104
|
+
{% endif %}
|
|
105
|
+
{% comment %} Wishlist & Compare action buttons — dispatch custom events caught by the storefront JS layer
|
|
106
|
+
<div class="ab-card-actions">
|
|
107
|
+
<button
|
|
108
|
+
class="ab-wishlist-btn"
|
|
109
|
+
type="button"
|
|
110
|
+
aria-label="Add to wishlist"
|
|
111
|
+
onclick="event.preventDefault();event.stopPropagation();this.dispatchEvent(new CustomEvent('toggle-wishlist',{bubbles:true,detail:{productId:'{{ product.id }}'}}));"
|
|
112
|
+
>
|
|
113
|
+
<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>
|
|
114
|
+
</button>
|
|
115
|
+
<button
|
|
116
|
+
class="ab-compare-btn"
|
|
117
|
+
type="button"
|
|
118
|
+
aria-label="Compare"
|
|
119
|
+
onclick="event.preventDefault();event.stopPropagation();this.dispatchEvent(new CustomEvent('toggle-compare',{bubbles:true,detail:{productId:'{{ product.id }}'}}));"
|
|
120
|
+
>
|
|
121
|
+
<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>
|
|
122
|
+
</button>
|
|
123
|
+
</div>
|
|
124
|
+
{% endcomment %}
|
|
125
|
+
{% unless pgrid_hide_add_btn %}
|
|
126
|
+
<button
|
|
127
|
+
class="ab-pgrid-add-btn"
|
|
128
|
+
type="button"
|
|
129
|
+
aria-label="Add to cart"
|
|
130
|
+
onclick="event.preventDefault();event.stopPropagation();this.dispatchEvent(new CustomEvent('quick-add',{bubbles:true,detail:{productId:'{{ product.id }}'}}));"
|
|
131
|
+
></button>
|
|
132
|
+
{% endunless %}
|
|
133
|
+
</div>
|
|
134
|
+
|
|
135
|
+
<div class="ab-pgrid-info">
|
|
136
|
+
<p class="ab-pgrid-name">{{ product.name }}</p>
|
|
137
|
+
|
|
138
|
+
<div class="ab-pgrid-price-row">
|
|
139
|
+
{% if product.sale_price and product.sale_price < product.price %}
|
|
140
|
+
<span class="ab-price-old">{{ product.price }} {{ currency }}</span>
|
|
141
|
+
<span class="ab-pgrid-price ab-price-sale">{{ product.sale_price }} {{ currency }}</span>
|
|
142
|
+
{% else %}
|
|
143
|
+
<span class="ab-pgrid-price">{{ product.price }} {{ currency }}</span>
|
|
144
|
+
{% endif %}
|
|
145
|
+
</div>
|
|
146
|
+
|
|
147
|
+
<div class="ab-pgrid-swatches">
|
|
148
|
+
{% if color_variation and color_variation.props %}
|
|
149
|
+
{% for prop in color_variation.props limit: 6 %}
|
|
150
|
+
<span class="ab-pgrid-swatch" style="background: {{ prop.value }}" title="{{ prop.name }}"></span>
|
|
151
|
+
{% endfor %}
|
|
152
|
+
{% elsif image_variation and image_variation.props %}
|
|
153
|
+
{% for prop in image_variation.props limit: 6 %}
|
|
154
|
+
<span class="ab-pgrid-swatch ab-pgrid-swatch-image" title="{{ prop.name }}">
|
|
155
|
+
<img src="{{ prop.value }}" alt="{{ prop.name }}" loading="lazy" />
|
|
156
|
+
</span>
|
|
157
|
+
{% endfor %}
|
|
158
|
+
{% endif %}
|
|
159
|
+
|
|
160
|
+
{% if swatch_total > 6 %}
|
|
161
|
+
<span class="ab-pgrid-swatch-more">+{{ swatch_total | minus: 6 }}</span>
|
|
162
|
+
{% endif %}
|
|
163
|
+
</div>
|
|
164
|
+
</div>
|
|
165
|
+
</a>
|
|
166
|
+
{% endfor %}
|
|
167
|
+
</div>
|
|
110
168
|
</section>
|
|
@@ -1,93 +1,136 @@
|
|
|
1
|
-
<section
|
|
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
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
</
|
|
1
|
+
<section
|
|
2
|
+
class="ab-plist"
|
|
3
|
+
style="
|
|
4
|
+
--ab-sale-badge-bg: {{ theme_data.sale_badge_bg_color | default: '#c94a4a' }};
|
|
5
|
+
--ab-sale-badge-text: {{ theme_data.sale_badge_text_color | default: '#ffffff' }};
|
|
6
|
+
--ab-product-card-bg: {% if theme_data.card_background_product == 'transparent' %}transparent{% else %}{{ theme_data.card_background_product_color | default: '#f5f4f2' }}{% endif %};
|
|
7
|
+
"
|
|
8
|
+
>
|
|
9
|
+
<div class="ab-plist-header">
|
|
10
|
+
{% if section_title %}
|
|
11
|
+
<h2 class="ab-plist-title ab-reveal">{{ section_title }}</h2>
|
|
12
|
+
{% endif %}
|
|
13
|
+
<div class="ab-plist-actions">
|
|
14
|
+
{% if category.slug %}
|
|
15
|
+
<a href="/collections/{{ category.slug }}" class="ab-plist-viewall-btn">{{ shop_now }}</a>
|
|
16
|
+
{% endif %}
|
|
17
|
+
<div class="ab-plist-arrows">
|
|
18
|
+
<button class="ab-plist-arrow ab-plist-prev" aria-label="Previous">
|
|
19
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="15 18 9 12 15 6"/></svg>
|
|
20
|
+
</button>
|
|
21
|
+
<button class="ab-plist-arrow ab-plist-next" aria-label="Next">
|
|
22
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="9 6 15 12 9 18"/></svg>
|
|
23
|
+
</button>
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
|
|
28
|
+
<div class="ab-plist-track">
|
|
29
|
+
{% for product in products %}
|
|
30
|
+
{% assign color_variation = product.variations | where: "type", "color" | first %}
|
|
31
|
+
{% assign image_variation = product.variations | where: "type", "image" | first %}
|
|
32
|
+
{% assign plist_custom_badge = '' %}
|
|
33
|
+
{% if product.product_theme_data %}
|
|
34
|
+
{% assign plist_custom_badge = product.product_theme_data.custom_badge_title | strip %}
|
|
35
|
+
{% endif %}
|
|
36
|
+
{% assign plist_has_sale = false %}
|
|
37
|
+
{% if product.sale_price and product.sale_price < product.price and theme_data.show_sale_badge != false %}
|
|
38
|
+
{% assign plist_has_sale = true %}
|
|
39
|
+
{% endif %}
|
|
40
|
+
{% assign plist_has_variants = false %}
|
|
41
|
+
{% if product.variations and product.variations.size > 0 %}
|
|
42
|
+
{% assign plist_has_variants = true %}
|
|
43
|
+
{% endif %}
|
|
44
|
+
{% assign plist_disable_no_stock_str = product.disable_orders_for_no_stock | append: '' | downcase | strip %}
|
|
45
|
+
{% assign plist_disable_no_stock = false %}
|
|
46
|
+
{% if plist_disable_no_stock_str == 'true' or plist_disable_no_stock_str == '1' %}
|
|
47
|
+
{% assign plist_disable_no_stock = true %}
|
|
48
|
+
{% endif %}
|
|
49
|
+
{% assign plist_stock_flag_raw = product.in_stock | default: product.available %}
|
|
50
|
+
{% assign plist_stock_flag_str = plist_stock_flag_raw | append: '' | downcase | strip %}
|
|
51
|
+
{% assign plist_is_out_of_stock = false %}
|
|
52
|
+
{% if plist_stock_flag_str == 'false' or plist_stock_flag_str == '0' %}
|
|
53
|
+
{% assign plist_is_out_of_stock = true %}
|
|
54
|
+
{% elsif plist_stock_flag_str == 'true' or plist_stock_flag_str == '1' %}
|
|
55
|
+
{% assign plist_is_out_of_stock = false %}
|
|
56
|
+
{% else %}
|
|
57
|
+
{% assign plist_stock_qty = product.quantity | default: product.stock | default: product.total_quantity | default: 0 | plus: 0 %}
|
|
58
|
+
{% if plist_stock_qty <= 0 %}
|
|
59
|
+
{% assign plist_is_out_of_stock = true %}
|
|
60
|
+
{% endif %}
|
|
61
|
+
{% endif %}
|
|
62
|
+
{% assign plist_hide_add_btn = false %}
|
|
63
|
+
{% if plist_disable_no_stock and plist_has_variants == false and plist_is_out_of_stock %}
|
|
64
|
+
{% assign plist_hide_add_btn = true %}
|
|
65
|
+
{% endif %}
|
|
66
|
+
|
|
67
|
+
<a href="/products/{{ product.slug }}" class="ab-plist-card ab-reveal" style="animation-delay: {{ forloop.index | times: 0.04 }}s">
|
|
68
|
+
<div class="ab-plist-media">
|
|
69
|
+
{% if plist_has_sale or plist_custom_badge != '' %}
|
|
70
|
+
<div class="ab-plist-badge-stack">
|
|
71
|
+
{% if plist_has_sale %}
|
|
72
|
+
{% assign discount = product.price | minus: product.sale_price | times: 100 | divided_by: product.price | floor %}
|
|
73
|
+
<span class="ab-plist-badge ab-sale-badge">-{{ discount }}%</span>
|
|
74
|
+
{% endif %}
|
|
75
|
+
{% if plist_custom_badge != '' %}
|
|
76
|
+
<span class="ab-plist-badge ab-product-custom-badge">{{ plist_custom_badge }}</span>
|
|
77
|
+
{% endif %}
|
|
78
|
+
</div>
|
|
79
|
+
{% endif %}
|
|
80
|
+
|
|
81
|
+
<img class="ab-plist-img-primary" src="{{ product.thumb }}" alt="{{ product.name }}" loading="lazy" />
|
|
82
|
+
{% if product.images[0] %}
|
|
83
|
+
<img class="ab-plist-img-hover" src="{{ product.images[0] }}" alt="{{ product.name }}" loading="lazy" />
|
|
84
|
+
{% endif %}
|
|
85
|
+
{% unless plist_hide_add_btn %}
|
|
86
|
+
<button
|
|
87
|
+
class="ab-plist-add-btn"
|
|
88
|
+
type="button"
|
|
89
|
+
aria-label="Add to cart"
|
|
90
|
+
onclick="event.preventDefault();event.stopPropagation();this.dispatchEvent(new CustomEvent('quick-add',{bubbles:true,detail:{productId:'{{ product.id }}'}}));"
|
|
91
|
+
></button>
|
|
92
|
+
{% endunless %}
|
|
93
|
+
</div>
|
|
94
|
+
|
|
95
|
+
<div class="ab-plist-info">
|
|
96
|
+
<p class="ab-plist-name">{{ product.name }}</p>
|
|
97
|
+
|
|
98
|
+
<div class="ab-plist-price-row">
|
|
99
|
+
{% if product.sale_price and product.sale_price < product.price %}
|
|
100
|
+
<span class="ab-price-old">{{ product.price }} {{ currency }}</span>
|
|
101
|
+
<span class="ab-plist-price ab-price-sale">{{ product.sale_price }} {{ currency }}</span>
|
|
102
|
+
{% else %}
|
|
103
|
+
<span class="ab-plist-price">{{ product.price }} {{ currency }}</span>
|
|
104
|
+
{% endif %}
|
|
105
|
+
</div>
|
|
106
|
+
|
|
107
|
+
<div class="ab-plist-swatches">
|
|
108
|
+
{% if color_variation and color_variation.props %}
|
|
109
|
+
{% for prop in color_variation.props limit: 4 %}
|
|
110
|
+
<span class="ab-plist-swatch" style="background: {{ prop.value }}" title="{{ prop.name }}"></span>
|
|
111
|
+
{% endfor %}
|
|
112
|
+
{% elsif image_variation and image_variation.props %}
|
|
113
|
+
{% for prop in image_variation.props limit: 4 %}
|
|
114
|
+
<span class="ab-plist-swatch ab-plist-swatch-image" title="{{ prop.name }}">
|
|
115
|
+
<img src="{{ prop.value }}" alt="{{ prop.name }}" loading="lazy" />
|
|
116
|
+
</span>
|
|
117
|
+
{% endfor %}
|
|
118
|
+
{% endif %}
|
|
119
|
+
</div>
|
|
120
|
+
</div>
|
|
121
|
+
</a>
|
|
122
|
+
{% endfor %}
|
|
123
|
+
</div>
|
|
124
|
+
</section>
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
<style>
|
|
129
|
+
.ab-plist-price-row {
|
|
130
|
+
display: flex !important;
|
|
131
|
+
align-items: baseline !important;
|
|
132
|
+
gap: 8px !important;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
</style>
|