PluginProbe
Tiered Pricing Table for WooCommerce / 7.1.5
Tiered Pricing Table for WooCommerce v7.1.5
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 7.1.5, at views/admin/welcome-page/welcome-page.php

1,398 lines 35.7 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.',
567 'tier-pricing-table' ); ?>
568 </div>
569
570 <header class="tpt-welcome-page-hero">
571
572 <div class="tpt-welcome-page-hero__content">
573 <div class="tpt-welcome-page-hero__title">
574 <div><?php esc_html_e( 'Welcome to', 'tier-pricing-table' ); ?></div>
575 <div><b><?php esc_html_e( 'Tiered Pricing Table', 'tier-pricing-table' ); ?></b></div>
576 </div>
577
578 <div class="tpt-welcome-page-hero__description">
579 <p>
580 <?php
581 esc_html_e( 'Tiered Pricing Table is a powerful tool that allows you to create quantity-based pricing for your WooCommerce products.',
582 'tier-pricing-table' );
583 ?>
584 </p>
585 <p>
586 <?php
587 esc_html_e( 'With intuitive templates, flexible pricing rules, and advanced features, this plugin is a perfect fit for any type of store.',
588 'tier-pricing-table' );
589 ?>
590 </p>
591 </div>
592 <div class="tpt-welcome-page-hero__actions">
593 <a href="<?php echo esc_attr( ServiceContainer::getInstance()->getSettings()->getLink() ); ?>"
594 class="tpt-welcome-page-button tpt-welcome-page-button-secondary">
595 <?php esc_html_e( 'Settings', 'tier-pricing-table' ); ?>
596 </a>
597
598 <a href="<?php echo esc_attr( \TierPricingTable\TierPricingTablePlugin::getDocumentationURL() ); ?>"
599 target="_blank"
600 class="tpt-welcome-page-button tpt-welcome-page-button-primary tpt-welcome-page-button-primary--border">
601 <?php esc_html_e( 'Documentation', 'tier-pricing-table' ); ?>
602 </a>
603 </div>
604
605 <div class="tpt-welcome-page-hero__additional" style="font-size: 1.2em; margin-top: 20px;">
606 <?php esc_html_e( 'Questions? We\'re here to help.', 'tier-pricing-table' ); ?>
607 <a style="color: #fff"
608 href="<?php echo esc_attr( \TierPricingTable\TierPricingTablePlugin::getContactUsURL() ); ?>"
609 target="_blank"><?php esc_html_e( 'Contact Us', 'tier-pricing-table' ); ?></a>
610 </div>
611 </div>
612
613 <div class="tpt-welcome-page-hero__image">
614 <div class="tpt-browser-mockup">
615 <div class="tpt-browser-mockup-header">
616 <span class="dot dot-red"></span>
617 <span class="dot dot-yellow"></span>
618 <span class="dot dot-green"></span>
619 <div class="tpt-browser-mockup-address">yoursite.com/product/t-shirt</div>
620 </div>
621 <div class="tpt-interactive-preview" id="tpt-interactive-preview">
622 <div class="tpt-ip-top">
623 <div class="tpt-ip-left">
624 <svg viewBox="0 0 24 24" fill="none" stroke="#94a3b8" stroke-width="1.5"
625 stroke-linecap="round"
626 stroke-linejoin="round" style="width: 80%; height: auto; max-height: 200px;">
627 <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"/>
628 </svg>
629 </div>
630 <div class="tpt-ip-top-info">
631 <h2 class="tpt-ip-title">T-Shirt</h2>
632 <div class="tpt-ip-main-price" id="tpt-ip-main-price">
633 <del>$100.00</del>
634 <span>$75.00</span></div>
635 <p class="tpt-ip-desc"><?php esc_html_e( 'This is a product example.',
636 'tier-pricing-table' ); ?></p>
637 </div>
638 </div>
639
640 <div class="tpt-ip-bottom">
641 <div class="tpt-ip-table-container">
642 <table class="tpt-ip-table">
643 <thead>
644 <tr>
645 <th><?php esc_html_e( 'Quantity', 'tier-pricing-table' ); ?></th>
646 <th><?php esc_html_e( 'Discount', 'tier-pricing-table' ); ?></th>
647 <th><?php esc_html_e( 'Price', 'tier-pricing-table' ); ?></th>
648 </tr>
649 </thead>
650 <tbody>
651 <tr class="tpt-ip-block" data-qty="1" data-price="100.00">
652 <td class="tpt-hero-preview-qty">1 - 9 pieces</td>
653 <td class="tpt-hero-preview-discount">-</td>
654 <td class="tpt-hero-preview-price"><strong>$100.00</strong></td>
655 </tr>
656 <tr class="tpt-ip-block" data-qty="10" data-price="90.00">
657 <td class="tpt-hero-preview-qty">10 - 19 pieces</td>
658 <td class="tpt-hero-preview-discount">10%</td>
659 <td class="tpt-hero-preview-price"><strong>$90.00</strong></td>
660 </tr>
661 <tr class="tpt-ip-block" data-qty="20" data-price="85.00">
662 <td class="tpt-hero-preview-qty">20 - 49 pieces <span
663 class="tpt-hero-preview-badge tpt-hero-preview-badge--popular"><span
664 class="dashicons dashicons-star-filled"></span>Most popular</span>
665 </td>
666 <td class="tpt-hero-preview-discount">15%</td>
667 <td class="tpt-hero-preview-price"><strong>$85.00</strong></td>
668 </tr>
669 <tr class="tpt-ip-block is-selected" data-qty="50" data-price="80.00">
670 <td class="tpt-hero-preview-qty">50+ pieces</td>
671 <td class="tpt-hero-preview-discount">20%</td>
672 <td class="tpt-hero-preview-price"><strong>$80.00</strong></td>
673 </tr>
674 </tbody>
675 </table>
676 </div>
677
678 <div class="tpt-ip-add-to-cart">
679 <input type="number" id="tpt-ip-qty" class="tpt-ip-qty-input" value="50" min="1">
680 <button class="tpt-ip-btn"><?php esc_html_e( 'Add to cart',
681 'tier-pricing-table' ); ?></button>
682 </div>
683
684 <div class="tpt-ip-summary">
685 <div class="tpt-ip-summary-row">
686 <span id="tpt-ip-summary-qty">50x</span>
687 <span id="tpt-ip-summary-each">$80.00</span>
688 </div>
689 <div class="tpt-ip-summary-row tpt-ip-summary-row--total">
690 <span>T-Shirt</span>
691 <strong id="tpt-ip-summary-total">$4,000.00</strong>
692 </div>
693 </div>
694 </div>
695 </div>
696 </div>
697 </div>
698
699 <script>
700 document.addEventListener('DOMContentLoaded', function () {
701 const blocks = document.querySelectorAll('.tpt-ip-block');
702 const qtyInput = document.getElementById('tpt-ip-qty');
703 const mainPrice = document.getElementById('tpt-ip-main-price');
704 const summaryQty = document.getElementById('tpt-ip-summary-qty');
705 const summaryEach = document.getElementById('tpt-ip-summary-each');
706 const summaryTotal = document.getElementById('tpt-ip-summary-total');
707
708 function getPriceForQty(qty) {
709 if (qty >= 50) return 80.00;
710 if (qty >= 20) return 85.00;
711 if (qty >= 10) return 90.00;
712 return 100.00;
713 }
714
715 function updateUI(qty) {
716 qty = parseInt(qty) || 1;
717 if (qty < 1) qty = 1;
718 if (qtyInput.value != qty) qtyInput.value = qty;
719
720 const price = getPriceForQty(qty);
721
722 blocks.forEach(b => b.classList.remove('is-selected'));
723
724 let selectedIndex = 0;
725 if (qty >= 50) selectedIndex = 3;
726 else if (qty >= 20) selectedIndex = 2;
727 else if (qty >= 10) selectedIndex = 1;
728
729 if (blocks[selectedIndex]) blocks[selectedIndex].classList.add('is-selected');
730
731 if (price < 100) {
732 const originalPrice = 100.00;
733 const savedTotal = (originalPrice - price) * qty;
734 const savedPercent = Math.round((originalPrice - price) / originalPrice * 100);
735 mainPrice.innerHTML = `<del>$100.00</del> <span>$${price.toFixed(2)}</span> <span class="tpt-ip-you-save"><?php esc_html_e( 'You save',
736 'tier-pricing-table' ); ?> $${savedTotal.toLocaleString('en-US', {
737 minimumFractionDigits: 2,
738 maximumFractionDigits: 2
739 })} (${savedPercent}%)</span>`;
740 } else {
741 mainPrice.innerHTML = `<span>$100.00</span>`;
742 }
743
744 summaryQty.innerText = `${qty}x`;
745 summaryEach.innerText = `$${price.toFixed(2)}`;
746 summaryTotal.innerText = `$${(price * qty).toLocaleString('en-US', {
747 minimumFractionDigits: 2,
748 maximumFractionDigits: 2
749 })}`;
750 }
751
752 blocks.forEach(block => {
753 block.addEventListener('click', function () {
754 const qty = parseInt(this.getAttribute('data-qty'));
755 updateUI(qty);
756 });
757 });
758
759 if (qtyInput) {
760 qtyInput.addEventListener('input', function () {
761 updateUI(this.value);
762 });
763 }
764
765 updateUI(100);
766 });
767 </script>
768 </header>
769
770 <div class="tpt-welcome-page-section-title">
771 <span>#1</span>
772 <?php esc_html_e( 'Easy Setup', 'tier-pricing-table' ); ?>
773 </div>
774
775 <section class="tpt-welcome-page-features">
776
777 <div class="tpt-welcome-page-feature">
778
779 <div class="tpt-welcome-page-feature__title">
780 <?php esc_html_e( 'Add tiered pricing to products', 'tier-pricing-table' ); ?>:
781 </div>
782
783 <div class="tpt-welcome-page-feature__inner">
784 <div class="tpt-welcome-page-feature__image">
785 <img src="<?php echo esc_attr( $fileManager->locateAsset( 'admin/welcome-page/product-level-rules.png' ) ); ?>">
786 <div class="tpt-welcome-page-feature__image-description">Product edit page</div>
787 </div>
788 <div class="tpt-welcome-page-feature__description">
789 <span class="tpt-checkmark"> <?php esc_html_e( 'Add unlimited quantity-based prices.',
790 'tier-pricing-table' ); ?></span>
791 <span class="tpt-checkmark"> <?php esc_html_e( 'Fixed prices or percentage discounts.',
792 'tier-pricing-table' ); ?></span>
793 <span class="tpt-checkmark"> <?php esc_html_e( 'Works great with variable products.',
794 'tier-pricing-table' ); ?></span>
795 </div>
796 </div>
797
798 </div>
799
800 <div class="tpt-welcome-page-feature">
801
802 <div class="tpt-welcome-page-feature__title">
803 <?php esc_html_e( 'Prices automatically displayed on the product page:', 'tier-pricing-table' ); ?>
804 </div>
805
806 <div class="tpt-welcome-page-feature__inner">
807 <div class="tpt-welcome-page-feature__image">
808 <img src="<?php echo esc_attr( $fileManager->locateAsset( 'admin/welcome-page/product-page.png' ) ); ?>">
809 <div class="tpt-welcome-page-feature__image-description">Product page</div>
810 </div>
811
812 </div>
813 </div>
814
815 </section>
816
817 <div class="tpt-welcome-page-section-title">
818 <span>#2</span>
819 <?php esc_html_e( 'Various Pricing Templates', 'tier-pricing-table' ); ?>
820 </div>
821
822 <?php
823 $templates = array(
824 array(
825 'title' => __( 'Pricing Table', 'tier-pricing-table' ),
826 'image' => 'table.png',
827 'features' => array(
828 __( 'Ability to add custom columns.', 'tier-pricing-table' ),
829 ),
830 ),
831
832 array(
833 'title' => __( 'Pricing Blocks #3', 'tier-pricing-table' ),
834 'image' => 'blocks-1.png',
835 'features' => array(),
836 ),
837 array(
838 'title' => __( 'Pricing Blocks', 'tier-pricing-table' ),
839 'image' => 'blocks-2.png',
840 'features' => array(),
841 ),
842 array(
843 'title' => __( 'Pricing Blocks #2', 'tier-pricing-table' ),
844 'image' => 'blocks-3.png',
845 'features' => array(),
846 ),
847 array(
848 'title' => __( 'Pricing Options', 'tier-pricing-table' ),
849 'image' => 'options.png',
850 'features' => array(),
851 ),
852 array(
853 'title' => __( 'Pricing Options #2', 'tier-pricing-table' ),
854 'image' => 'options-2.png',
855 'features' => array(),
856 ),
857
858 array(
859 'title' => __( 'Horizontal table', 'tier-pricing-table' ),
860 'image' => 'horizontal-table.png',
861 'features' => array(),
862 ),
863 array(
864 'title' => __( 'Plain text', 'tier-pricing-table' ),
865 'image' => 'plain-text.png',
866 'features' => array(),
867 ),
868 array(
869 'title' => __( 'Dropdown', 'tier-pricing-table' ),
870 'image' => 'dropdown.png',
871 'features' => array(),
872 ),
873 );
874 ?>
875 <section class="tpt-welcome-page-features tpt-welcome-page-features--templates">
876
877 <?php foreach ( $templates as $template ) : ?>
878
879 <div class="tpt-welcome-page-feature tpt-welcome-page-feature--template">
880 <div class="tpt-welcome-page-feature__title">
881 <?php echo esc_html( $template['title'] ); ?>
882 </div>
883
884 <div class="tpt-welcome-page-feature__inner">
885 <div class="tpt-welcome-page-feature__image">
886 <img src="<?php echo esc_attr( $fileManager->locateAsset( 'admin/welcome-page/templates/' . $template['image'] ) ); ?>">
887 </div>
888 <div class="tpt-welcome-page-feature__description">
889
890 <?php foreach ( $template['features'] as $feature ) : ?>
891 <span class="tpt-checkmark"><?php echo esc_html( $feature ); ?></span>
892 <?php endforeach; ?>
893 </div>
894 </div>
895
896 </div>
897
898 <?php endforeach; ?>
899 </section>
900
901 <div class="tpt-welcome-page-section-title">
902 <span>#3</span>
903 <?php esc_html_e( 'Flexible Pricing', 'tier-pricing-table' ); ?>
904 </div>
905
906 <section class="tpt-welcome-page-features tpt-welcome-page-features--flexible-pricing">
907 <div class="tpt-welcome-page-feature">
908
909 <div class="tpt-welcome-page-feature__title">
910 <?php esc_html_e( 'Apply custom prices to any user role', 'tier-pricing-table' ); ?>:
911 </div>
912
913 <div class="tpt-welcome-page-feature__inner">
914 <div class="tpt-welcome-page-feature__image">
915 <img src="<?php echo esc_attr( $fileManager->locateAsset( 'admin/welcome-page/role-based.png' ) ); ?>">
916 </div>
917 <div class="tpt-welcome-page-feature__description">
918 <span class="tpt-checkmark"> <?php esc_html_e( 'Add unlimited role-based pricing.',
919 'tier-pricing-table' ); ?></span>
920 <span class="tpt-checkmark"> <?php esc_html_e( 'Control regular & sale price or provide a percentage discount.',
921 'tier-pricing-table' ); ?></span>
922 <span class="tpt-checkmark"> <?php esc_html_e( 'Control minimum, maximum and quantity step.',
923 'tier-pricing-table' ); ?></span>
924 <span class="tpt-checkmark"> <?php esc_html_e( 'Works great with variable products.',
925 'tier-pricing-table' ); ?></span>
926 </div>
927 </div>
928
929 </div>
930
931 <div class="tpt-welcome-page-feature">
932
933 <div class="tpt-welcome-page-feature__title">
934 <?php
935 esc_html_e( 'Apply custom prices in bulk for selected categories and users:',
936 'tier-pricing-table' );
937 ?>
938 </div>
939
940 <div class="tpt-welcome-page-feature__inner">
941 <div class="tpt-welcome-page-feature__image">
942 <img src="<?php echo esc_attr( $fileManager->locateAsset( 'admin/welcome-page/global-rules .png' ) ); ?>">
943 </div>
944 <div class="tpt-welcome-page-feature__description">
945 <span class="tpt-checkmark"> <?php esc_html_e( 'Control regular prices, tiered pricing and quantity limits in one place.',
946 'tier-pricing-table' ); ?></span>
947 <span class="tpt-checkmark"> <?php esc_html_e( 'Apply tiered pricing across multiple products.',
948 'tier-pricing-table' ); ?></span>
949 <span class="tpt-checkmark"> <?php esc_html_e( 'Select products or product categories that the rule applies to.',
950 'tier-pricing-table' ); ?></span>
951 <span class="tpt-checkmark"> <?php esc_html_e( 'Select users or user roles that the rule applies to.',
952 'tier-pricing-table' ); ?></span>
953 </div>
954 </div>
955 </div>
956 </section>
957
958 <div class="tpt-welcome-page-section-title">
959 <span>#4</span>
960 <?php esc_html_e( 'Advanced Features', 'tier-pricing-table' ); ?>
961 </div>
962
963 <section class="tpt-welcome-page-features tpt-welcome-page-features--plugin-features">
964 <?php
965 $mainFeatures = array(
966 array(
967 'title' => __( 'Request a Quote', 'tier-pricing-table' ),
968 'image' => 'request-a-quote.png',
969 'features' => array(
970 __( 'Allow customers to request custom quotes via a sleek customizable popup.',
971 'tier-pricing-table' ),
972 ),
973 ),
974 array(
975 'title' => __( 'Manage user roles', 'tier-pricing-table' ),
976 'image' => 'user-roles.png',
977 'features' => array(
978 __( 'Create and update user roles', 'tier-pricing-table' ),
979 ),
980 ),
981 array(
982 'title' => __( 'Labels', 'tier-pricing-table' ),
983 'image' => 'tiered-pricing-labels.png',
984 'features' => array(
985 __( 'Create customizable labels and attach them to a pricing tier',
986 'tier-pricing-table' ),
987 ),
988 ),
989 array(
990 'title' => __( 'Cart', 'tier-pricing-table' ),
991 'image' => 'cart.png',
992 'features' => array(
993 __( 'Cart upsells to motivate customers to purchase more.', 'tier-pricing-table' ),
994 __( 'Customize cart upsells template.', 'tier-pricing-table' ),
995 __( 'Tiered price in the cart appears as a discount.', 'tier-pricing-table' ),
996 ),
997 ),
998 array(
999 'title' => __( 'Catalog prices', 'tier-pricing-table' ),
1000 'image' => 'catalog.png',
1001 'features' => array(
1002 __( 'Show the lowest price.', 'tier-pricing-table' ),
1003 __( 'Customize the lowest price prefix: “from $10.00”, “as low as $10.00” or whatever you want.',
1004 'tier-pricing-table' ),
1005 __( 'Show the price range based on tiered pricing.', 'tier-pricing-table' ),
1006 ),
1007 ),
1008 array(
1009 'title' => __( 'Product catalog (Category page)', 'tier-pricing-table' ),
1010 'image' => 'catalog-render.png',
1011 'features' => array(
1012 __( 'Customize template (can be different from product page).',
1013 'tier-pricing-table' ),
1014 __( 'Show quantity field.', 'tier-pricing-table' ),
1015 ),
1016 ),
1017 );
1018 ?>
1019
1020 <?php foreach ( $mainFeatures as $feature ) : ?>
1021 <div class="tpt-welcome-page-feature">
1022
1023 <div class="tpt-welcome-page-feature__title">
1024 <?php echo esc_html( $feature['title'] ); ?>
1025 </div>
1026
1027 <div class="tpt-welcome-page-feature__inner">
1028
1029 <div class="tpt-welcome-page-feature__image">
1030 <img src="<?php echo esc_attr( $fileManager->locateAsset( 'admin/welcome-page/' . $feature['image'] ) ); ?>">
1031 <div class="tpt-welcome-page-feature__image-description">Product catalog</div>
1032 </div>
1033
1034 <div class="tpt-welcome-page-feature__description">
1035 <?php foreach ( $feature['features'] as $featureItem ) : ?>
1036 <span class="tpt-checkmark"><?php echo esc_html( $featureItem ); ?></span>
1037 <?php endforeach; ?>
1038 </div>
1039 </div>
1040
1041 </div>
1042 <?php endforeach; ?>
1043 </section>
1044
1045 <div class="tpt-welcome-page-section-title">
1046 <span>#5</span>
1047 <?php esc_html_e( 'Other Features That Make The Plugin Unique', 'tier-pricing-table' ); ?>
1048 </div>
1049
1050 <?php
1051 $otherFeatures = array(
1052 array(
1053 'title' => __( 'Tier Labels & Badges', 'tier-pricing-table' ),
1054 'icon' => '🏷️',
1055 ),
1056 array(
1057 'title' => __( 'Data Cleanup & Role Management Tools', 'tier-pricing-table' ),
1058 'icon' => '🛠️',
1059 ),
1060 array(
1061 'title' => __( 'Import \ Export', 'tier-pricing-table' ),
1062 'icon' => '🔁',
1063 ),
1064 array(
1065 'title' => __( 'REST API', 'tier-pricing-table' ),
1066 'icon' => '⚙️',
1067 ),
1068 array(
1069 'title' => __( 'Admin-made orders supported', 'tier-pricing-table' ),
1070 'icon' => '�
1071 ',
1072 ),
1073 array(
1074 'title' => __( 'Built-in cache', 'tier-pricing-table' ),
1075 'icon' => '🚀',
1076 ),
1077 array(
1078 'title' => __( 'Coupons management', 'tier-pricing-table' ),
1079 'icon' => '🎫',
1080 ),
1081 array(
1082 'title' => __( 'Shortcode \ Gutenberg \ Elementor', 'tier-pricing-table' ),
1083 'icon' => '🧱',
1084 ),
1085 array(
1086 'title' => __( 'Hide prices for logged-out users', 'tier-pricing-table' ),
1087 'icon' => '🔑',
1088 ),
1089 array(
1090 'title' => __( 'Works with any theme', 'tier-pricing-table' ),
1091 'icon' => '✨',
1092 ),
1093 array(
1094 'title' => __( 'Debug mode', 'tier-pricing-table' ),
1095 'icon' => '⚙️',
1096 ),
1097 )
1098 ?>
1099
1100 <section class="tpt-welcome-page-side-features">
1101 <?php foreach ( $otherFeatures as $feature ) : ?>
1102 <div class="tpt-welcome-page-side-feature">
1103 <?php echo esc_html( $feature['icon'] ); ?><?php echo esc_html( ' ' . $feature['title'] ); ?>
1104 </div>
1105 <?php endforeach; ?>
1106 </section>
1107
1108
1109 <div class="tpt-welcome-page-section-title">
1110 <span>#6</span>
1111 <?php esc_html_e( 'Integrations with 3rd party plugins', 'tier-pricing-table' ); ?>
1112 </div>
1113
1114 <section class="tpt-welcome-page-integrations">
1115 <?php
1116 $integrations = array(
1117 array(
1118 'title' => 'WP All Import',
1119 'image' => 'wpallimport-icon.png',
1120 ),
1121 array(
1122 'title' => 'WPML',
1123 'image' => 'wpml-multicurrency-icon.png',
1124 ),
1125 array(
1126 'title' => 'Elementor',
1127 'image' => 'elementor-icon.svg',
1128 ),
1129 array(
1130 'title' => 'WooCommerce Product Add-ons',
1131 'image' => 'woocommerce-develop.jpeg',
1132 ),
1133 array(
1134 'title' => 'Yith Request a Quote',
1135 'image' => 'yith-raq-icon.jpeg',
1136 ),
1137 array(
1138 'title' => 'Addify Request a Quote',
1139 'image' => 'addify-raq-icon.png',
1140 ),
1141 array(
1142 'title' => 'Aelia Multicurrency',
1143 'image' => 'aelia-icon.svg',
1144 ),
1145 array(
1146 'title' => 'WooCommerce Bundles',
1147 'image' => 'woocommerce-develop.jpeg',
1148 ),
1149 array(
1150 'title' => 'Fox Multicurrency',
1151 'image' => 'fox-icon.png',
1152 ),
1153 array(
1154 'title' => 'Mix & Match Products',
1155 'image' => 'mix-match-icon.png',
1156 ),
1157 array(
1158 'title' => 'Currency Switcher by "WP Experts"',
1159 'image' => 'wccs-icon.png',
1160 ),
1161 array(
1162 'title' => 'WooCommerce Deposits',
1163 'image' => 'woocommerce-develop.jpeg',
1164 ),
1165 array(
1166 'title' => 'WPML Multicurrency',
1167 'image' => 'wpml-multicurrency-icon.png',
1168 ),
1169 array(
1170 'title' => 'WooCommerce Custom Product Addons',
1171 'image' => 'wcpa-icon.png',
1172 ),
1173 );
1174 ?>
1175 <style>
1176 .tpt-welcome-page-integrations {
1177 padding: 40px 50px;
1178 display: flex;
1179 flex-wrap: wrap;
1180 gap: 30px;
1181 align-items: center;
1182 justify-content: flex-start;
1183 }
1184
1185 .tpt-welcome-page-integration {
1186 width: 140px;
1187 text-align: center;
1188 transition: transform 0.2s ease;
1189 }
1190
1191 .tpt-welcome-page-integration:hover {
1192 transform: translateY(-6px) scale(1.05);
1193 }
1194
1195 .tpt-welcome-page-integrations__image img {
1196 width: 65%;
1197 border-radius: 16px;
1198 box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
1199 }
1200
1201 .tpt-welcome-page-integrations__name {
1202 text-align: center;
1203 margin-top: 12px;
1204 font-size: 0.95em;
1205 color: #475569;
1206 }
1207
1208 </style>
1209 <?php foreach ( $integrations as $integration ) : ?>
1210 <div class="tpt-welcome-page-integration">
1211 <div class="tpt-welcome-page-integrations__image">
1212 <img src="<?php echo esc_attr( $fileManager->locateAsset( 'admin/integrations/' . $integration['image'] ) ); ?>">
1213 </div>
1214 <div class="tpt-welcome-page-integrations__name">
1215 <b><?php echo esc_html( $integration['title'] ); ?></b>
1216 </div>
1217 </div>
1218 <?php endforeach; ?>
1219 </section>
1220
1221 <style>
1222 .tpt-welcome-page-contact-us {
1223 background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
1224 padding: 80px 40px;
1225 text-align: center;
1226 border-radius: 16px;
1227 margin: 20px 50px 60px;
1228 box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
1229 }
1230
1231 .tpt-welcome-page-contact-us__title {
1232 font-size: 2.5em;
1233 font-weight: 700;
1234 color: #fff;
1235 line-height: 1.2;
1236 margin-bottom: 30px;
1237 }
1238
1239 .tpt-welcome-page-feature__image img {
1240 cursor: zoom-in;
1241 }
1242
1243 .tpt-lightbox {
1244 position: fixed;
1245 top: 0;
1246 left: 0;
1247 width: 100vw;
1248 height: 100vh;
1249 background: rgba(15, 23, 42, 0.85);
1250 display: flex;
1251 align-items: center;
1252 justify-content: center;
1253 z-index: 999999;
1254 opacity: 0;
1255 pointer-events: none;
1256 transition: opacity 0.25s ease;
1257 backdrop-filter: blur(4px);
1258 }
1259
1260 .tpt-lightbox.is-active {
1261 opacity: 1;
1262 pointer-events: auto;
1263 }
1264
1265 .tpt-lightbox img {
1266 max-width: 90%;
1267 max-height: 90vh;
1268 border-radius: 8px;
1269 box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
1270 transform: scale(0.95);
1271 transition: transform 0.25s ease;
1272 }
1273
1274 .tpt-lightbox.is-active img {
1275 transform: scale(1);
1276 }
1277
1278 .tpt-lightbox-close {
1279 position: absolute;
1280 top: 20px;
1281 right: 30px;
1282 color: #fff;
1283 font-size: 40px;
1284 cursor: pointer;
1285 opacity: 0.7;
1286 transition: opacity 0.2s;
1287 line-height: 1;
1288 }
1289
1290 .tpt-lightbox-close:hover {
1291 opacity: 1;
1292 }
1293 </style>
1294
1295 <section class="tpt-welcome-page-contact-us">
1296 <div class="tpt-welcome-page-contact-us__title"><?php esc_html_e( 'Have a question?',
1297 'tier-pricing-table' ); ?></div>
1298 <div class="tpt-welcome-page-contact-us__button">
1299 <a href="<?php echo esc_attr( \TierPricingTable\TierPricingTablePlugin::getContactUsURL() ); ?>"
1300 target="_blank"
1301 class="tpt-welcome-page-button tpt-welcome-page-button-primary">Contact Us</a>
1302 </div>
1303 </section>
1304
1305 <div id="tpt-lightbox" class="tpt-lightbox">
1306 <span class="tpt-lightbox-close">&times;</span>
1307 <img id="tpt-lightbox-img" src="">
1308 </div>
1309
1310 <script>
1311 document.addEventListener('DOMContentLoaded', function () {
1312 const lightbox = document.getElementById('tpt-lightbox');
1313 const lightboxImg = document.getElementById('tpt-lightbox-img');
1314
1315 const images = document.querySelectorAll('.tpt-welcome-page-feature__image img');
1316
1317 images.forEach(img => {
1318 img.addEventListener('click', function () {
1319 lightboxImg.src = this.src;
1320 lightbox.classList.add('is-active');
1321 });
1322 });
1323
1324 lightbox.addEventListener('click', function (e) {
1325 if (e.target !== lightboxImg) {
1326 lightbox.classList.remove('is-active');
1327 }
1328 });
1329 });
1330 </script>
1331
1332 </main>
1333
1334 <style>
1335 @media screen and (max-width: 900px) {
1336
1337 .tpt-welcome-page-hero__content {
1338 width: 100%;
1339 }
1340
1341 .tpt-welcome-page-hero__image {
1342 display: none
1343 }
1344
1345 .tpt-welcome-page-hero__additional {
1346 font-size: 1em;
1347 }
1348
1349 .tpt-welcome-page-features {
1350 column-count: 1;
1351 }
1352
1353 .tpt-welcome-page-features--templates {
1354 column-count: 2;
1355 }
1356
1357 .tpt-welcome-page-feature__image-description {
1358 font-size: 0.8em;
1359 }
1360
1361 .tpt-welcome-page-feature__title {
1362 font-size: 1.4em;
1363 }
1364
1365 .tpt-welcome-page-feature__description {
1366 font-size: 1em;
1367 }
1368
1369 .tpt-welcome-page-section-title {
1370 font-size: 2em;
1371 }
1372
1373 .tpt-welcome-page-side-features {
1374 gap: 10px;
1375 }
1376
1377 .tpt-welcome-page-side-feature {
1378 font-size: 1.2em;
1379 padding: 10px;
1380 }
1381
1382 .tpt-welcome-page-integrations {
1383 padding: 40px 20px;
1384 }
1385
1386 .tpt-welcome-page-integration {
1387 width: 120px;
1388 }
1389
1390 .tpt-welcome-page-contact-us {
1391 padding: 40px 20px;
1392 }
1393
1394 .tpt-welcome-page-contact-us__title {
1395 font-size: 2em;
1396 }
1397 }
1398 </style>