PluginProbe
Tiered Pricing Table for WooCommerce / 8.0.2
Tiered Pricing Table for WooCommerce v8.0.2
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 / notifications / feedback-discount.php

feedback-discount.php in Tiered Pricing Table for WooCommerce 8.0.2, at views/admin/notifications/feedback-discount.php

395 lines 9.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php defined( 'WPINC' ) || die;
2
3 use TierPricingTable\Admin\Notifications\Notifications\TwoMonthsUsingDiscount;
4 use TierPricingTable\Core\ServiceContainer;
5 use TierPricingTable\TierPricingTablePlugin;
6
7 $fileManager = ServiceContainer::getInstance()->getFileManager();
8
9 /**
10 * Available variables
11 *
12 * @var TwoMonthsUsingDiscount $notification
13 */
14
15 // Kept the same feature list, just formatted for the new layout
16 $premiumFeatures = array(
17 'Dynamic, Role-Based Pricing',
18 'Percentage-Based Bulk Discounts',
19 'Smart In-Cart Upsells',
20 'Customizable Table Columns',
21 'Interactive, Clickable Tables',
22 'Min/Max Order Quantities',
23 'Instant Price Totals',
24 'Hide Prices for Guests',
25 'Show "As Low As" Prices',
26 );
27
28 $upgradeUrl = tpt_fs_activation_url();
29 $feedbackUrl = 'https://forms.gle/yWTt3aWuvZVQhbRZ7';
30
31 ?>
32
33 <style>
34 /* Scope everything to avoid conflicts - using 'tpt-feedback-banner' prefix */
35 .tpt-feedback-banner {
36 box-sizing: border-box;
37 /* Modern light gradient background */
38 background: linear-gradient(135deg, #ffffff 0%, #fdf2f8 100%);
39 border: 1px solid #dcdcde;
40 border-left: 5px solid #96598a; /* Primary color */
41 border-radius: 8px;
42 color: #3c434a;
43 margin: 20px 0 15px;
44 padding: 0;
45 position: relative;
46 font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
47 overflow: hidden;
48 box-shadow: 0 4px 10px rgba(0,0,0,0.05);
49 }
50
51 /* Close button */
52 .tpt-feedback-banner__close {
53 position: absolute;
54 top: 10px;
55 right: 15px;
56 color: #a7aaad;
57 text-decoration: none;
58 font-size: 20px;
59 line-height: 1;
60 transition: color 0.2s;
61 z-index: 10;
62 }
63 .tpt-feedback-banner__close:hover {
64 color: #3c434a;
65 }
66
67 .tpt-feedback-banner__inner {
68 display: flex;
69 flex-wrap: wrap;
70 padding: 25px;
71 gap: 30px;
72 }
73
74 /* Left Side: Call to Action */
75 .tpt-feedback-banner__cta-column {
76 flex: 1;
77 min-width: 300px;
78 display: flex;
79 flex-direction: column;
80 justify-content: center;
81 }
82
83 /* Plugin Name Badge */
84 .tpt-feedback-banner__plugin-badge {
85 display: inline-flex;
86 align-items: center;
87 gap: 6px;
88 background-color: #fdf2f8;
89 color: #96598a;
90 font-size: 11px;
91 font-weight: 700;
92 text-transform: uppercase;
93 letter-spacing: 0.5px;
94 padding: 5px 12px;
95 border-radius: 20px;
96 margin-bottom: 12px;
97 border: 1px solid rgba(150, 89, 138, 0.2);
98 box-shadow: 0 2px 4px rgba(150, 89, 138, 0.05);
99 align-self: flex-start;
100 }
101
102 .tpt-feedback-banner__plugin-badge::before {
103 content: '';
104 display: block;
105 width: 6px;
106 height: 6px;
107 background-color: #96598a;
108 border-radius: 50%;
109 }
110
111 .tpt-feedback-banner__headline {
112 font-size: 1.5em;
113 font-weight: 600;
114 margin-bottom: 15px;
115 line-height: 1.3;
116 color: #2c3338;
117 }
118
119 .tpt-feedback-banner__highlight {
120 color: #96598a;
121 font-weight: 700;
122 position: relative;
123 display: inline-block;
124 }
125
126 /* Underline effect for highlight */
127 .tpt-feedback-banner__highlight::after {
128 content: '';
129 position: absolute;
130 bottom: 2px;
131 left: 0;
132 width: 100%;
133 height: 8px;
134 background: rgba(150, 89, 138, 0.15);
135 z-index: -1;
136 transform: rotate(-1deg);
137 }
138
139 .tpt-feedback-banner__subtext {
140 font-size: 15px;
141 margin-top: 0;
142 margin-bottom: 25px;
143 color: #646970;
144 line-height: 1.6;
145 }
146
147 .tpt-feedback-banner__actions {
148 display: flex;
149 align-items: center;
150 flex-wrap: wrap;
151 gap: 15px;
152 }
153
154 /* Primary Button (Gradient) */
155 .tpt-feedback-banner__btn-primary {
156 background: linear-gradient(to right, #96598a, #b06ba3);
157 color: white !important;
158 text-decoration: none;
159 padding: 12px 24px;
160 border-radius: 50px;
161 font-weight: 600;
162 font-size: 14px;
163 border: none;
164 cursor: pointer;
165 position: relative;
166 overflow: hidden;
167 transition: transform 0.2s, box-shadow 0.2s;
168 display: inline-flex;
169 align-items: center;
170 gap: 8px;
171 box-shadow: 0 4px 6px rgba(150, 89, 138, 0.2);
172 }
173
174 .tpt-feedback-banner__btn-primary:hover {
175 transform: translateY(-2px);
176 box-shadow: 0 6px 12px rgba(150, 89, 138, 0.3);
177 color: white !important;
178 }
179
180 /* Shimmer Effect */
181 .tpt-feedback-banner__btn-primary::after {
182 content: '';
183 position: absolute;
184 top: 0;
185 left: -100%;
186 width: 100%;
187 height: 100%;
188 background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
189 animation: tpt-shimmer 3s infinite;
190 }
191
192 /* Secondary Button (Outline) */
193 .tpt-feedback-banner__btn-secondary {
194 background: transparent;
195 color: #96598a !important;
196 text-decoration: none;
197 padding: 11px 20px;
198 border-radius: 50px;
199 font-weight: 600;
200 font-size: 14px;
201 border: 1px solid #96598a;
202 cursor: pointer;
203 transition: all 0.2s;
204 display: inline-flex;
205 align-items: center;
206 gap: 6px;
207 }
208
209 .tpt-feedback-banner__btn-secondary:hover {
210 background: rgba(150, 89, 138, 0.05);
211 color: #7d4a73 !important;
212 }
213
214 .tpt-feedback-banner__dismiss {
215 font-size: 13px;
216 color: #8c8f94;
217 text-decoration: underline;
218 cursor: pointer;
219 margin-left: 5px;
220 }
221 .tpt-feedback-banner__dismiss:hover {
222 color: #3c434a;
223 }
224
225 /* Right Side: Features List */
226 .tpt-feedback-banner__features-column {
227 flex: 1.2;
228 min-width: 320px;
229 border-left: 1px solid rgba(0,0,0,0.05);
230 padding-left: 30px;
231 display: flex;
232 flex-direction: column;
233 justify-content: center;
234 background: rgba(255,255,255,0.4);
235 border-radius: 0 8px 8px 0;
236 }
237
238 .tpt-feedback-banner__features-title {
239 font-weight: 700;
240 font-size: 13px;
241 text-transform: uppercase;
242 letter-spacing: 0.5px;
243 margin-bottom: 15px;
244 color: #96598a;
245 opacity: 0.9;
246 }
247
248 .tpt-feedback-banner__features-list {
249 list-style: none;
250 padding: 0;
251 margin: 0;
252 display: grid;
253 grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
254 gap: 10px;
255 }
256
257 .tpt-feedback-banner__feature {
258 font-size: 13px;
259 font-weight: 500;
260 display: flex;
261 align-items: center;
262 gap: 10px;
263 color: #3c434a;
264 background: #fff;
265 padding: 10px 12px;
266 border-radius: 8px;
267 border: 1px solid rgba(0,0,0,0.05);
268 box-shadow: 0 2px 4px rgba(0,0,0,0.02);
269 transition: all 0.2s ease;
270 }
271
272 .tpt-feedback-banner__feature:hover {
273 transform: translateY(-2px);
274 box-shadow: 0 4px 12px rgba(150, 89, 138, 0.15);
275 border-color: rgba(150, 89, 138, 0.2);
276 color: #96598a;
277 }
278
279 .tpt-feedback-banner__feature i {
280 display: inline-flex;
281 align-items: center;
282 justify-content: center;
283 width: 20px;
284 height: 20px;
285 background-color: #eafaf1; /* Light green bg */
286 color: #2ed573; /* Green check */
287 border-radius: 50%;
288 font-style: normal;
289 font-size: 10px;
290 flex-shrink: 0;
291 }
292
293 @keyframes tpt-shimmer {
294 0% { left: -100%; }
295 20% { left: 100%; }
296 100% { left: 100%; }
297 }
298
299 /* Mobile Responsiveness */
300 @media screen and (max-width: 960px) {
301 .tpt-feedback-banner__inner {
302 flex-direction: column;
303 gap: 25px;
304 padding: 20px;
305 }
306 .tpt-feedback-banner__features-column {
307 border-left: none;
308 padding-left: 0;
309 border-top: 1px solid #dcdcde;
310 padding-top: 25px;
311 background: transparent;
312 }
313 }
314
315 @media screen and (max-width: 600px) {
316 .tpt-feedback-banner__actions {
317 flex-direction: column;
318 align-items: stretch;
319 }
320 .tpt-feedback-banner__btn-primary,
321 .tpt-feedback-banner__btn-secondary {
322 justify-content: center;
323 width: 100%;
324 box-sizing: border-box;
325 }
326 .tpt-feedback-banner__dismiss {
327 text-align: center;
328 display: block;
329 margin-left: 0;
330 margin-top: 10px;
331 }
332 }
333 </style>
334
335 <div class="tpt-feedback-banner notice">
336 <a href="<?php echo esc_attr( $notification->getCloseURL() ); ?>" class="tpt-feedback-banner__close" title="Dismiss">&times;</a>
337
338 <div class="tpt-feedback-banner__inner">
339
340 <!-- Left Column: CTA -->
341 <div class="tpt-feedback-banner__cta-column">
342
343 <span class="tpt-feedback-banner__plugin-badge">
344 Tiered Pricing Table for WooCommerce
345 </span>
346
347 <div class="tpt-feedback-banner__headline">
348 <span>🎁</span> We value your feedback!<br>
349 Help us improve and <span class="tpt-feedback-banner__highlight">Save 20%</span>
350 </div>
351
352 <div class="tpt-feedback-banner__subtext">
353 <p style="margin: 0 0 10px;">You've been using the plugin for a while now. We'd love to hear your thoughts!</p>
354 <p style="margin: 0;">
355 Answer 4 quick questions in our form and receive an
356 <b>exclusive 20% discount code</b> for the Premium version.
357 </p>
358 </div>
359
360 <div class="tpt-feedback-banner__actions">
361 <!-- Primary Action: Go to Form -->
362 <a href="<?php echo esc_url( $feedbackUrl ); ?>" target="_blank" class="tpt-feedback-banner__btn-primary">
363 Give Feedback & Get Coupon 📝
364 </a>
365
366 <!-- Secondary Action: Direct Upgrade -->
367 <a href="<?php echo esc_attr( $upgradeUrl ); ?>" class="tpt-feedback-banner__btn-secondary">
368 Upgrade Now 🚀
369 </a>
370
371 <a href="<?php echo esc_attr( $notification->getCloseURL() ); ?>" class="tpt-feedback-banner__dismiss">
372 No thanks
373 </a>
374 </div>
375
376 </div>
377
378 <!-- Right Column: Features -->
379 <div class="tpt-feedback-banner__features-column">
380 <div class="tpt-feedback-banner__features-title">Upgrade to unlock:</div>
381 <ul class="tpt-feedback-banner__features-list">
382 <?php foreach ( $premiumFeatures as $feature ) : ?>
383 <li class="tpt-feedback-banner__feature">
384 <i>✔</i> <?php echo esc_html( $feature ); ?>
385 </li>
386 <?php endforeach; ?>
387 </ul>
388
389 <div style="margin-top: 15px; font-size: 12px; color: #646970;">
390 Have questions? <a href="<?php echo esc_attr( TierPricingTablePlugin::getContactUsURL() ); ?>" target="_blank" style="color: #96598a; text-decoration: underline;">Contact our team</a>
391 </div>
392 </div>
393
394 </div>
395 </div>