@o2vend/theme-cli 1.0.32

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.
Files changed (116) hide show
  1. package/README.md +425 -0
  2. package/assets/Logo_o2vend.png +0 -0
  3. package/assets/favicon.png +0 -0
  4. package/assets/logo-white.png +0 -0
  5. package/bin/o2vend +42 -0
  6. package/config/widget-map.json +50 -0
  7. package/lib/commands/check.js +201 -0
  8. package/lib/commands/generate.js +33 -0
  9. package/lib/commands/init.js +214 -0
  10. package/lib/commands/optimize.js +216 -0
  11. package/lib/commands/package.js +208 -0
  12. package/lib/commands/serve.js +105 -0
  13. package/lib/commands/validate.js +191 -0
  14. package/lib/lib/api-client.js +357 -0
  15. package/lib/lib/dev-server.js +2618 -0
  16. package/lib/lib/file-watcher.js +80 -0
  17. package/lib/lib/hot-reload.js +106 -0
  18. package/lib/lib/liquid-engine.js +822 -0
  19. package/lib/lib/liquid-filters.js +671 -0
  20. package/lib/lib/mock-api-server.js +989 -0
  21. package/lib/lib/mock-data.js +1468 -0
  22. package/lib/lib/widget-service.js +321 -0
  23. package/package.json +70 -0
  24. package/test-theme/README.md +27 -0
  25. package/test-theme/assets/async-sections.js +446 -0
  26. package/test-theme/assets/cart-drawer.js +463 -0
  27. package/test-theme/assets/cart-manager.js +223 -0
  28. package/test-theme/assets/checkout-price-handler.js +368 -0
  29. package/test-theme/assets/components.css +4629 -0
  30. package/test-theme/assets/delivery-zone.css +299 -0
  31. package/test-theme/assets/delivery-zone.js +396 -0
  32. package/test-theme/assets/logo.png +0 -0
  33. package/test-theme/assets/sections.css +48 -0
  34. package/test-theme/assets/theme.css +3500 -0
  35. package/test-theme/assets/theme.js +3745 -0
  36. package/test-theme/config/settings_data.json +292 -0
  37. package/test-theme/config/settings_schema.json +1050 -0
  38. package/test-theme/layout/theme.liquid +195 -0
  39. package/test-theme/locales/en.default.json +260 -0
  40. package/test-theme/sections/content-fallback.liquid +53 -0
  41. package/test-theme/sections/content.liquid +57 -0
  42. package/test-theme/sections/footer-fallback.liquid +328 -0
  43. package/test-theme/sections/footer.liquid +278 -0
  44. package/test-theme/sections/header-fallback.liquid +1805 -0
  45. package/test-theme/sections/header.liquid +1145 -0
  46. package/test-theme/sections/hero-fallback.liquid +212 -0
  47. package/test-theme/sections/hero.liquid +136 -0
  48. package/test-theme/snippets/account-sidebar.liquid +200 -0
  49. package/test-theme/snippets/add-to-cart-modal.liquid +484 -0
  50. package/test-theme/snippets/breadcrumbs.liquid +134 -0
  51. package/test-theme/snippets/cart-drawer.liquid +467 -0
  52. package/test-theme/snippets/delivery-zone-city-selector.liquid +79 -0
  53. package/test-theme/snippets/delivery-zone-modal.liquid +337 -0
  54. package/test-theme/snippets/delivery-zone-search.liquid +78 -0
  55. package/test-theme/snippets/icon.liquid +105 -0
  56. package/test-theme/snippets/login-modal.liquid +346 -0
  57. package/test-theme/snippets/mega-menu.liquid +812 -0
  58. package/test-theme/snippets/news-thumbnail.liquid +187 -0
  59. package/test-theme/snippets/pagination.liquid +120 -0
  60. package/test-theme/snippets/price.liquid +92 -0
  61. package/test-theme/snippets/product-card-related.liquid +78 -0
  62. package/test-theme/snippets/product-card-simple.liquid +41 -0
  63. package/test-theme/snippets/product-card.liquid +697 -0
  64. package/test-theme/snippets/rating.liquid +85 -0
  65. package/test-theme/snippets/skeleton-collection-grid.liquid +114 -0
  66. package/test-theme/snippets/skeleton-product-card.liquid +124 -0
  67. package/test-theme/snippets/skeleton-product-grid.liquid +34 -0
  68. package/test-theme/snippets/social-sharing.liquid +185 -0
  69. package/test-theme/templates/account/dashboard.liquid +401 -0
  70. package/test-theme/templates/account/loyalty-redemption.liquid +405 -0
  71. package/test-theme/templates/account/loyalty.liquid +588 -0
  72. package/test-theme/templates/account/order-detail.liquid +230 -0
  73. package/test-theme/templates/account/orders.liquid +349 -0
  74. package/test-theme/templates/account/profile.liquid +758 -0
  75. package/test-theme/templates/account/register.liquid +232 -0
  76. package/test-theme/templates/account/return-orders.liquid +348 -0
  77. package/test-theme/templates/account/store-credit.liquid +464 -0
  78. package/test-theme/templates/account/subscriptions.liquid +601 -0
  79. package/test-theme/templates/account/wishlist.liquid +419 -0
  80. package/test-theme/templates/address-book.liquid +1092 -0
  81. package/test-theme/templates/categories.liquid +452 -0
  82. package/test-theme/templates/checkout.liquid +4511 -0
  83. package/test-theme/templates/error.liquid +384 -0
  84. package/test-theme/templates/index.liquid +11 -0
  85. package/test-theme/templates/login.liquid +185 -0
  86. package/test-theme/templates/order-confirmation.liquid +720 -0
  87. package/test-theme/templates/page.liquid +297 -0
  88. package/test-theme/templates/product-detail.liquid +4363 -0
  89. package/test-theme/templates/products.liquid +518 -0
  90. package/test-theme/templates/search.liquid +922 -0
  91. package/test-theme/theme.json.example +19 -0
  92. package/test-theme/widgets/brand-carousel.liquid +676 -0
  93. package/test-theme/widgets/brand.liquid +245 -0
  94. package/test-theme/widgets/carousel.liquid +843 -0
  95. package/test-theme/widgets/category-list-carousel.liquid +656 -0
  96. package/test-theme/widgets/category-list.liquid +340 -0
  97. package/test-theme/widgets/category.liquid +475 -0
  98. package/test-theme/widgets/discount-time.liquid +176 -0
  99. package/test-theme/widgets/footer-menu.liquid +695 -0
  100. package/test-theme/widgets/footer.liquid +179 -0
  101. package/test-theme/widgets/gallery.liquid +271 -0
  102. package/test-theme/widgets/header-menu.liquid +932 -0
  103. package/test-theme/widgets/header.liquid +159 -0
  104. package/test-theme/widgets/html.liquid +214 -0
  105. package/test-theme/widgets/news.liquid +217 -0
  106. package/test-theme/widgets/product-canvas.liquid +235 -0
  107. package/test-theme/widgets/product-carousel.liquid +502 -0
  108. package/test-theme/widgets/product.liquid +45 -0
  109. package/test-theme/widgets/recently-viewed.liquid +26 -0
  110. package/test-theme/widgets/shared/product-grid.liquid +339 -0
  111. package/test-theme/widgets/simple-product.liquid +42 -0
  112. package/test-theme/widgets/single-product.liquid +610 -0
  113. package/test-theme/widgets/spacebar-carousel.liquid +663 -0
  114. package/test-theme/widgets/spacebar.liquid +279 -0
  115. package/test-theme/widgets/splash.liquid +378 -0
  116. package/test-theme/widgets/testimonial-carousel.liquid +709 -0
@@ -0,0 +1,464 @@
1
+ {% layout 'layout/theme' %}
2
+
3
+ <section class="account-page">
4
+ <div class="container">
5
+
6
+ <!-- Header -->
7
+ <div class="account-header">
8
+ <h1 class="account-title display-2">Store Credit</h1>
9
+ <p class="account-subtitle">View your store credit balance and eligible return orders</p>
10
+ </div>
11
+
12
+ <div class="account-layout">
13
+
14
+ <!-- Sidebar -->
15
+ <aside class="account-sidebar">
16
+ {% render 'snippets/account-sidebar' %}
17
+ </aside>
18
+
19
+ <!-- Content -->
20
+ <div class="account-content">
21
+ {% hook 'account_store_credit_before' %}
22
+
23
+ <div class="account-section-header">
24
+ <h2 class="account-section-title">Store Credit</h2>
25
+ </div>
26
+
27
+ <div class="store-credit-program">
28
+
29
+ <!-- Total Balance -->
30
+ <div class="store-credit-balance">
31
+ <div class="balance-display">
32
+ <div class="balance-icon">
33
+ <svg width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
34
+ <rect x="1" y="4" width="22" height="16" rx="2" ry="2"></rect>
35
+ <line x1="1" y1="10" x2="23" y2="10"></line>
36
+ </svg>
37
+ </div>
38
+
39
+ <h3 class="balance-value">
40
+ {{ settings.currency_symbol | default: '₹' }}{{ storeCredit.totalBalance | default: 0 | money_without_currency }}
41
+ </h3>
42
+ <p class="balance-label">Available Store Credit</p>
43
+ </div>
44
+ </div>
45
+
46
+ <!-- Eligible Return Orders -->
47
+ <div class="eligible-orders">
48
+ <h3 class="section-subtitle">Eligible Return Orders</h3>
49
+ <p class="section-description">Orders that can be returned for store credit</p>
50
+
51
+ {% if storeCredit.eligibleReturnOrders and storeCredit.eligibleReturnOrders.size > 0 %}
52
+ <div class="orders-list">
53
+ {% for order in storeCredit.eligibleReturnOrders %}
54
+ <div class="order-card">
55
+ <div class="order-header">
56
+ <div class="order-number">
57
+ <span class="label">Order</span>
58
+ <span class="value">#{{ order.orderNumber }}</span>
59
+ </div>
60
+ <div class="order-date">
61
+ {{ order.orderDate | date: '%d-%m-%Y %H:%M' }}
62
+ </div>
63
+ </div>
64
+
65
+ <div class="order-details">
66
+ <div class="detail-row">
67
+ <span class="detail-label">Order Total</span>
68
+ <span class="detail-value">{{ settings.currency_symbol | default: '₹' }}{{ order.orderTotal | money_without_currency }}</span>
69
+ </div>
70
+ <div class="detail-row">
71
+ <span class="detail-label">Paid Amount</span>
72
+ <span class="detail-value">{{ settings.currency_symbol | default: '₹' }}{{ order.paidAmount | money_without_currency }}</span>
73
+ </div>
74
+ <div class="detail-row highlight">
75
+ <span class="detail-label">Credit Balance</span>
76
+ <span class="detail-value credit">{{ settings.currency_symbol | default: '₹' }}{{ order.creditBalance | money_without_currency }}</span>
77
+ </div>
78
+ </div>
79
+
80
+ <div class="order-actions">
81
+ <a href="/orders/{{ order.orderId }}" class="btn btn-outline">View Order</a>
82
+ <a href="/customer/returns?orderId={{ order.orderId }}" class="btn btn-primary">Request Return</a>
83
+ </div>
84
+ </div>
85
+ {% endfor %}
86
+ </div>
87
+ {% else %}
88
+ <div class="empty-state">
89
+ <div class="empty-icon">
90
+ <svg width="64" height="64" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
91
+ <path d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path>
92
+ </svg>
93
+ </div>
94
+ <p class="empty-title">No Eligible Orders</p>
95
+ <p class="empty-description">You don't have any orders eligible for return at the moment.</p>
96
+ <a href="/collections" class="btn btn-primary">Continue Shopping</a>
97
+ </div>
98
+ {% endif %}
99
+ </div>
100
+
101
+ </div>
102
+
103
+ {% hook 'account_store_credit_after' %}
104
+ </div>
105
+ </div>
106
+ </div>
107
+ </section>
108
+
109
+
110
+ <style>
111
+ :root {
112
+ --color-primary: #2563eb;
113
+ --color-primary-hover: #1d4ed8;
114
+ --color-primary-light: #dbeafe;
115
+ --color-success: #10b981;
116
+ --color-success-light: #d1fae5;
117
+ --color-success-dark: #065f46;
118
+ --color-text: #1f2937;
119
+ --color-text-light: #6b7280;
120
+ --color-background: #f9fafb;
121
+ --color-card-bg: #ffffff;
122
+ --color-border: #e5e7eb;
123
+ --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
124
+ --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
125
+ --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
126
+ --radius-sm: 0.375rem;
127
+ --radius-md: 0.5rem;
128
+ --radius-lg: 0.75rem;
129
+ --spacing-xs: 0.5rem;
130
+ --spacing-sm: 1rem;
131
+ --spacing-md: 1.5rem;
132
+ --spacing-lg: 2rem;
133
+ --spacing-xl: 3rem;
134
+ }
135
+
136
+ .account-page {
137
+ padding: var(--spacing-xl) var(--spacing-sm);
138
+ background: var(--color-background);
139
+ min-height: 100vh;
140
+ }
141
+
142
+ .container {
143
+ max-width: 1200px;
144
+ margin: 0 auto;
145
+ padding: 0 var(--spacing-sm);
146
+ }
147
+
148
+ .account-header {
149
+ text-align: center;
150
+ margin-bottom: var(--spacing-xl);
151
+
152
+ }
153
+
154
+ .account-title {
155
+ font-size: 2.5rem;
156
+ font-weight: 700;
157
+ color: var(--color-text);
158
+ margin: 0 0 0.5rem 0;
159
+ letter-spacing: -0.025em;
160
+ }
161
+
162
+ .account-subtitle {
163
+ font-size: 1.3rem;
164
+ color: var(--color-text-light);
165
+ margin: 0;
166
+ }
167
+
168
+ .account-layout {
169
+ display: grid;
170
+ grid-template-columns: 280px 1fr;
171
+ gap: var(--spacing-lg);
172
+ align-items: start;
173
+ }
174
+
175
+ .account-sidebar {
176
+ position: sticky;
177
+ top: var(--spacing-lg);
178
+ background: var(--color-card-bg);
179
+ border-radius: var(--radius-lg);
180
+ padding: var(--spacing-md);
181
+ box-shadow: var(--shadow-md);
182
+ border: 1px solid var(--color-border);
183
+ }
184
+
185
+ .account-content {
186
+ background: var(--color-card-bg);
187
+ border-radius: var(--radius-lg);
188
+ padding: var(--spacing-lg);
189
+ box-shadow: var(--shadow-md);
190
+ border: 1px solid var(--color-border);
191
+ }
192
+
193
+ .account-section-header {
194
+ margin-bottom: var(--spacing-lg);
195
+ padding-bottom: var(--spacing-md);
196
+ border-bottom: 1px solid var(--color-border);
197
+ }
198
+
199
+ .account-section-title {
200
+ font-size: 1.75rem;
201
+ font-weight: 600;
202
+ color: var(--color-text);
203
+ margin: 0;
204
+ }
205
+
206
+ .store-credit-program {
207
+ display: grid;
208
+ gap: var(--spacing-xl);
209
+ }
210
+
211
+ .store-credit-balance {
212
+ background: linear-gradient(135deg, var(--color-success) 0%, #059669 100%);
213
+ border-radius: var(--radius-lg);
214
+ padding: var(--spacing-xl);
215
+ text-align: center;
216
+ color: white;
217
+ box-shadow: var(--shadow-lg);
218
+ position: relative;
219
+ overflow: hidden;
220
+ }
221
+
222
+ .store-credit-balance::before {
223
+ content: '';
224
+ position: absolute;
225
+ top: -50%;
226
+ right: -10%;
227
+ width: 300px;
228
+ height: 300px;
229
+ background: rgba(255, 255, 255, 0.1);
230
+ border-radius: 50%;
231
+ }
232
+
233
+ .balance-display {
234
+ position: relative;
235
+ z-index: 1;
236
+ max-width: 400px;
237
+ margin: 0 auto;
238
+ }
239
+
240
+ .balance-icon {
241
+ margin: 0 auto var(--spacing-md);
242
+ width: 80px;
243
+ height: 80px;
244
+ display: flex;
245
+ align-items: center;
246
+ justify-content: center;
247
+ background: rgba(255, 255, 255, 0.2);
248
+ border-radius: 50%;
249
+ }
250
+
251
+ .balance-value {
252
+ font-size: 3.5rem;
253
+ font-weight: 700;
254
+ margin: 0 0 var(--spacing-xs) 0;
255
+ line-height: 1;
256
+ text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
257
+ }
258
+
259
+ .balance-label {
260
+ font-size: 1.25rem;
261
+ margin: 0;
262
+ opacity: 0.95;
263
+ text-transform: uppercase;
264
+ letter-spacing: 0.1em;
265
+ }
266
+
267
+ .eligible-orders {
268
+ background: var(--color-background);
269
+ padding: var(--spacing-lg);
270
+ border-radius: var(--radius-lg);
271
+ border: 1px solid var(--color-border);
272
+ }
273
+
274
+ .section-subtitle {
275
+ font-size: 1.25rem;
276
+ font-weight: 600;
277
+ color: var(--color-text);
278
+ margin: 0 0 var(--spacing-xs) 0;
279
+ }
280
+
281
+ .section-description {
282
+ font-size: 1.2rem;
283
+ color: var(--color-text-light);
284
+ margin: 0 0 var(--spacing-lg) 0;
285
+ }
286
+
287
+ .orders-list {
288
+ display: grid;
289
+ gap: var(--spacing-md);
290
+ }
291
+
292
+ .order-card {
293
+ background: var(--color-card-bg);
294
+ border-radius: var(--radius-md);
295
+ border: 1px solid var(--color-border);
296
+ padding: var(--spacing-md);
297
+ transition: all 0.3s ease;
298
+ }
299
+
300
+ .order-card:hover {
301
+ border-color: var(--color-primary);
302
+ box-shadow: var(--shadow-md);
303
+ }
304
+
305
+ .order-header {
306
+ display: flex;
307
+ justify-content: space-between;
308
+ align-items: center;
309
+ margin-bottom: var(--spacing-md);
310
+ padding-bottom: var(--spacing-sm);
311
+ border-bottom: 1px solid var(--color-border);
312
+ }
313
+
314
+ .order-number .label {
315
+ font-size: 1.3rem;
316
+ color: var(--color-text-light);
317
+ }
318
+
319
+ .order-number .value {
320
+ font-size: 1.3rem;
321
+ font-weight: 600;
322
+ color: var(--color-primary);
323
+ margin-left: var(--spacing-xs);
324
+ }
325
+
326
+ .order-date {
327
+ font-size: 1.3rem;
328
+ color: var(--color-text-light);
329
+ }
330
+
331
+ .order-details {
332
+ display: grid;
333
+ gap: var(--spacing-xs);
334
+ margin-bottom: var(--spacing-md);
335
+ }
336
+
337
+ .detail-row {
338
+ display: flex;
339
+ justify-content: space-between;
340
+ align-items: center;
341
+ padding: var(--spacing-xs) 0;
342
+ }
343
+
344
+ .detail-row.highlight {
345
+ background: var(--color-success-light);
346
+ padding: var(--spacing-sm);
347
+ border-radius: var(--radius-sm);
348
+ margin-top: var(--spacing-xs);
349
+ }
350
+
351
+ .detail-label {
352
+ font-size: 1.3rem;
353
+ color: var(--color-text-light);
354
+ }
355
+
356
+ .detail-value {
357
+ font-size: 1.3rem;
358
+ font-weight: 500;
359
+ color: var(--color-text);
360
+ }
361
+
362
+ .detail-value.credit {
363
+ font-size: 1.3rem;
364
+ font-weight: 700;
365
+ color: var(--color-success-dark);
366
+ }
367
+
368
+ .order-actions {
369
+ display: flex;
370
+ gap: var(--spacing-sm);
371
+ justify-content: flex-end;
372
+ }
373
+
374
+ .btn {
375
+ display: inline-flex;
376
+ align-items: center;
377
+ justify-content: center;
378
+ padding: 0.625rem 1.25rem;
379
+ font-size: 1.3rem;
380
+ font-weight: 500;
381
+ text-decoration: none;
382
+ border-radius: var(--radius-md);
383
+ border: none;
384
+ cursor: pointer;
385
+ transition: all 0.3s ease;
386
+ }
387
+
388
+ .btn-primary {
389
+ background: var(--color-primary);
390
+ color: white;
391
+ border: 2px solid var(--color-primary);
392
+ }
393
+
394
+ .btn-primary:hover {
395
+ background: var(--color-primary-hover);
396
+ transform: translateY(-1px);
397
+ box-shadow: var(--shadow-md);
398
+ }
399
+
400
+ .btn-outline {
401
+ background: transparent;
402
+ color: var(--color-text);
403
+ border: 2px solid var(--color-border);
404
+ }
405
+
406
+ .btn-outline:hover {
407
+ border-color: var(--color-primary);
408
+ color: var(--color-primary);
409
+ }
410
+
411
+ .empty-state {
412
+ text-align: center;
413
+ padding: var(--spacing-xl);
414
+ color: var(--color-text-light);
415
+ background: var(--color-card-bg);
416
+ border-radius: var(--radius-md);
417
+ border: 2px dashed var(--color-border);
418
+ }
419
+
420
+ .empty-icon {
421
+ margin-bottom: var(--spacing-md);
422
+ opacity: 0.5;
423
+ }
424
+
425
+ .empty-title {
426
+ font-size: 1.25rem;
427
+ font-weight: 600;
428
+ color: var(--color-text);
429
+ margin: 0 0 var(--spacing-xs) 0;
430
+ }
431
+
432
+ .empty-description {
433
+ margin: 0 0 var(--spacing-md) 0;
434
+ }
435
+
436
+ @media (max-width: 768px) {
437
+ .account-layout {
438
+ grid-template-columns: 1fr;
439
+ }
440
+
441
+
442
+ .account-content {
443
+ order: 1;
444
+ }
445
+
446
+ .balance-value {
447
+ font-size: 2.5rem;
448
+ }
449
+
450
+ .order-header {
451
+ flex-direction: column;
452
+ align-items: flex-start;
453
+ gap: var(--spacing-xs);
454
+ }
455
+
456
+ .order-actions {
457
+ flex-direction: column;
458
+ }
459
+
460
+ .btn {
461
+ width: 100%;
462
+ }
463
+ }
464
+ </style>