PluginProbe
Product Labels, Quick View, Buy Now, Pre-Orders, Frequently Bought Together & More for WooCommerce – Merchant / 2.3.2
Product Labels, Quick View, Buy Now, Pre-Orders, Frequently Bought Together & More for WooCommerce – Merchant v2.3.2
2.3.2 2.3.1 2.3.0 2.2.8 2.2.7 trunk 1.10.0 1.10.1 1.10.2 1.10.3 1.10.4 1.10.5 1.11.0 1.11.1 1.11.2 1.6 1.7 1.8 1.8.1 1.8.2 1.8.3 1.9.0 1.9.1 1.9.10 1.9.11 All 60 releases
merchant / inc / modules / recent-sales-notifications / admin / options.php

options.php in Product Labels, Quick View, Buy Now, Pre-Orders, Frequently Bought Together & More for WooCommerce – Merchant 2.3.2, at inc/modules/recent-sales-notifications/admin/options.php

712 lines 26.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * Recent Sales Notifications module.
5 *
6 * @package Merchant
7 */
8
9 if ( ! defined( 'ABSPATH' ) ) {
10 exit; // Exit if accessed directly
11 }
12
13 return array(
14 array(
15 'title' => esc_html__( 'Timing Settings', 'merchant' ),
16 'module' => Merchant_Recent_Sales_Notifications::MODULE_ID,
17 'fields' => array(
18 array(
19 'id' => 'time_before_show_first_one',
20 'type' => 'number',
21 'min' => '0',
22 'title' => esc_html__( 'Seconds before the first notification is shown', 'merchant' ),
23 'default' => '8',
24 ),
25 array(
26 'id' => 'time_to_stay_on_screen',
27 'type' => 'number',
28 'min' => '0',
29 'title' => esc_html__( 'Time on screen (seconds)', 'merchant' ),
30 'default' => '8',
31 ),
32 array(
33 'id' => 'delay_between_notifications',
34 'type' => 'number',
35 'min' => '0',
36 'title' => esc_html__( 'Delay between notifications (seconds)', 'merchant' ),
37 'default' => '12',
38 ),
39 array(
40 'id' => 'notifications_per_session',
41 'type' => 'number',
42 'min' => '0',
43 'title' => esc_html__( 'Notifications per session', 'merchant' ),
44 'desc' => esc_html__( 'The maximum number of notifications shown to the same visitor during a browsing session.', 'merchant' ),
45 'default' => '6',
46 ),
47 ),
48 ),
49 array(
50 'title' => esc_html__( 'Notifications Control', 'merchant' ),
51 'module' => Merchant_Recent_Sales_Notifications::MODULE_ID,
52 'fields' => array(
53 array(
54 'id' => 'single_product_purchase',
55 'type' => 'fields_group',
56 'title' => esc_html__( 'Recent Purchases', 'merchant' ),
57 'sub-desc' => esc_html__( 'Display notifications of recent orders, optionally including customer details such as name and location.', 'merchant' ),
58 'state' => 'closed',
59 'default' => 'active',
60 'accordion' => true,
61 'display_status' => true,
62 'fields' => array(
63 array(
64 'id' => 'time_span',
65 'type' => 'number',
66 'title' => esc_html__( 'Time period', 'merchant' ),
67 'desc' => esc_html__( 'Search for orders within the last number of weeks, days or hours.',
68 'merchant' ),
69 'default' => '7',
70 'min' => '1',
71 ),
72 array(
73 'id' => 'time_unit',
74 'type' => 'select',
75 'title' => esc_html__( 'Time unit', 'merchant' ),
76 'options' => array(
77 'WEEK' => esc_html__( 'Weeks', 'merchant' ),
78 'DAY' => esc_html__( 'Days', 'merchant' ),
79 'HOUR' => esc_html__( 'Hours', 'merchant' ),
80 ),
81 'default' => 'DAY',
82 ),
83 array(
84 'id' => 'hide_date_for_old_events_than',
85 'type' => 'number',
86 'title' => esc_html__( 'Hide date for events older than (days)', 'merchant' ),
87 'desc' => esc_html__( 'For events that occurred before the specified number of days, the notification will not display the date.', 'merchant' ),
88 'default' => '5',
89 ),
90 array(
91 'id' => 'template_full_data',
92 'type' => 'text',
93 'label' => esc_html__( 'Full Data Template', 'merchant' ),
94 'desc' => esc_html__( 'Text template when name, country, and city are available.', 'merchant' ),
95 'default' => esc_html__( '{customer_name} in {country_code}, {city} purchased', 'merchant' ),
96 'hidden_desc' => sprintf(
97 /* Translators: %1$s: {customer_name}, %2$s: {country_code}, %3$s: {city} */
98 __(
99 'If you are based in the EU or you have customers from the EU, we recommend you to hide customer names for GDPR purposes. <br><br><strong>%1$s:</strong> displays the customer’s name<br>
100 <strong>%2$s:</strong> displays the customer’s country<br>
101 <strong>%3$s:</strong> displays the customer’s city',
102 'merchant'
103 ),
104 '{customer_name}',
105 '{country_code}',
106 '{city}'
107 ),
108 ),
109
110 // Text template when only the name is available
111 array(
112 'id' => 'template_name_only',
113 'type' => 'text',
114 'label' => esc_html__( 'Name Only Template', 'merchant' ),
115 'desc' => esc_html__( 'Text template when only name is available', 'merchant' ),
116 'default' => esc_html__( '{customer_name} purchased', 'merchant' ),
117 'hidden_desc' => sprintf(
118 /* Translators: %1$s: {customer_name} */
119 __(
120 'If you are based in the EU or you have customers from the EU, we recommend you to hide customer names for GDPR purposes. <br><br><strong>%1$s:</strong> displays the customer’s name',
121 'merchant'
122 ),
123 '{customer_name}'
124 ),
125 ),
126
127 // Fallback text template when no specific data is available
128 array(
129 'id' => 'template_no_data',
130 'type' => 'text',
131 'label' => esc_html__( 'Fallback Template', 'merchant' ),
132 'desc' => esc_html__( 'Text template when no customer data is available.', 'merchant' ),
133 'default' => esc_html__( 'Someone purchased', 'merchant' ),
134 ),
135 ),
136 ),
137 array(
138 'id' => 'product_purchases_count',
139 'type' => 'fields_group',
140 'title' => esc_html__( 'Sales Count', 'merchant' ),
141 'sub-desc' => esc_html__( 'Display the number of customers who purchased a specific product within a specified time period.', 'merchant' ),
142 'state' => 'closed',
143 'default' => 'active',
144 'accordion' => true,
145 'display_status' => true,
146 'fields' => array(
147 array(
148 'id' => 'minimum_purchases',
149 'type' => 'number',
150 'title' => esc_html__( 'Minimum number of purchases required', 'merchant' ),
151 'desc' => esc_html__( 'Set the minimum number of times a product must have been purchased in a period for a notification to be triggered.', 'merchant' ),
152 'default' => '5',
153 'min' => '1',
154 ),
155 array(
156 'id' => 'number_of_days',
157 'type' => 'number',
158 'title' => esc_html__( 'Time period (days)', 'merchant' ),
159 'desc' => esc_html__( 'Search for orders within the last number of days', 'merchant' ),
160 'default' => '7',
161 'min' => '1',
162 ),
163 array(
164 'id' => 'template_singular',
165 'type' => 'text',
166 'label' => esc_html__( 'Singular Template', 'merchant' ),
167 'desc' => esc_html__( 'Singular template for displaying the number of customers who have purchased a product in a period.', 'merchant' ),
168 'default' => esc_html__( '{count} customer bought this product in the last 7 days', 'merchant' ),
169 'hidden_desc' => sprintf(
170 /* Translators: %1$s: the customers count */
171 __(
172 '<strong>%1$s:</strong> displays number of customers who have purchased a product in specified period',
173 'merchant'
174 ),
175 '{count}'
176 ),
177 ),
178
179 // Plural template for displaying the number of customers who have purchased a product in a period
180 array(
181 'id' => 'template_plural',
182 'type' => 'text',
183 'label' => esc_html__( 'Plural Template', 'merchant' ),
184 'desc' => esc_html__( 'Plural template for displaying the number of customers who have purchased a product in a period.', 'merchant' ),
185 'default' => esc_html__( '{count} customers bought this product in the last 7 days', 'merchant' ),
186 'hidden_desc' => sprintf(
187 /* Translators: %1$s: the customers count */
188 __(
189 '<strong>%1$s:</strong> displays customers count',
190 'merchant'
191 ),
192 '{count}'
193 ),
194 ),
195 ),
196 ),
197
198 array(
199 'id' => 'product_carts_count',
200 'type' => 'fields_group',
201 'title' => esc_html__( 'Cart Summary', 'merchant' ),
202 'sub-desc' => esc_html__( 'Display the number of shoppers who added a specific product to their cart within a specified time period.', 'merchant' ),
203 'state' => 'closed',
204 'default' => 'active',
205 'accordion' => true,
206 'display_status' => true,
207 'fields' => array(
208 array(
209 'id' => 'minimum_count',
210 'type' => 'number',
211 'title' => esc_html__( 'Minimum number of add to carts required', 'merchant' ),
212 'desc' => esc_html__( 'Set the minimum number of times a product must be added to cart in a period for a notification to be triggered', 'merchant' ),
213 'default' => '2',
214 'min' => '1',
215 ),
216 array(
217 'id' => 'number_of_days',
218 'type' => 'number',
219 'title' => esc_html__( 'Time period (days)', 'merchant' ),
220 'desc' => esc_html__( 'Search for add to cart events within the last number of days', 'merchant' ),
221 'default' => '1',
222 'min' => '1',
223 ),
224 array(
225 'id' => 'template_singular',
226 'type' => 'text',
227 'label' => esc_html__( 'Singular Template', 'merchant' ),
228 'desc' => esc_html__( 'Singular text for displaying the number of customers who have added a product in their cart in a period.', 'merchant' ),
229 'default' => esc_html__( '{count} person added this product to their cart today', 'merchant' ),
230 'hidden_desc' => sprintf(
231 /* Translators: %1$s: the customers count */
232 __(
233 '<strong>%1$s:</strong> displays customers count',
234 'merchant'
235 ),
236 '{count}'
237 ),
238 ),
239
240 // Plural template for displaying the number of customers who have purchased a product in a period
241 array(
242 'id' => 'template_plural',
243 'type' => 'text',
244 'label' => esc_html__( 'Plural Template', 'merchant' ),
245 'desc' => esc_html__( 'Plural text for displaying the number of customers who have added a product in their cart in a period.', 'merchant' ),
246 'default' => esc_html__( '{count} people added this product to cart today', 'merchant' ),
247 'hidden_desc' => sprintf(
248 /* Translators: %1$s: the customers count */
249 __(
250 '<strong>%1$s:</strong> displays customers count',
251 'merchant'
252 ),
253 '{count}'
254 ),
255 ),
256 ),
257 ),
258 array(
259 'id' => 'single_product_add_to_cart',
260 'type' => 'fields_group',
261 'title' => esc_html__( 'Individual Cart Adds', 'merchant' ),
262 'sub-desc' => esc_html__( 'Display real-time notifications when shoppers add products to their cart, optionally including their name and location.', 'merchant' ),
263 'state' => 'closed',
264 'default' => 'active',
265 'accordion' => true,
266 'display_status' => true,
267 'fields' => array(
268 array(
269 'id' => 'time_span',
270 'type' => 'number',
271 'title' => esc_html__( 'Time period', 'merchant' ),
272 'desc' => esc_html__( 'Search for add to carts within the last number of weeks, days or hours.',
273 'merchant' ),
274 'default' => '2',
275 'min' => '1',
276 ),
277 array(
278 'id' => 'time_unit',
279 'type' => 'select',
280 'title' => esc_html__( 'Time unit', 'merchant' ),
281 'options' => array(
282 'WEEK' => esc_html__( 'Weeks', 'merchant' ),
283 'DAY' => esc_html__( 'Days', 'merchant' ),
284 'HOUR' => esc_html__( 'Hours', 'merchant' ),
285 ),
286 'default' => 'HOUR',
287 ),
288 array(
289 'id' => 'hide_date_for_old_events_than',
290 'type' => 'number',
291 'title' => esc_html__( 'Hide date for events older than (days)', 'merchant' ),
292 'desc' => esc_html__( 'For events that occurred before the specified number of days, the notification will not display the date.', 'merchant' ),
293 'default' => '5',
294 ),
295 array(
296 'id' => 'template_full_data',
297 'type' => 'text',
298 'label' => esc_html__( 'Full Data Template', 'merchant' ),
299 'desc' => esc_html__( 'Text template when name, country, and city are available.', 'merchant' ),
300 'default' => esc_html__( '{customer_name} in {country_code}, {city} added this to their cart', 'merchant' ),
301 'hidden_desc' => sprintf(
302 /* Translators: %1$s: {customer_name}, %2$s: {country_code}, %3$s: {city} */
303 __(
304 'If you are based in the EU or you have customers from the EU, we recommend you to hide customer names for GDPR purposes. <br><br><strong>%1$s:</strong> displays the customer’s name<br>
305 <strong>%2$s:</strong> displays the customer’s country<br>
306 <strong>%3$s:</strong> displays the customer’s city',
307 'merchant'
308 ),
309 '{customer_name}',
310 '{country_code}',
311 '{city}'
312 ),
313 ),
314
315 // Text template when only the name is available
316 array(
317 'id' => 'template_name_only',
318 'type' => 'text',
319 'label' => esc_html__( 'Name Only Template', 'merchant' ),
320 'desc' => esc_html__( 'Text template when only name is available', 'merchant' ),
321 'default' => esc_html__( '{customer_name} added this to their cart', 'merchant' ),
322 'hidden_desc' => sprintf(
323 /* Translators: %1$s: {customer_name} */
324 __(
325 'If you are based in the EU or you have customers from the EU, we recommend you to hide customer names for GDPR purposes. <br><br><strong>%1$s:</strong> displays the customer’s name',
326 'merchant'
327 ),
328 '{customer_name}'
329 ),
330 ),
331
332 // Fallback text template when no specific data is available
333 array(
334 'id' => 'template_no_data',
335 'type' => 'text',
336 'label' => esc_html__( 'Fallback Template', 'merchant' ),
337 'desc' => esc_html__( 'Text template when no customer data is available.', 'merchant' ),
338 'default' => esc_html__( 'Someone added this to their cart', 'merchant' ),
339 ),
340 ),
341 ),
342 array(
343 'id' => 'product_views_settings',
344 'type' => 'fields_group',
345 'title' => esc_html__( 'Visitors Count', 'merchant' ),
346 'sub-desc' => esc_html__( 'Display the number of shoppers who viewed a specific product within a specified time period.', 'merchant' ),
347 'state' => 'closed',
348 'default' => 'active',
349 'accordion' => true,
350 'display_status' => true,
351 'fields' => array(
352 array(
353 'id' => 'time_span',
354 'type' => 'number',
355 'title' => esc_html__( 'Time period', 'merchant' ),
356 'desc' => esc_html__( 'Choose the number of days, weeks, or another time unit to define the period for displaying the count of shoppers who viewed a product.',
357 'merchant' ),
358 'default' => '1',
359 'min' => '1',
360 ),
361 array(
362 'id' => 'time_unit',
363 'type' => 'select',
364 'title' => esc_html__( 'Time unit', 'merchant' ),
365 'options' => array(
366 'WEEK' => esc_html__( 'Weeks', 'merchant' ),
367 'DAY' => esc_html__( 'Days', 'merchant' ),
368 'HOUR' => esc_html__( 'Hours', 'merchant' ),
369 ),
370 'default' => 'DAY',
371 ),
372 array(
373 'id' => 'template_singular',
374 'type' => 'text',
375 'label' => esc_html__( 'Singular Template', 'merchant' ),
376 'desc' => esc_html__( 'Singular template for displaying the number of people who have viewed a product in a period.', 'merchant' ),
377 'default' => esc_html__( '{count} person has viewed this today', 'merchant' ),
378 'hidden_desc' => sprintf(
379 /* Translators: %1$s: the customers count */
380 __(
381 '<strong>%1$s:</strong> displays customers count',
382 'merchant'
383 ),
384 '{count}'
385 ),
386 ),
387
388 // Plural template for displaying the number of customers who have purchased a product in a period
389 array(
390 'id' => 'template_plural',
391 'type' => 'text',
392 'label' => esc_html__( 'Plural Template', 'merchant' ),
393 'desc' => esc_html__( 'Plural template for displaying the number of people who have viewed a product in a period.', 'merchant' ),
394 'default' => esc_html__( '{count} people have viewed this today', 'merchant' ),
395 'hidden_desc' => sprintf(
396 /* Translators: %1$s: the customers count */
397 __(
398 '<strong>%1$s:</strong> displays customers count',
399 'merchant'
400 ),
401 '{count}'
402 ),
403 ),
404 ),
405 ),
406 ),
407 ),
408 array(
409 'title' => esc_html__( 'Custom Settings', 'merchant' ),
410 'module' => Merchant_Recent_Sales_Notifications::MODULE_ID,
411 'fields' => array(
412 array(
413 'id' => 'customer_name_format',
414 'type' => 'select',
415 'title' => esc_html__( 'Customer Name Format', 'merchant' ),
416 'options' => array(
417 'firstname' => esc_html__( 'First Name', 'merchant' ),
418 'lastname' => esc_html__( 'Last Name', 'merchant' ),
419 'firstname_initial' => esc_html__( 'First Name + Initial', 'merchant' ),
420 'lastname_initial' => esc_html__( 'Initial + Last Name', 'merchant' ),
421 'full' => esc_html__( 'Full Name', 'merchant' ),
422 ),
423 'default' => 'full',
424 'desc' => esc_html__( 'Choose how the customer’s name will be displayed in notifications.', 'merchant' ),
425 ),
426
427 array(
428 'id' => 'hide_on_mobile',
429 'type' => 'checkbox',
430 'label' => esc_html__( 'Hide on Mobile', 'merchant' ),
431 'desc' => esc_html__( 'Because the mobile screen is much smaller, you might not want to take up space with this module.', 'merchant' ),
432 'default' => true,
433 ),
434 array(
435 'id' => 'hide_on_desktop',
436 'type' => 'checkbox',
437 'label' => esc_html__( 'Hide on Desktop', 'merchant' ),
438 'desc' => esc_html__( 'If you want to disable the Recent Sales Notifications on desktop, you can do it here.', 'merchant' ),
439 'default' => false,
440 ),
441 array(
442 'id' => 'shuffle_notifications',
443 'type' => 'checkbox',
444 'label' => esc_html__( 'Shuffle Notifications', 'merchant' ),
445 'desc' => esc_html__( 'If you want to shuffle the notifications, you can do it here.', 'merchant' ),
446 'default' => true,
447 ),
448 array(
449 'id' => 'hide_product_image',
450 'type' => 'checkbox',
451 'label' => esc_html__( 'Hide product image', 'merchant' ),
452 'desc' => esc_html__( 'If turned on, product image will be hidden from notification banners.', 'merchant' ),
453 'default' => false,
454 ),
455 array(
456 'id' => 'hide_product_name',
457 'type' => 'checkbox',
458 'label' => esc_html__( 'Hide product name from notifications', 'merchant' ),
459 'desc' => esc_html__( 'If turned on, product names will be hidden from notification banners.', 'merchant' ),
460 'default' => false,
461 ),
462 array(
463 'id' => 'product_exclusion',
464 'type' => 'switcher',
465 'title' => __( 'Product Exclusion', 'merchant' ),
466 'default' => 0,
467 'ai_meta' => array(
468 'toggle_for' => 'excluded_products',
469 'semantic_group' => 'product_exclusion',
470 'usage_hint' => 'Enable this toggle before setting excluded_products. When on, notifications will not be shown for the selected products.',
471 ),
472 ),
473 array(
474 'id' => 'excluded_products',
475 'type' => 'products_selector',
476 'title' => esc_html__( 'Exclude products', 'merchant' ),
477 'multiple' => true,
478 'allowed_types' => array( 'simple', 'variable' ),
479 'conditions' => array(
480 'relation' => 'AND', // AND/OR, If not provided, only first term will be considered
481 'terms' => array(
482 array(
483 'field' => 'product_exclusion', // field ID
484 'operator' => '===', // Available operators: ===, !==, >, <, >=, <=, in, !in, contains, !contains
485 'value' => true, // can be a single value or an array of string/number/int
486 ),
487 ),
488 ),
489 'ai_meta' => array(
490 'entity' => 'product',
491 'reference_type' => 'static',
492 'value_format' => 'product_id',
493 'semantic_group' => 'product_exclusion',
494 'abstraction_level' => 1,
495 'toggled_by' => 'product_exclusion',
496 'usage_hint' => 'Products selected here will never trigger a sales notification. Requires product_exclusion=true. Static: only the listed products are excluded.',
497 ),
498 ),
499 ),
500 ),
501 array(
502 'title' => esc_html__( 'Look and Feel', 'merchant' ),
503 'module' => Merchant_Recent_Sales_Notifications::MODULE_ID,
504 'fields' => array(
505 array(
506 'id' => 'slide_from',
507 'type' => 'select',
508 'title' => esc_html__( 'Slide from', 'merchant' ),
509 'options' => array(
510 'top-right' => esc_html__( 'Top Right', 'merchant' ),
511 'top-left' => esc_html__( 'Top Left', 'merchant' ),
512 'bottom-right' => esc_html__( 'Bottom Right', 'merchant' ),
513 'bottom-left' => esc_html__( 'Bottom Left', 'merchant' ),
514 ),
515 'default' => 'bottom-left',
516 'desc' => esc_html__( 'The direction from which the notification box will slide from.', 'merchant' ),
517 ),
518 array(
519 'id' => 'layout',
520 'type' => 'image_picker',
521 'title' => esc_html__( 'Select layout', 'merchant' ),
522 'options' => array(
523 'layout-1' => array(
524 'image' => MERCHANT_URI . 'assets/images/modules/recent-sales-notifications/layout-1.png',
525 'title' => esc_html__( 'Layout 1', 'merchant' ),
526 ),
527 'layout-2' => array(
528 'image' => MERCHANT_URI . 'assets/images/modules/recent-sales-notifications/layout-2.png',
529 'title' => esc_html__( 'Layout 2', 'merchant' ),
530 ),
531 'layout-3' => array(
532 'image' => MERCHANT_URI . 'assets/images/modules/recent-sales-notifications/layout-3.png',
533 'title' => esc_html__( 'Layout 3', 'merchant' ),
534 ),
535 'layout-4' => array(
536 'image' => MERCHANT_URI . 'assets/images/modules/recent-sales-notifications/layout-4.png',
537 'title' => esc_html__( 'Layout 4', 'merchant' ),
538 ),
539 ),
540 'default' => 'layout-1',
541 'desc' => esc_html__( 'Choose the layout & style of the notification box.', 'merchant' ),
542 ),
543 array(
544 'id' => 'notification_box_width',
545 'type' => 'range',
546 'min' => '250',
547 'max' => '1000',
548 'step' => '1',
549 'unit' => 'PX',
550 'default' => '420',
551 'title' => esc_html__( 'Notification box width', 'merchant' ),
552 'desc' => esc_html__( 'The width of the notification box.', 'merchant' ),
553 ),
554 array(
555 'id' => 'notification_box_radius',
556 'type' => 'range',
557 'min' => '0',
558 'max' => '100',
559 'step' => '1',
560 'unit' => 'PX',
561 'default' => '0',
562 'title' => esc_html__( 'Notification corner radius', 'merchant' ),
563 'desc' => esc_html__( 'The corner radius of the notification box.', 'merchant' ),
564 ),
565 array(
566 'id' => 'product_image_radius',
567 'type' => 'range',
568 'min' => '0',
569 'max' => '100',
570 'step' => '1',
571 'unit' => 'PX',
572 'default' => '0',
573 'title' => esc_html__( 'Product image radius', 'merchant' ),
574 'desc' => esc_html__( 'The corner radius of the product image.', 'merchant' ),
575 ),
576 array(
577 'id' => 'theme_type',
578 'type' => 'radio',
579 'title' => esc_html__( 'Choose theme', 'merchant' ),
580 'desc' => esc_html__( 'Choose the theme of the notification box.', 'merchant' ),
581 'options' => array(
582 'custom' => esc_html__( 'Custom', 'merchant' ),
583 'template' => esc_html__( 'Template', 'merchant' ),
584 ),
585 'default' => 'custom',
586 ),
587 array(
588 'id' => 'theme',
589 'type' => 'image_picker',
590 'title' => esc_html__( 'Select layout', 'merchant' ),
591 'options' => array(
592 'new_year' => array(
593 'image' => MERCHANT_URI . 'assets/images/modules/recent-sales-notifications/new_year.png',
594 'title' => esc_html__( 'New Year', 'merchant' ),
595 ),
596 'halloween' => array(
597 'image' => MERCHANT_URI . 'assets/images/modules/recent-sales-notifications/halloween.png',
598 'title' => esc_html__( 'Halloween', 'merchant' ),
599 ),
600 'christmas' => array(
601 'image' => MERCHANT_URI . 'assets/images/modules/recent-sales-notifications/christmas.png',
602 'title' => esc_html__( 'Christmas', 'merchant' ),
603 ),
604 'black_friday' => array(
605 'image' => MERCHANT_URI . 'assets/images/modules/recent-sales-notifications/black_friday.png',
606 'title' => esc_html__( 'Black Friday', 'merchant' ),
607 ),
608 'cyber_monday' => array(
609 'image' => MERCHANT_URI . 'assets/images/modules/recent-sales-notifications/cyber_monday.png',
610 'title' => esc_html__( 'Cyber Monday', 'merchant' ),
611 ),
612 'valentine' => array(
613 'image' => MERCHANT_URI . 'assets/images/modules/recent-sales-notifications/valentine.png',
614 'title' => esc_html__( 'Valentine', 'merchant' ),
615 ),
616 'spring' => array(
617 'image' => MERCHANT_URI . 'assets/images/modules/recent-sales-notifications/spring.png',
618 'title' => esc_html__( 'Spring', 'merchant' ),
619 ),
620 'thanks_giving' => array(
621 'image' => MERCHANT_URI . 'assets/images/modules/recent-sales-notifications/thanks_giving.png',
622 'title' => esc_html__( 'Thanksgiving', 'merchant' ),
623 ),
624 ),
625 'default' => 'new_year',
626 'conditions' => array(
627 'terms' => array(
628 array(
629 'field' => 'theme_type', // field ID
630 'operator' => '===', // Available operators: ===, !==, >, <, >=, <=, in, !in, contains, !contains
631 'value' => 'template', // can be a single value or an array of string/number/int
632 ),
633 ),
634 ),
635 ),
636 array(
637 'id' => 'background_image',
638 'type' => 'upload',
639 'drag_drop' => true,
640 'title' => esc_html__( 'Upload custom background image', 'merchant' ),
641 'label' => esc_html__( 'Click to upload or drag and drop', 'merchant' ),
642 'desc' => esc_html__( 'The selected image will automatically adjust to fit and center within the notification box. An ideal size is 420px by 110px.',
643 'merchant' ),
644 'conditions' => array(
645 'terms' => array(
646 array(
647 'field' => 'theme_type', // field ID
648 'operator' => '===', // Available operators: ===, !==, >, <, >=, <=, in, !in, contains, !contains
649 'value' => 'template', // can be a single value or an array of string/number/int
650 ),
651 ),
652 ),
653 ),
654 array(
655 'id' => 'background_color',
656 'type' => 'color',
657 'title' => esc_html__( 'Background color', 'merchant' ),
658 'default' => '#ffffff',
659 'desc' => esc_html__( 'The background color of the notification box.', 'merchant' ),
660 'conditions' => array(
661 'terms' => array(
662 array(
663 'field' => 'theme_type', // field ID
664 'operator' => '===', // Available operators: ===, !==, >, <, >=, <=, in, !in, contains, !contains
665 'value' => 'custom', // can be a single value or an array of string/number/int
666 ),
667 ),
668 ),
669 ),
670 array(
671 'id' => 'close_btn_color',
672 'type' => 'color',
673 'title' => esc_html__( 'Close button color', 'merchant' ),
674 'default' => '#000',
675 'desc' => esc_html__( 'The color of the close button.', 'merchant' ),
676 ),
677 array(
678 'id' => 'close_btn_bg_color',
679 'type' => 'color',
680 'title' => esc_html__( 'Close button background color', 'merchant' ),
681 'default' => '#f3f3f3',
682 'desc' => esc_html__( 'The background color of the close button.', 'merchant' ),
683 ),
684 array(
685 'id' => 'border_color',
686 'type' => 'color',
687 'title' => esc_html__( 'Border color', 'merchant' ),
688 'default' => '#ffffff',
689 'desc' => esc_html__( 'The color of the border.', 'merchant' ),
690 ),
691 array(
692 'id' => 'message_color',
693 'type' => 'color',
694 'title' => esc_html__( 'Notification message color', 'merchant' ),
695 'default' => '#000000',
696 ),
697 array(
698 'id' => 'product_name_color',
699 'type' => 'color',
700 'title' => esc_html__( 'Product name color', 'merchant' ),
701 'default' => '#000000',
702 ),
703 array(
704 'id' => 'time_color',
705 'type' => 'color',
706 'title' => esc_html__( 'Time color', 'merchant' ),
707 'default' => '#919191',
708 ),
709 ),
710 ),
711 );
712