PluginProbe
Tiered Pricing Table for WooCommerce / 6.5.0
Tiered Pricing Table for WooCommerce v6.5.0
8.0.2 7.1.7 7.1.5 7.1.4 7.1.1 6.5.0 6.4.0 6.1.0 trunk 1.0 1.1 2.0 2.0.1 2.0.2 2.1 2.1.1 2.1.2 2.2.0 2.2.1 2.2.2 2.2.3 2.3.0 2.3.1 2.3.2 2.3.3 All 91 releases
tier-pricing-table / views / admin / welcome-page / welcome-page.php

welcome-page.php in Tiered Pricing Table for WooCommerce 6.5.0, at views/admin/welcome-page/welcome-page.php

1,373 lines 35.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php use TierPricingTable\Core\ServiceContainer;
2
3 defined( 'ABSPATH' ) || die();
4
5 $fileManager = ServiceContainer::getInstance()->getFileManager();
6 ?>
7 <style>
8 /**
9 * General styles
10 */
11 .notice, .error {
12 display: none;
13 }
14
15 .tpt-checkmark {
16 display: flex;
17 align-items: center;
18 font-weight: 600;
19 background: #f1f5f9;
20 border: 1px solid #e2e8f0;
21 padding: 6px 10px;
22 border-radius: 6px;
23 color: #0f172a;
24 transition: all 0.2s ease;
25 margin: 0;
26 font-size: 0.95em;
27 }
28
29 .tpt-checkmark:hover {
30 background: #fff;
31 border-color: #cbd5e1;
32 box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
33 transform: translateX(4px);
34 }
35
36 .tpt-checkmark::before {
37 content: '';
38 background-image: url(<?php echo esc_attr( $fileManager->locateAsset( 'admin/welcome-page/checkmark.svg' ) ); ?>);
39 background-size: 1.2em;
40 background-repeat: no-repeat;
41 background-position: center;
42 width: 1.2em;
43 height: 1.2em;
44 display: inline-block;
45 flex-shrink: 0;
46 margin-right: 8px;
47 }
48
49 /**
50 * Button styles
51 */
52 .tpt-welcome-page-button {
53 display: inline-block;
54 padding: 14px 28px;
55 font-size: 15px;
56 font-weight: 600;
57 text-decoration: none;
58 border-radius: 8px;
59 transition: all 0.2s ease;
60 box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
61 }
62
63 .tpt-welcome-page-button-primary {
64 background: #96598a;
65 color: #fff;
66 }
67
68 .tpt-welcome-page-button-primary--border {
69 border: 2px solid rgba(255, 255, 255, 0.3);
70 box-shadow: none;
71 }
72
73 .tpt-welcome-page-button-primary:hover {
74 color: #fff;
75 background: #7b3f6f;
76 transform: translateY(-2px);
77 box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
78 }
79
80 .tpt-welcome-page-button-primary--border:hover {
81 border-color: #fff;
82 }
83
84 .tpt-welcome-page-button-secondary {
85 background: #79ab3f;
86 color: #fff;
87 }
88
89 .tpt-welcome-page-button-secondary:hover {
90 color: #fff;
91 background: #5f8a2f;
92 transform: translateY(-2px);
93 box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
94 }
95
96 .tpt-welcome-page {
97 margin-left: -20px;
98 font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
99 }
100
101 .tpt-welcome-page-hero {
102 background: linear-gradient(135deg, #7b3f6f 0%, #96598a 100%);
103 display: flex;
104 justify-content: space-between;
105 align-items: center;
106 color: #fff;
107 padding: 40px 50px;
108 box-shadow: 0 4px 12px rgba(150, 89, 138, 0.2);
109 }
110
111 .tpt-welcome-page-hero__content {
112 width: 40%;
113 }
114
115 .tpt-browser-mockup {
116 background: #fff;
117 border-radius: 12px;
118 box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
119 width: 100%;
120 max-width: 750px;
121 min-width: 600px;
122 transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
123 transition: transform 0.5s ease;
124 margin-left: auto;
125 overflow: hidden;
126 }
127
128 .tpt-browser-mockup:hover {
129 transform: perspective(1000px) rotateY(0deg) rotateX(0deg) scale(1.02);
130 }
131
132 .tpt-browser-mockup-header {
133 background: #f1f5f9;
134 padding: 12px 16px;
135 display: flex;
136 align-items: center;
137 border-bottom: 1px solid #e2e8f0;
138 }
139
140 .tpt-browser-mockup-header .dot {
141 display: inline-block;
142 width: 12px;
143 height: 12px;
144 border-radius: 50%;
145 margin-right: 8px;
146 }
147
148 .tpt-browser-mockup-header .dot-red {
149 background: #ef4444;
150 }
151
152 .tpt-browser-mockup-header .dot-yellow {
153 background: #eab308;
154 }
155
156 .tpt-browser-mockup-header .dot-green {
157 background: #22c55e;
158 }
159
160 .tpt-browser-mockup-address {
161 background: #fff;
162 border: 1px solid #cbd5e1;
163 border-radius: 4px;
164 padding: 4px 12px;
165 font-size: 0.8rem;
166 color: #94a3b8;
167 margin-left: 20px;
168 flex: 1;
169 text-align: center;
170 }
171
172 .tpt-interactive-preview {
173 display: flex;
174 flex-direction: column;
175 background: #fff;
176 color: #333;
177 padding: 30px;
178 gap: 24px;
179 box-sizing: border-box;
180 }
181
182 .tpt-interactive-preview * {
183 box-sizing: border-box;
184 }
185
186 .tpt-ip-top {
187 display: flex;
188 gap: 24px;
189 align-items: flex-start;
190 }
191
192 .tpt-ip-left {
193 flex: 0 0 120px;
194 background: #eef2f6;
195 border-radius: 8px;
196 display: flex;
197 align-items: center;
198 justify-content: center;
199 padding: 20px;
200 min-width: 0;
201 aspect-ratio: 1 / 1;
202 }
203
204 .tpt-ip-left img {
205 width: 100%;
206 max-height: 250px;
207 object-fit: contain;
208 }
209
210 .tpt-ip-top-info {
211 flex: 1;
212 display: flex;
213 flex-direction: column;
214 text-align: left;
215 min-width: 0;
216 }
217
218 .tpt-ip-title {
219 font-size: 2rem;
220 font-weight: 300;
221 margin: 0 0 10px 0;
222 color: #1e293b;
223 line-height: 1;
224 }
225
226 .tpt-ip-main-price {
227 font-size: 1.5rem;
228 margin-bottom: 15px;
229 color: #475569;
230 }
231
232 .tpt-ip-main-price del {
233 color: #9ca3af;
234 margin-right: 8px;
235 }
236
237 .tpt-ip-you-save {
238 display: block;
239 font-size: 0.9rem;
240 color: #64748b;
241 font-weight: 500;
242 margin-top: 4px;
243 }
244
245 .tpt-ip-desc {
246 color: #64748b;
247 margin-top: 0;
248 margin-bottom: 20px;
249 font-size: 0.95em;
250 }
251
252 .tpt-ip-table-container {
253 margin-bottom: 20px;
254 background: #fff;
255 border: 1px solid #cbd5e1;
256 border-radius: 6px;
257 overflow: hidden;
258 }
259
260 .tpt-ip-table {
261 width: 100%;
262 border-collapse: collapse;
263 font-size: 14px;
264 }
265
266 .tpt-ip-table th {
267 background: #f8fafc;
268 padding: 10px 15px;
269 text-align: left;
270 font-weight: 600;
271 color: #475569;
272 border-bottom: 1px solid #e2e8f0;
273 }
274
275 .tpt-ip-block {
276 cursor: pointer;
277 transition: background 0.2s ease;
278 border-bottom: 1px solid #f1f5f9;
279 color: #334155;
280 }
281
282 .tpt-ip-block:last-child {
283 border-bottom: none;
284 }
285
286 .tpt-ip-block:hover {
287 background: #f8fafc;
288 }
289
290 .tpt-ip-block.is-selected {
291 background: #faf5f8;
292 }
293
294 .tpt-ip-block.is-selected td {
295 position: relative;
296 }
297
298 .tpt-ip-block.is-selected td:first-child::before {
299 content: '';
300 position: absolute;
301 left: 0;
302 top: 0;
303 bottom: 0;
304 width: 3px;
305 background: #96598a;
306 }
307
308 .tpt-hero-preview-qty {
309 padding: 12px 15px;
310 font-size: 0.95em;
311 }
312
313 .tpt-hero-preview-price {
314 padding: 12px 15px;
315 font-size: 1.05em;
316 }
317
318 .tpt-hero-preview-discount {
319 padding: 12px 15px;
320 font-size: 1.05em;
321 }
322
323 .tpt-hero-preview-badge {
324 font-size: 0.75em;
325 padding: 3px 6px;
326 border-radius: 4px;
327 margin-left: 8px;
328 font-weight: 600;
329 text-transform: uppercase;
330 display: inline-flex;
331 align-items: center;
332 vertical-align: middle;
333 gap: 4px;
334 }
335
336 .tpt-hero-preview-badge .dashicons {
337 font-size: 14px;
338 width: 14px;
339 height: 14px;
340 line-height: 14px;
341 }
342
343 .tpt-hero-preview-badge--popular {
344 background: #96598a;
345 color: #fff;
346 }
347
348 .tpt-hero-preview-badge--value {
349 background: #eab308;
350 color: #fff;
351 }
352
353 .tpt-ip-add-to-cart {
354 display: flex;
355 gap: 12px;
356 margin-bottom: 25px;
357 }
358
359 .tpt-ip-qty-input {
360 width: 70px;
361 padding: 8px;
362 border: 1px solid #cbd5e1;
363 border-radius: 4px;
364 font-size: 1.05rem;
365 text-align: center;
366 background: #f1f5f9;
367 color: #334155;
368 }
369
370 .tpt-ip-btn {
371 background: #334155;
372 color: #fff;
373 border: none;
374 padding: 8px 20px;
375 border-radius: 4px;
376 font-size: 1rem;
377 font-weight: 600;
378 cursor: pointer;
379 transition: background 0.2s ease;
380 }
381
382 .tpt-ip-btn:hover {
383 background: #1e293b;
384 }
385
386 .tpt-ip-summary {
387 border-top: 1px solid #e2e8f0;
388 padding-top: 15px;
389 }
390
391 .tpt-ip-summary-row {
392 display: flex;
393 justify-content: space-between;
394 margin-bottom: 8px;
395 font-size: 1.05rem;
396 color: #475569;
397 font-weight: 600;
398 }
399
400 .tpt-ip-summary-row--total {
401 font-size: 1.3rem;
402 color: #64748b;
403 margin-bottom: 0;
404 }
405
406 .tpt-ip-summary-row--total strong {
407 color: #334155;
408 }
409
410 .tpt-welcome-page-hero__title {
411 font-size: 3.5rem;
412 line-height: 1.1;
413 margin-bottom: 20px;
414 font-weight: 700;
415 }
416
417 .tpt-welcome-page-hero__description {
418 font-size: 1.1rem;
419 line-height: 1.6;
420 margin-bottom: 30px;
421 opacity: 0.9;
422 }
423
424 .tpt-welcome-page-hero__actions {
425 display: flex;
426 gap: 15px;
427 }
428
429 .tpt-welcome-page-features {
430 column-count: 2;
431 column-gap: 40px;
432 padding: 0 50px;
433 margin: 50px 0;
434 }
435
436 .tpt-welcome-page-feature {
437 margin-bottom: 40px;
438 break-inside: avoid;
439 }
440
441 .tpt-welcome-page-feature__image-description {
442 text-align: center;
443 margin-bottom: 20px;
444 font-style: italic;
445 color: #64748b;
446 font-size: 0.9em;
447 }
448
449 .tpt-welcome-page-features--templates {
450 column-count: 2;
451 column-gap: 30px;
452 }
453
454 .tpt-welcome-page-feature__inner {
455 background: #fff;
456 padding: 30px;
457 border-radius: 12px;
458 border: 1px solid #f1f5f9;
459 box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
460 transition: transform 0.2s ease, box-shadow 0.2s ease;
461 }
462
463 .tpt-welcome-page-feature__inner:hover {
464 transform: translateY(-4px);
465 box-shadow: 0 12px 20px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -5px rgba(0, 0, 0, 0.04);
466 }
467
468 .tpt-welcome-page-feature--template .tpt-welcome-page-feature__inner {
469 padding: 15px;
470 }
471
472 .tpt-welcome-page-feature__title {
473 font-size: 1.4rem;
474 font-weight: 700;
475 margin-bottom: 18px;
476 line-height: 1.4;
477 color: #0f172a;
478 }
479
480 .tpt-welcome-page-feature__description {
481 font-size: 1.05em;
482 color: #1e293b;
483 line-height: 1.5;
484 display: flex;
485 flex-direction: column;
486 gap: 6px;
487 }
488
489 .tpt-welcome-page-feature img {
490 width: 100%;
491 border-radius: 6px;
492 }
493
494 .tpt-welcome-page-section-title {
495 font-size: 2.5em;
496 font-weight: 700;
497 line-height: 1.2;
498 padding: 0 50px;
499 margin-top: 60px;
500 color: #0f172a;
501 display: flex;
502 align-items: center;
503 }
504
505 .tpt-welcome-page-section-title span {
506 margin-right: 15px;
507 background: linear-gradient(135deg, #7b3f6f 0%, #96598a 100%);
508 font-size: 1.5rem;
509 color: #fff;
510 display: inline-block;
511 padding: 6px 16px;
512 border-radius: 8px;
513 box-shadow: 0 4px 6px rgba(150, 89, 138, 0.3);
514 }
515
516 .tpt-welcome-page-install-notice {
517 background: #dcfce7;
518 color: #166534;
519 padding: 12px 24px;
520 border-radius: 8px;
521 border: 1px solid #bbf7d0;
522 display: flex;
523 align-items: center;
524 font-weight: 500;
525 font-size: 1.05em;
526 }
527
528 .tpt-welcome-page-install-notice .dashicons {
529 margin-right: 8px;
530 color: #15803d;
531 }
532
533 .tpt-welcome-page-side-features {
534 padding: 0 50px;
535 margin: 40px 0;
536 display: flex;
537 gap: 24px;
538 flex-wrap: wrap;
539 }
540
541 .tpt-welcome-page-side-feature {
542 padding: 20px 25px;
543 background: #fff;
544 font-weight: 500;
545 font-size: 1.25em;
546 color: #334155;
547 border: 1px solid #f1f5f9;
548 border-radius: 12px;
549 box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
550 transition: transform 0.2s ease, box-shadow 0.2s ease;
551 display: flex;
552 align-items: center;
553 gap: 12px;
554 }
555
556 .tpt-welcome-page-side-feature:hover {
557 transform: translateY(-4px);
558 box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
559 border-color: #e2e8f0;
560 }
561
562 </style>
563 <main class="tpt-welcome-page">
564
565 <div class="tpt-welcome-page-install-notice">
566 <span class="dashicons dashicons-plugins-checked"></span> <?php esc_html_e( 'Thanks for installing the plugin! Below you will find a quick overview of the main features.', 'tier-pricing-table' ); ?>
567 </div>
568
569 <header class="tpt-welcome-page-hero">
570
571 <div class="tpt-welcome-page-hero__content">
572 <div class="tpt-welcome-page-hero__title">
573 <div><?php esc_html_e( 'Welcome to', 'tier-pricing-table' ); ?></div>
574 <div><b><?php esc_html_e( 'Tiered Pricing Table', 'tier-pricing-table' ); ?></b></div>
575 </div>
576
577 <div class="tpt-welcome-page-hero__description">
578 <p>
579 <?php
580 esc_html_e( 'Tiered Pricing Table is a powerful tool that allows you to create quantity-based pricing for your WooCommerce products.',
581 'tier-pricing-table' );
582 ?>
583 </p>
584 <p>
585 <?php
586 esc_html_e( 'With intuitive templates, flexible pricing rules, and advanced features, this plugin is a perfect fit for any type of store.',
587 'tier-pricing-table' );
588 ?>
589 </p>
590 </div>
591 <div class="tpt-welcome-page-hero__actions">
592 <a href="<?php echo esc_attr( ServiceContainer::getInstance()->getSettings()->getLink() ); ?>"
593 class="tpt-welcome-page-button tpt-welcome-page-button-secondary">
594 <?php esc_html_e( 'Settings', 'tier-pricing-table' ); ?>
595 </a>
596
597 <a href="<?php echo esc_attr( \TierPricingTable\TierPricingTablePlugin::getDocumentationURL() ); ?>"
598 target="_blank"
599 class="tpt-welcome-page-button tpt-welcome-page-button-primary tpt-welcome-page-button-primary--border">
600 <?php esc_html_e( 'Documentation', 'tier-pricing-table' ); ?>
601 </a>
602 </div>
603
604 <div class="tpt-welcome-page-hero__additional" style="font-size: 1.2em; margin-top: 20px;">
605 <?php esc_html_e( 'Questions? We\'re here to help.', 'tier-pricing-table' ); ?>
606 <a style="color: #fff"
607 href="<?php echo esc_attr( \TierPricingTable\TierPricingTablePlugin::getContactUsURL() ); ?>"
608 target="_blank"><?php esc_html_e( 'Contact Us', 'tier-pricing-table' ); ?></a>
609 </div>
610 </div>
611
612 <div class="tpt-welcome-page-hero__image">
613 <div class="tpt-browser-mockup">
614 <div class="tpt-browser-mockup-header">
615 <span class="dot dot-red"></span>
616 <span class="dot dot-yellow"></span>
617 <span class="dot dot-green"></span>
618 <div class="tpt-browser-mockup-address">yoursite.com/product/t-shirt</div>
619 </div>
620 <div class="tpt-interactive-preview" id="tpt-interactive-preview">
621 <div class="tpt-ip-top">
622 <div class="tpt-ip-left">
623 <svg viewBox="0 0 24 24" fill="none" stroke="#94a3b8" stroke-width="1.5"
624 stroke-linecap="round"
625 stroke-linejoin="round" style="width: 80%; height: auto; max-height: 200px;">
626 <path d="M20.38 3.46L16 2a4 4 0 01-8 0L3.62 3.46a2 2 0 00-1.34 2.23l.58 3.47a1 1 0 00.99.84H6v10c0 1.1.9 2 2 2h8a2 2 0 002-2V10h2.15a1 1 0 00.99-.84l.58-3.47a2 2 0 00-1.34-2.23z"/>
627 </svg>
628 </div>
629 <div class="tpt-ip-top-info">
630 <h2 class="tpt-ip-title">T-Shirt</h2>
631 <div class="tpt-ip-main-price" id="tpt-ip-main-price">
632 <del>$100.00</del>
633 <span>$75.00</span></div>
634 <p class="tpt-ip-desc"><?php esc_html_e( 'This is a product example.', 'tier-pricing-table' ); ?></p>
635 </div>
636 </div>
637
638 <div class="tpt-ip-bottom">
639 <div class="tpt-ip-table-container">
640 <table class="tpt-ip-table">
641 <thead>
642 <tr>
643 <th><?php esc_html_e( 'Quantity', 'tier-pricing-table' ); ?></th>
644 <th><?php esc_html_e( 'Discount', 'tier-pricing-table' ); ?></th>
645 <th><?php esc_html_e( 'Price', 'tier-pricing-table' ); ?></th>
646 </tr>
647 </thead>
648 <tbody>
649 <tr class="tpt-ip-block" data-qty="1" data-price="100.00">
650 <td class="tpt-hero-preview-qty">1 - 9 pieces</td>
651 <td class="tpt-hero-preview-discount">-</td>
652 <td class="tpt-hero-preview-price"><strong>$100.00</strong></td>
653 </tr>
654 <tr class="tpt-ip-block" data-qty="10" data-price="90.00">
655 <td class="tpt-hero-preview-qty">10 - 19 pieces</td>
656 <td class="tpt-hero-preview-discount">10%</td>
657 <td class="tpt-hero-preview-price"><strong>$90.00</strong></td>
658 </tr>
659 <tr class="tpt-ip-block" data-qty="20" data-price="85.00">
660 <td class="tpt-hero-preview-qty">20 - 49 pieces <span
661 class="tpt-hero-preview-badge tpt-hero-preview-badge--popular"><span
662 class="dashicons dashicons-star-filled"></span>Most popular</span>
663 </td>
664 <td class="tpt-hero-preview-discount">15%</td>
665 <td class="tpt-hero-preview-price"><strong>$85.00</strong></td>
666 </tr>
667 <tr class="tpt-ip-block is-selected" data-qty="50" data-price="80.00">
668 <td class="tpt-hero-preview-qty">50+ pieces</td>
669 <td class="tpt-hero-preview-discount">20%</td>
670 <td class="tpt-hero-preview-price"><strong>$80.00</strong></td>
671 </tr>
672 </tbody>
673 </table>
674 </div>
675
676 <div class="tpt-ip-add-to-cart">
677 <input type="number" id="tpt-ip-qty" class="tpt-ip-qty-input" value="50" min="1">
678 <button class="tpt-ip-btn"><?php esc_html_e( 'Add to cart', 'tier-pricing-table' ); ?></button>
679 </div>
680
681 <div class="tpt-ip-summary">
682 <div class="tpt-ip-summary-row">
683 <span id="tpt-ip-summary-qty">50x</span>
684 <span id="tpt-ip-summary-each">$80.00</span>
685 </div>
686 <div class="tpt-ip-summary-row tpt-ip-summary-row--total">
687 <span>T-Shirt</span>
688 <strong id="tpt-ip-summary-total">$4,000.00</strong>
689 </div>
690 </div>
691 </div>
692 </div>
693 </div>
694 </div>
695
696 <script>
697 document.addEventListener('DOMContentLoaded', function () {
698 const blocks = document.querySelectorAll('.tpt-ip-block');
699 const qtyInput = document.getElementById('tpt-ip-qty');
700 const mainPrice = document.getElementById('tpt-ip-main-price');
701 const summaryQty = document.getElementById('tpt-ip-summary-qty');
702 const summaryEach = document.getElementById('tpt-ip-summary-each');
703 const summaryTotal = document.getElementById('tpt-ip-summary-total');
704
705 function getPriceForQty(qty) {
706 if (qty >= 50) return 80.00;
707 if (qty >= 20) return 85.00;
708 if (qty >= 10) return 90.00;
709 return 100.00;
710 }
711
712 function updateUI(qty) {
713 qty = parseInt(qty) || 1;
714 if (qty < 1) qty = 1;
715 if (qtyInput.value != qty) qtyInput.value = qty;
716
717 const price = getPriceForQty(qty);
718
719 blocks.forEach(b => b.classList.remove('is-selected'));
720
721 let selectedIndex = 0;
722 if (qty >= 50) selectedIndex = 3;
723 else if (qty >= 20) selectedIndex = 2;
724 else if (qty >= 10) selectedIndex = 1;
725
726 if (blocks[selectedIndex]) blocks[selectedIndex].classList.add('is-selected');
727
728 if (price < 100) {
729 const originalPrice = 100.00;
730 const savedTotal = (originalPrice - price) * qty;
731 const savedPercent = Math.round((originalPrice - price) / originalPrice * 100);
732 mainPrice.innerHTML = `<del>$100.00</del> <span>$${price.toFixed(2)}</span> <span class="tpt-ip-you-save"><?php esc_html_e( 'You save', 'tier-pricing-table' ); ?> $${savedTotal.toLocaleString('en-US', {
733 minimumFractionDigits: 2,
734 maximumFractionDigits: 2
735 })} (${savedPercent}%)</span>`;
736 } else {
737 mainPrice.innerHTML = `<span>$100.00</span>`;
738 }
739
740 summaryQty.innerText = `${qty}x`;
741 summaryEach.innerText = `$${price.toFixed(2)}`;
742 summaryTotal.innerText = `$${(price * qty).toLocaleString('en-US', {
743 minimumFractionDigits: 2,
744 maximumFractionDigits: 2
745 })}`;
746 }
747
748 blocks.forEach(block => {
749 block.addEventListener('click', function () {
750 const qty = parseInt(this.getAttribute('data-qty'));
751 updateUI(qty);
752 });
753 });
754
755 if (qtyInput) {
756 qtyInput.addEventListener('input', function () {
757 updateUI(this.value);
758 });
759 }
760
761 updateUI(100);
762 });
763 </script>
764 </header>
765
766 <div class="tpt-welcome-page-section-title">
767 <span>#1</span>
768 <?php esc_html_e( 'Easy Setup', 'tier-pricing-table' ); ?>
769 </div>
770
771 <section class="tpt-welcome-page-features">
772
773 <div class="tpt-welcome-page-feature">
774
775 <div class="tpt-welcome-page-feature__title">
776 <?php esc_html_e( 'Add tiered pricing to products', 'tier-pricing-table' ); ?>:
777 </div>
778
779 <div class="tpt-welcome-page-feature__inner">
780 <div class="tpt-welcome-page-feature__image">
781 <img src="<?php echo esc_attr( $fileManager->locateAsset( 'admin/welcome-page/product-level-rules.png' ) ); ?>">
782 <div class="tpt-welcome-page-feature__image-description">Product edit page</div>
783 </div>
784 <div class="tpt-welcome-page-feature__description">
785 <span class="tpt-checkmark"> <?php esc_html_e( 'Add unlimited quantity-based prices.', 'tier-pricing-table' ); ?></span>
786 <span class="tpt-checkmark"> <?php esc_html_e( 'Fixed prices or percentage discounts.', 'tier-pricing-table' ); ?></span>
787 <span class="tpt-checkmark"> <?php esc_html_e( 'Works great with variable products.', 'tier-pricing-table' ); ?></span>
788 </div>
789 </div>
790
791 </div>
792
793 <div class="tpt-welcome-page-feature">
794
795 <div class="tpt-welcome-page-feature__title">
796 <?php esc_html_e( 'Prices automatically displayed on the product page:', 'tier-pricing-table' ); ?>
797 </div>
798
799 <div class="tpt-welcome-page-feature__inner">
800 <div class="tpt-welcome-page-feature__image">
801 <img src="<?php echo esc_attr( $fileManager->locateAsset( 'admin/welcome-page/product-page.png' ) ); ?>">
802 <div class="tpt-welcome-page-feature__image-description">Product page</div>
803 </div>
804
805 </div>
806 </div>
807
808 </section>
809
810 <div class="tpt-welcome-page-section-title">
811 <span>#2</span>
812 <?php esc_html_e( 'Various Pricing Templates', 'tier-pricing-table' ); ?>
813 </div>
814
815 <?php
816 $templates = array(
817 array(
818 'title' => __( 'Pricing Table', 'tier-pricing-table' ),
819 'image' => 'table.png',
820 'features' => array(
821 __( 'Ability to add custom columns.', 'tier-pricing-table' ),
822 ),
823 ),
824
825 array(
826 'title' => __( 'Pricing Blocks #3', 'tier-pricing-table' ),
827 'image' => 'blocks-1.png',
828 'features' => array(),
829 ),
830 array(
831 'title' => __( 'Pricing Blocks', 'tier-pricing-table' ),
832 'image' => 'blocks-2.png',
833 'features' => array(),
834 ),
835 array(
836 'title' => __( 'Pricing Blocks #2', 'tier-pricing-table' ),
837 'image' => 'blocks-3.png',
838 'features' => array(),
839 ),
840 array(
841 'title' => __( 'Pricing Options', 'tier-pricing-table' ),
842 'image' => 'options.png',
843 'features' => array(),
844 ),
845 array(
846 'title' => __( 'Pricing Options #2', 'tier-pricing-table' ),
847 'image' => 'options-2.png',
848 'features' => array(),
849 ),
850
851 array(
852 'title' => __( 'Horizontal table', 'tier-pricing-table' ),
853 'image' => 'horizontal-table.png',
854 'features' => array(),
855 ),
856 array(
857 'title' => __( 'Plain text', 'tier-pricing-table' ),
858 'image' => 'plain-text.png',
859 'features' => array(),
860 ),
861 array(
862 'title' => __( 'Dropdown', 'tier-pricing-table' ),
863 'image' => 'dropdown.png',
864 'features' => array(),
865 ),
866 );
867 ?>
868 <section class="tpt-welcome-page-features tpt-welcome-page-features--templates">
869
870 <?php foreach ( $templates as $template ) : ?>
871
872 <div class="tpt-welcome-page-feature tpt-welcome-page-feature--template">
873 <div class="tpt-welcome-page-feature__title">
874 <?php echo esc_html( $template['title'] ); ?>
875 </div>
876
877 <div class="tpt-welcome-page-feature__inner">
878 <div class="tpt-welcome-page-feature__image">
879 <img src="<?php echo esc_attr( $fileManager->locateAsset( 'admin/welcome-page/templates/' . $template['image'] ) ); ?>">
880 </div>
881 <div class="tpt-welcome-page-feature__description">
882
883 <?php foreach ( $template['features'] as $feature ) : ?>
884 <span class="tpt-checkmark"><?php echo esc_html( $feature ); ?></span>
885 <?php endforeach; ?>
886 </div>
887 </div>
888
889 </div>
890
891 <?php endforeach; ?>
892 </section>
893
894 <div class="tpt-welcome-page-section-title">
895 <span>#3</span>
896 <?php esc_html_e( 'Flexible Pricing', 'tier-pricing-table' ); ?>
897 </div>
898
899 <section class="tpt-welcome-page-features tpt-welcome-page-features--flexible-pricing">
900 <div class="tpt-welcome-page-feature">
901
902 <div class="tpt-welcome-page-feature__title">
903 <?php esc_html_e( 'Apply custom prices to any user role', 'tier-pricing-table' ); ?>:
904 </div>
905
906 <div class="tpt-welcome-page-feature__inner">
907 <div class="tpt-welcome-page-feature__image">
908 <img src="<?php echo esc_attr( $fileManager->locateAsset( 'admin/welcome-page/role-based.png' ) ); ?>">
909 </div>
910 <div class="tpt-welcome-page-feature__description">
911 <span class="tpt-checkmark"> <?php esc_html_e( 'Add unlimited role-based pricing.', 'tier-pricing-table' ); ?></span>
912 <span class="tpt-checkmark"> <?php esc_html_e( 'Control regular & sale price or provide a percentage discount.', 'tier-pricing-table' ); ?></span>
913 <span class="tpt-checkmark"> <?php esc_html_e( 'Control minimum, maximum and quantity step.', 'tier-pricing-table' ); ?></span>
914 <span class="tpt-checkmark"> <?php esc_html_e( 'Works great with variable products.', 'tier-pricing-table' ); ?></span>
915 </div>
916 </div>
917
918 </div>
919
920 <div class="tpt-welcome-page-feature">
921
922 <div class="tpt-welcome-page-feature__title">
923 <?php
924 esc_html_e( 'Apply custom prices in bulk for selected categories and users:',
925 'tier-pricing-table' );
926 ?>
927 </div>
928
929 <div class="tpt-welcome-page-feature__inner">
930 <div class="tpt-welcome-page-feature__image">
931 <img src="<?php echo esc_attr( $fileManager->locateAsset( 'admin/welcome-page/global-rules .png' ) ); ?>">
932 </div>
933 <div class="tpt-welcome-page-feature__description">
934 <span class="tpt-checkmark"> <?php esc_html_e( 'Control regular prices, tiered pricing and quantity limits in one place.', 'tier-pricing-table' ); ?></span>
935 <span class="tpt-checkmark"> <?php esc_html_e( 'Apply tiered pricing across multiple products.', 'tier-pricing-table' ); ?></span>
936 <span class="tpt-checkmark"> <?php esc_html_e( 'Select products or product categories that the rule applies to.', 'tier-pricing-table' ); ?></span>
937 <span class="tpt-checkmark"> <?php esc_html_e( 'Select users or user roles that the rule applies to.', 'tier-pricing-table' ); ?></span>
938 </div>
939 </div>
940 </div>
941 </section>
942
943 <div class="tpt-welcome-page-section-title">
944 <span>#4</span>
945 <?php esc_html_e( 'Advanced Features', 'tier-pricing-table' ); ?>
946 </div>
947
948 <section class="tpt-welcome-page-features tpt-welcome-page-features--plugin-features">
949 <?php
950 $mainFeatures = array(
951
952 array(
953 'title' => __( 'Manage user roles', 'tier-pricing-table' ),
954 'image' => 'user-roles.png',
955 'features' => array(
956 __( 'Create and update user roles', 'tier-pricing-table' ),
957 ),
958 ),
959 array(
960 'title' => __( 'Labels', 'tier-pricing-table' ),
961 'image' => 'tiered-pricing-labels.png',
962 'features' => array(
963 __( 'Create customizable labels and attach them to a pricing tier',
964 'tier-pricing-table' ),
965 ),
966 ),
967 array(
968 'title' => __( 'Cart', 'tier-pricing-table' ),
969 'image' => 'cart.png',
970 'features' => array(
971 __( 'Cart upsells to motivate customers to purchase more.', 'tier-pricing-table' ),
972 __( 'Customize cart upsells template.', 'tier-pricing-table' ),
973 __( 'Tiered price in the cart appears as a discount.', 'tier-pricing-table' ),
974 ),
975 ),
976 array(
977 'title' => __( 'Catalog prices', 'tier-pricing-table' ),
978 'image' => 'catalog.png',
979 'features' => array(
980 __( 'Show the lowest price.', 'tier-pricing-table' ),
981 __( 'Customize the lowest price prefix: “from $10.00”, “as low as $10.00” or whatever you want.', 'tier-pricing-table' ),
982 __( 'Show the price range based on tiered pricing.', 'tier-pricing-table' ),
983 ),
984 ),
985 array(
986 'title' => __( 'Product catalog (Category page)', 'tier-pricing-table' ),
987 'image' => 'catalog-render.png',
988 'features' => array(
989 __( 'Customize template (can be different from product page).', 'tier-pricing-table' ),
990 __( 'Show quantity field.', 'tier-pricing-table' ),
991 ),
992 ),
993 );
994 ?>
995
996 <?php foreach ( $mainFeatures as $feature ) : ?>
997 <div class="tpt-welcome-page-feature">
998
999 <div class="tpt-welcome-page-feature__title">
1000 <?php echo esc_html( $feature['title'] ); ?>
1001 </div>
1002
1003 <div class="tpt-welcome-page-feature__inner">
1004
1005 <div class="tpt-welcome-page-feature__image">
1006 <img src="<?php echo esc_attr( $fileManager->locateAsset( 'admin/welcome-page/' . $feature['image'] ) ); ?>">
1007 <div class="tpt-welcome-page-feature__image-description">Product catalog</div>
1008 </div>
1009
1010 <div class="tpt-welcome-page-feature__description">
1011 <?php foreach ( $feature['features'] as $featureItem ) : ?>
1012 <span class="tpt-checkmark"><?php echo esc_html( $featureItem ); ?></span>
1013 <?php endforeach; ?>
1014 </div>
1015 </div>
1016
1017 </div>
1018 <?php endforeach; ?>
1019 </section>
1020
1021 <div class="tpt-welcome-page-section-title">
1022 <span>#5</span>
1023 <?php esc_html_e( 'Other Features That Make The Plugin Unique', 'tier-pricing-table' ); ?>
1024 </div>
1025
1026 <?php
1027 $otherFeatures = array(
1028 array(
1029 'title' => __( 'Tier Labels & Badges', 'tier-pricing-table' ),
1030 'icon' => '🏷️',
1031 ),
1032 array(
1033 'title' => __( 'Data Cleanup & Role Management Tools', 'tier-pricing-table' ),
1034 'icon' => '🛠️',
1035 ),
1036 array(
1037 'title' => __( 'Import \ Export', 'tier-pricing-table' ),
1038 'icon' => '🔁',
1039 ),
1040 array(
1041 'title' => __( 'REST API', 'tier-pricing-table' ),
1042 'icon' => '⚙️',
1043 ),
1044 array(
1045 'title' => __( 'Admin-made orders supported', 'tier-pricing-table' ),
1046 'icon' => '�
1047 ',
1048 ),
1049 array(
1050 'title' => __( 'Built-in cache', 'tier-pricing-table' ),
1051 'icon' => '🚀',
1052 ),
1053 array(
1054 'title' => __( 'Coupons management', 'tier-pricing-table' ),
1055 'icon' => '🎫',
1056 ),
1057 array(
1058 'title' => __( 'Shortcode \ Gutenberg \ Elementor', 'tier-pricing-table' ),
1059 'icon' => '🧱',
1060 ),
1061 array(
1062 'title' => __( 'Hide prices for logged-out users', 'tier-pricing-table' ),
1063 'icon' => '🔑',
1064 ),
1065 array(
1066 'title' => __( 'Works with any theme', 'tier-pricing-table' ),
1067 'icon' => '✨',
1068 ),
1069 array(
1070 'title' => __( 'Debug mode', 'tier-pricing-table' ),
1071 'icon' => '⚙️',
1072 ),
1073 )
1074 ?>
1075
1076 <section class="tpt-welcome-page-side-features">
1077 <?php foreach ( $otherFeatures as $feature ) : ?>
1078 <div class="tpt-welcome-page-side-feature">
1079 <?php echo esc_html( $feature['icon'] ); ?><?php echo esc_html( ' ' . $feature['title'] ); ?>
1080 </div>
1081 <?php endforeach; ?>
1082 </section>
1083
1084
1085 <div class="tpt-welcome-page-section-title">
1086 <span>#6</span>
1087 <?php esc_html_e( 'Integrations with 3rd party plugins', 'tier-pricing-table' ); ?>
1088 </div>
1089
1090 <section class="tpt-welcome-page-integrations">
1091 <?php
1092 $integrations = array(
1093 array(
1094 'title' => 'WP All Import',
1095 'image' => 'wpallimport-icon.png',
1096 ),
1097 array(
1098 'title' => 'WPML',
1099 'image' => 'wpml-multicurrency-icon.png',
1100 ),
1101 array(
1102 'title' => 'Elementor',
1103 'image' => 'elementor-icon.svg',
1104 ),
1105 array(
1106 'title' => 'WooCommerce Product Add-ons',
1107 'image' => 'woocommerce-develop.jpeg',
1108 ),
1109 array(
1110 'title' => 'Yith Request a Quote',
1111 'image' => 'yith-raq-icon.jpeg',
1112 ),
1113 array(
1114 'title' => 'Addify Request a Quote',
1115 'image' => 'addify-raq-icon.png',
1116 ),
1117 array(
1118 'title' => 'Aelia Multicurrency',
1119 'image' => 'aelia-icon.svg',
1120 ),
1121 array(
1122 'title' => 'WooCommerce Bundles',
1123 'image' => 'woocommerce-develop.jpeg',
1124 ),
1125 array(
1126 'title' => 'Fox Multicurrency',
1127 'image' => 'fox-icon.png',
1128 ),
1129 array(
1130 'title' => 'Mix & Match Products',
1131 'image' => 'mix-match-icon.png',
1132 ),
1133 array(
1134 'title' => 'Currency Switcher by "WP Experts"',
1135 'image' => 'wccs-icon.png',
1136 ),
1137 array(
1138 'title' => 'WooCommerce Deposits',
1139 'image' => 'woocommerce-develop.jpeg',
1140 ),
1141 array(
1142 'title' => 'WPML Multicurrency',
1143 'image' => 'wpml-multicurrency-icon.png',
1144 ),
1145 array(
1146 'title' => 'WooCommerce Custom Product Addons',
1147 'image' => 'wcpa-icon.png',
1148 ),
1149 );
1150 ?>
1151 <style>
1152 .tpt-welcome-page-integrations {
1153 padding: 40px 50px;
1154 display: flex;
1155 flex-wrap: wrap;
1156 gap: 30px;
1157 align-items: center;
1158 justify-content: flex-start;
1159 }
1160
1161 .tpt-welcome-page-integration {
1162 width: 140px;
1163 text-align: center;
1164 transition: transform 0.2s ease;
1165 }
1166
1167 .tpt-welcome-page-integration:hover {
1168 transform: translateY(-6px) scale(1.05);
1169 }
1170
1171 .tpt-welcome-page-integrations__image img {
1172 width: 65%;
1173 border-radius: 16px;
1174 box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
1175 }
1176
1177 .tpt-welcome-page-integrations__name {
1178 text-align: center;
1179 margin-top: 12px;
1180 font-size: 0.95em;
1181 color: #475569;
1182 }
1183
1184 </style>
1185 <?php foreach ( $integrations as $integration ) : ?>
1186 <div class="tpt-welcome-page-integration">
1187 <div class="tpt-welcome-page-integrations__image">
1188 <img src="<?php echo esc_attr( $fileManager->locateAsset( 'admin/integrations/' . $integration['image'] ) ); ?>">
1189 </div>
1190 <div class="tpt-welcome-page-integrations__name">
1191 <b><?php echo esc_html( $integration['title'] ); ?></b>
1192 </div>
1193 </div>
1194 <?php endforeach; ?>
1195 </section>
1196
1197 <style>
1198 .tpt-welcome-page-contact-us {
1199 background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
1200 padding: 80px 40px;
1201 text-align: center;
1202 border-radius: 16px;
1203 margin: 20px 50px 60px;
1204 box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
1205 }
1206
1207 .tpt-welcome-page-contact-us__title {
1208 font-size: 2.5em;
1209 font-weight: 700;
1210 color: #fff;
1211 line-height: 1.2;
1212 margin-bottom: 30px;
1213 }
1214
1215 .tpt-welcome-page-feature__image img {
1216 cursor: zoom-in;
1217 }
1218
1219 .tpt-lightbox {
1220 position: fixed;
1221 top: 0;
1222 left: 0;
1223 width: 100vw;
1224 height: 100vh;
1225 background: rgba(15, 23, 42, 0.85);
1226 display: flex;
1227 align-items: center;
1228 justify-content: center;
1229 z-index: 999999;
1230 opacity: 0;
1231 pointer-events: none;
1232 transition: opacity 0.25s ease;
1233 backdrop-filter: blur(4px);
1234 }
1235
1236 .tpt-lightbox.is-active {
1237 opacity: 1;
1238 pointer-events: auto;
1239 }
1240
1241 .tpt-lightbox img {
1242 max-width: 90%;
1243 max-height: 90vh;
1244 border-radius: 8px;
1245 box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
1246 transform: scale(0.95);
1247 transition: transform 0.25s ease;
1248 }
1249
1250 .tpt-lightbox.is-active img {
1251 transform: scale(1);
1252 }
1253
1254 .tpt-lightbox-close {
1255 position: absolute;
1256 top: 20px;
1257 right: 30px;
1258 color: #fff;
1259 font-size: 40px;
1260 cursor: pointer;
1261 opacity: 0.7;
1262 transition: opacity 0.2s;
1263 line-height: 1;
1264 }
1265
1266 .tpt-lightbox-close:hover {
1267 opacity: 1;
1268 }
1269 </style>
1270
1271 <section class="tpt-welcome-page-contact-us">
1272 <div class="tpt-welcome-page-contact-us__title"><?php esc_html_e( 'Have a question?', 'tier-pricing-table' ); ?></div>
1273 <div class="tpt-welcome-page-contact-us__button">
1274 <a href="<?php echo esc_attr( \TierPricingTable\TierPricingTablePlugin::getContactUsURL() ); ?>"
1275 target="_blank"
1276 class="tpt-welcome-page-button tpt-welcome-page-button-primary">Contact Us</a>
1277 </div>
1278 </section>
1279
1280 <div id="tpt-lightbox" class="tpt-lightbox">
1281 <span class="tpt-lightbox-close">&times;</span>
1282 <img id="tpt-lightbox-img" src="">
1283 </div>
1284
1285 <script>
1286 document.addEventListener('DOMContentLoaded', function () {
1287 const lightbox = document.getElementById('tpt-lightbox');
1288 const lightboxImg = document.getElementById('tpt-lightbox-img');
1289
1290 const images = document.querySelectorAll('.tpt-welcome-page-feature__image img');
1291
1292 images.forEach(img => {
1293 img.addEventListener('click', function () {
1294 lightboxImg.src = this.src;
1295 lightbox.classList.add('is-active');
1296 });
1297 });
1298
1299 lightbox.addEventListener('click', function (e) {
1300 if (e.target !== lightboxImg) {
1301 lightbox.classList.remove('is-active');
1302 }
1303 });
1304 });
1305 </script>
1306
1307 </main>
1308
1309 <style>
1310 @media screen and (max-width: 900px) {
1311
1312 .tpt-welcome-page-hero__content {
1313 width: 100%;
1314 }
1315
1316 .tpt-welcome-page-hero__image {
1317 display: none
1318 }
1319
1320 .tpt-welcome-page-hero__additional {
1321 font-size: 1em;
1322 }
1323
1324 .tpt-welcome-page-features {
1325 column-count: 1;
1326 }
1327
1328 .tpt-welcome-page-features--templates {
1329 column-count: 2;
1330 }
1331
1332 .tpt-welcome-page-feature__image-description {
1333 font-size: 0.8em;
1334 }
1335
1336 .tpt-welcome-page-feature__title {
1337 font-size: 1.4em;
1338 }
1339
1340 .tpt-welcome-page-feature__description {
1341 font-size: 1em;
1342 }
1343
1344 .tpt-welcome-page-section-title {
1345 font-size: 2em;
1346 }
1347
1348 .tpt-welcome-page-side-features {
1349 gap: 10px;
1350 }
1351
1352 .tpt-welcome-page-side-feature {
1353 font-size: 1.2em;
1354 padding: 10px;
1355 }
1356
1357 .tpt-welcome-page-integrations {
1358 padding: 40px 20px;
1359 }
1360
1361 .tpt-welcome-page-integration {
1362 width: 120px;
1363 }
1364
1365 .tpt-welcome-page-contact-us {
1366 padding: 40px 20px;
1367 }
1368
1369 .tpt-welcome-page-contact-us__title {
1370 font-size: 2em;
1371 }
1372 }
1373 </style>