PluginProbe
Product Labels, Quick View, Buy Now, Pre-Orders, Frequently Bought Together & More for WooCommerce – Merchant / 2.3.0
Product Labels, Quick View, Buy Now, Pre-Orders, Frequently Bought Together & More for WooCommerce – Merchant v2.3.0
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 / side-cart / admin / options.php

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

778 lines 28.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * Side Cart — Option group definitions.
5 *
6 * Pure data file. Returns the option groups array
7 * consumed by init_option_groups().
8 *
9 * @package Merchant
10 */
11
12 if ( ! defined( 'ABSPATH' ) ) {
13 exit; // Exit if accessed directly
14 }
15
16 return array(
17 array(
18 'module' => Merchant_Side_Cart::MODULE_ID,
19 'title' => esc_html__( 'Display Settings', 'merchant' ),
20 'fields' => array(
21 array(
22 'id' => 'show_after_add_to_cart',
23 'type' => 'switcher',
24 'title' => esc_html__( 'Shop Page', 'merchant' ),
25 'desc' => esc_html__( 'Show side cart after adding product to the cart from shop archive page', 'merchant' ),
26 'default' => 1,
27 ),
28 array(
29 'id' => 'show_after_add_to_cart_single_product',
30 'type' => 'switcher',
31 'title' => esc_html__( 'Product Page', 'merchant' ),
32 'desc' => esc_html__( 'Display side cart after adding product to the cart from product single page', 'merchant' ),
33 'default' => 0,
34 ),
35 array(
36 'id' => 'show_on_cart_url_click',
37 'type' => 'switcher',
38 'title' => esc_html__( 'Cart Icons', 'merchant' ),
39 'desc' => esc_html__( 'Show side cart when a user clicks on the cart URL or menu items', 'merchant' ),
40 'default' => 1,
41 ),
42 array(
43 'id' => 'slide_direction',
44 'type' => 'radio',
45 'title' => esc_html__( 'Cart position', 'merchant' ),
46 'options' => array(
47 'right' => esc_html__( 'Slide from right', 'merchant' ),
48 'left' => esc_html__( 'Slide from left', 'merchant' ),
49 ),
50 'default' => 'right',
51 ),
52 array(
53 'id' => 'use_discount_codes',
54 'type' => 'switcher',
55 'title' => esc_html__( 'Show discount codes input', 'merchant' ),
56 'default' => 0,
57 ),
58 array(
59 'id' => 'show_checkout_btn',
60 'type' => 'switcher',
61 'title' => esc_html__( 'Show checkout button', 'merchant' ),
62 'default' => 1,
63 ),
64 array(
65 'id' => 'checkout_btn_text',
66 'type' => 'text',
67 // 'title' => esc_html__( 'Placement', 'merchant' ),
68 'default' => esc_html__( 'Checkout', 'merchant' ),
69 'conditions' => array(
70 'relation' => 'AND', // AND/OR, If not provided, only first term will be considered
71 'terms' => array(
72 array(
73 'field' => 'show_checkout_btn', // field ID
74 'operator' => '===', // Available operators: ===, !==, >, <, >=, <=, in, !in, contains, !contains
75 'value' => true, // can be a single value or an array of string/number/int
76 ),
77 ),
78 ),
79 ),
80 array(
81 'id' => 'show_view_cart_btn',
82 'type' => 'switcher',
83 'title' => esc_html__( 'Show view cart button', 'merchant' ),
84 'default' => 1,
85 ),
86 array(
87 'id' => 'view_cart_btn_text',
88 'type' => 'text',
89 // 'title' => esc_html__( 'Placement', 'merchant' ),
90 'default' => esc_html__( 'View Cart', 'merchant' ),
91 'conditions' => array(
92 'relation' => 'AND', // AND/OR, If not provided, only first term will be considered
93 'terms' => array(
94 array(
95 'field' => 'show_view_cart_btn', // field ID
96 'operator' => '===', // Available operators: ===, !==, >, <, >=, <=, in, !in, contains, !contains
97 'value' => true, // can be a single value or an array of string/number/int
98 ),
99 ),
100 ),
101 ),
102 array(
103 'id' => 'use_strikethrough_prices',
104 'type' => 'switcher',
105 'title' => esc_html__( 'Show strikethrough prices', 'merchant' ),
106 'default' => 1,
107 ),
108 array(
109 'id' => 'show_savings',
110 'type' => 'switcher',
111 'title' => esc_html__( 'Show cart savings', 'merchant' ),
112 'default' => 0,
113 ),
114 array(
115 'id' => 'show_on_devices',
116 'type' => 'checkbox_multiple',
117 'title' => esc_html__( 'Show on devices', 'merchant' ),
118 'options' => array(
119 'desktop' => esc_html__( 'Desktop', 'merchant' ),
120 'mobile' => esc_html__( 'Mobile', 'merchant' ),
121 ),
122 'default' => array( 'desktop', 'mobile' ),
123 ),
124 ),
125 ),
126 array(
127 'module' => Merchant_Side_Cart::MODULE_ID,
128 'title' => esc_html__( 'Upsells', 'merchant' ),
129 'fields' => array(
130 array(
131 'id' => 'use_upsells',
132 'type' => 'switcher',
133 'title' => esc_html__( 'Cart Upsells', 'merchant' ),
134 'desc' => esc_html__( 'Enable upsell products in the side cart', 'merchant' ),
135 'default' => 0,
136 ),
137 array(
138 'id' => 'upsells_type',
139 'type' => 'select',
140 //'title' => esc_html__( 'Placement', 'merchant' ),
141 'options' => array(
142 'related_products' => esc_html__( 'Related Products', 'merchant' ),
143 'custom_upsell' => esc_html__( 'Custom Upsells', 'merchant' ),
144 ),
145 'default' => 'related_products',
146 'conditions' => array(
147 'relation' => 'AND', // AND/OR, If not provided, only first term will be considered
148 'terms' => array(
149 array(
150 'field' => 'use_upsells', // field ID
151 'operator' => '===', // Available operators: ===, !==, >, <, >=, <=, in, !in, contains, !contains
152 'value' => true, // can be a single value or an array of string/number/int
153 ),
154 ),
155 ),
156 ),
157
158 array(
159 'id' => 'custom_upsells',
160 'type' => 'flexible_content',
161 'sorting' => true,
162 'accordion' => true,
163 'duplicate' => false,
164 'style' => Merchant_Side_Cart::MODULE_ID . '-style default',
165 'button_label' => esc_html__( 'Add New Upsell', 'merchant' ),
166 'conditions' => array(
167 'relation' => 'AND', // AND/OR, If not provided, only first term will be considered
168 'terms' => array(
169 array(
170 'field' => 'use_upsells', // field ID
171 'operator' => '===', // Available operators: ===, !==, >, <, >=, <=, in, !in, contains, !contains
172 'value' => true, // can be a single value or an array of string/number/int
173 ),
174 array(
175 'field' => 'upsells_type', // field ID
176 'operator' => '===', // Available operators: ===, !==, >, <, >=, <=, in, !in, contains, !contains
177 'value' => 'custom_upsell', // can be a single value or an array of string/number/int
178 ),
179 ),
180 ),
181 'default' => array(
182 array(
183 'layout' => 'upsell-details',
184 'upsell_based_on' => 'products',
185 'exclude_product_ids' => 0,
186 'custom_upsell_type' => 'products',
187 ),
188 ),
189 'layouts' => array(
190 'upsell-details' => array(
191 'title' => esc_html__( 'Custom Upsells', 'merchant' ),
192 'title-field' => 'offer-title', // text field ID to use as title for the layout
193 'fields' => array(
194 array(
195 'id' => 'upsell_based_on',
196 'type' => 'select',
197 'title' => esc_html__( 'Trigger to add the upsell for', 'merchant' ),
198 'options' => array(
199 'all' => esc_html__( 'All products', 'merchant' ),
200 'products' => esc_html__( 'Specific product', 'merchant' ),
201 'categories' => esc_html__( 'Specific category', 'merchant' ),
202 ),
203 'default' => 'products',
204 'ai_meta' => array(
205 'semantic_group' => 'product_targeting',
206 'usage_hint' => 'Controls which cart products trigger this upsell. Set this BEFORE setting product_ids or category_slugs — those fields are conditional on this value.',
207 ),
208 ),
209 array(
210 'id' => 'product_ids',
211 'type' => 'products_selector',
212 'title' => esc_html__( 'Select product(s)', 'merchant' ),
213 'multiple' => true,
214 'desc' => esc_html__( 'Select the product(s) that you want to add the upsell for', 'merchant' ),
215 'allowed_types' => array( 'simple', 'variable' ),
216 'conditions' => array(
217 'relation' => 'AND', // AND/OR, If not provided, only first term will be considered
218 'terms' => array(
219 array(
220 'field' => 'upsell_based_on', // field ID
221 'operator' => '===', // Available operators: ===, !==, >, <, >=, <=, in, !in, contains, !contains
222 'value' => 'products', // can be a single value or an array of string/number/int
223 ),
224 ),
225 ),
226 'ai_meta' => array(
227 'entity' => 'product',
228 'reference_type' => 'static',
229 'value_format' => 'product_id',
230 'semantic_group' => 'product_targeting',
231 'abstraction_level' => 1,
232 'usage_hint' => 'Use when triggering the upsell for specific individual products in the cart. Requires upsell_based_on=products.',
233 ),
234 ),
235 array(
236 'id' => 'category_slugs',
237 'type' => 'select_ajax',
238 'title' => esc_html__( 'Select categories', 'merchant' ),
239 'source' => 'options',
240 'multiple' => true,
241 'options' => Merchant_Admin_Options::get_category_select2_choices(),
242 'placeholder' => esc_html__( 'Search categories', 'merchant' ),
243 'desc' => esc_html__( 'Select the categories that you want to add the upsell for.', 'merchant' ),
244 'conditions' => array(
245 'relation' => 'AND', // AND/OR, If not provided, only first term will be considered
246 'terms' => array(
247 array(
248 'field' => 'upsell_based_on', // field ID
249 'operator' => '===', // Available operators: ===, !==, >, <, >=, <=, in, !in, contains, !contains
250 'value' => 'categories', // can be a single value or an array of string/number/int
251 ),
252 ),
253 ),
254 'ai_meta' => array(
255 'entity' => 'category',
256 'reference_type' => 'dynamic',
257 'taxonomy' => 'product_cat',
258 'value_format' => 'slug',
259 'semantic_group' => 'product_targeting',
260 'abstraction_level' => 3,
261 'usage_hint' => 'Use when triggering the upsell for products from specific categories in the cart. Dynamic: future products in the category are included. Requires upsell_based_on=categories.',
262 ),
263 ),
264 array(
265 'id' => 'exclusion_toggle',
266 'type' => 'switcher',
267 'title' => esc_html__( 'Exclusion List', 'merchant' ),
268 'desc' => esc_html__( 'Select products that will not display upsells.', 'merchant' ),
269 'default' => 0,
270 'conditions' => array(
271 'relation' => 'AND', // AND/OR, If not provided, only first term will be considered
272 'terms' => array(
273 array(
274 'field' => 'upsell_based_on', // field ID
275 'operator' => 'in', // Available operators: ===, !==, >, <, >=, <=, in, !in, contains, !contains
276 'value' => array( 'all', 'categories' ), // can be a single value or an array of string/number/int
277 ),
278 ),
279 ),
280 'ai_meta' => array(
281 'toggle_for' => 'excluded_product_ids',
282 'semantic_group' => 'product_exclusion',
283 'usage_hint' => 'Enable this toggle before setting excluded_product_ids or excluded_category_slugs. Only available when upsell_based_on is all or categories.',
284 ),
285 ),
286 array(
287 'id' => 'excluded_product_ids',
288 'type' => 'products_selector',
289 'title' => esc_html__( 'Exclude products', 'merchant' ),
290 'multiple' => true,
291 'desc' => esc_html__( 'Upsell will not be displayed for selected products.', 'merchant' ),
292 'allowed_types' => array( 'simple', 'variable' ),
293 'conditions' => array(
294 'relation' => 'OR', // AND/OR, If not provided, only first term will be considered
295 'terms' => array(
296 array(
297 'relation' => 'AND', // AND/OR, If not provided, only first term will be considered
298 'terms' => array(
299 array(
300 'field' => 'upsell_based_on', // field ID
301 'operator' => '===', // Available operators: ===, !==, >, <, >=, <=, in, !in, contains, !contains
302 'value' => 'all', // can be a single value or an array of string/number/int
303 ),
304 array(
305 'field' => 'exclusion_toggle', // field ID
306 'operator' => '===', // Available operators: ===, !==, >, <, >=, <=, in, !in, contains, !contains
307 'value' => true, // can be a single value or an array of string/number/int
308 ),
309 ),
310 ),
311 array(
312 'relation' => 'AND', // AND/OR, If not provided, only first term will be considered
313 'terms' => array(
314 array(
315 'field' => 'upsell_based_on', // field ID
316 'operator' => '===', // Available operators: ===, !==, >, <, >=, <=, in, !in, contains, !contains
317 'value' => 'categories', // can be a single value or an array of string/number/int
318 ),
319 array(
320 'field' => 'exclusion_toggle', // field ID
321 'operator' => '===', // Available operators: ===, !==, >, <, >=, <=, in, !in, contains, !contains
322 'value' => true, // can be a single value or an array of string/number/int
323 ),
324 ),
325 ),
326 ),
327 ),
328 'ai_meta' => array(
329 'entity' => 'product',
330 'reference_type' => 'static',
331 'value_format' => 'product_id',
332 'semantic_group' => 'product_exclusion',
333 'abstraction_level' => 1,
334 'toggled_by' => 'exclusion_toggle',
335 'usage_hint' => 'Products in the cart that will NOT show this upsell. Requires exclusion_toggle=true.',
336 ),
337 ),
338 array(
339 'id' => 'excluded_category_slugs',
340 'type' => 'select_ajax',
341 'title' => esc_html__( 'Exclude categories', 'merchant' ),
342 'source' => 'options',
343 'multiple' => true,
344 'options' => Merchant_Admin_Options::get_category_select2_choices(),
345 'placeholder' => esc_html__( 'Search categories', 'merchant' ),
346 'desc' => esc_html__( 'Upsell will not be displayed for selected category products.', 'merchant' ),
347 'conditions' => array(
348 'relation' => 'AND', // AND/OR, If not provided, only first term will be considered
349 'terms' => array(
350 array(
351 'field' => 'upsell_based_on', // field ID
352 'operator' => '===', // Available operators: ===, !==, >, <, >=, <=, in, !in, contains, !contains
353 'value' => 'all', // can be a single value or an array of string/number/int
354 ),
355 array(
356 'field' => 'exclusion_toggle', // field ID
357 'operator' => '===', // Available operators: ===, !==, >, <, >=, <=, in, !in, contains, !contains
358 'value' => true, // can be a single value or an array of string/number/int
359 ),
360 ),
361 ),
362 'ai_meta' => array(
363 'entity' => 'category',
364 'reference_type' => 'dynamic',
365 'taxonomy' => 'product_cat',
366 'value_format' => 'slug',
367 'semantic_group' => 'product_exclusion',
368 'abstraction_level' => 3,
369 'toggled_by' => 'exclusion_toggle',
370 'usage_hint' => 'Cart products from these categories will NOT trigger this upsell. Dynamic: future products in the category are automatically excluded. Requires exclusion_toggle=true and upsell_based_on=all.',
371 ),
372 ),
373 array(
374 'id' => 'custom_upsell_type',
375 'type' => 'select',
376 'title' => esc_html__( 'Trigger upsells', 'merchant' ),
377 'options' => array(
378 'products' => esc_html__( 'Specific product', 'merchant' ),
379 'categories' => esc_html__( 'Specific category', 'merchant' ),
380 ),
381 'default' => 'products',
382 'ai_meta' => array(
383 'usage_hint' => 'Controls whether the recommended upsell products are selected individually or by category. Set this BEFORE setting upsells_product_ids or upsells_category_slugs.',
384 ),
385 ),
386 array(
387 'id' => 'upsells_product_ids',
388 'type' => 'products_selector',
389 'title' => esc_html__( 'Select product(s)', 'merchant' ),
390 'multiple' => true,
391 'desc' => esc_html__( 'Select the product(s) that you want to add the upsell for', 'merchant' ),
392 'allowed_types' => array( 'simple', 'variable' ),
393 'conditions' => array(
394 'relation' => 'AND', // AND/OR, If not provided, only first term will be considered
395 'terms' => array(
396 array(
397 'field' => 'custom_upsell_type', // field ID
398 'operator' => '===', // Available operators: ===, !==, >, <, >=, <=, in, !in, contains, !contains
399 'value' => 'products', // can be a single value or an array of string/number/int
400 ),
401 ),
402 ),
403 'ai_meta' => array(
404 'entity' => 'product',
405 'reference_type' => 'static',
406 'value_format' => 'product_id',
407 'usage_hint' => 'The specific products to recommend as upsells. Requires custom_upsell_type=products.',
408 ),
409 ),
410 array(
411 'id' => 'upsells_category_slugs',
412 'type' => 'select_ajax',
413 'title' => esc_html__( 'Select categories', 'merchant' ),
414 'source' => 'options',
415 'multiple' => true,
416 'options' => Merchant_Admin_Options::get_category_select2_choices(),
417 'placeholder' => esc_html__( 'Search categories', 'merchant' ),
418 'desc' => esc_html__( 'Select the categories that you want to display the upsell products from.', 'merchant' ),
419 'conditions' => array(
420 'relation' => 'AND', // AND/OR, If not provided, only first term will be considered
421 'terms' => array(
422 array(
423 'field' => 'custom_upsell_type', // field ID
424 'operator' => '===', // Available operators: ===, !==, >, <, >=, <=, in, !in, contains, !contains
425 'value' => 'categories', // can be a single value or an array of string/number/int
426 ),
427 ),
428 ),
429 'ai_meta' => array(
430 'entity' => 'category',
431 'reference_type' => 'dynamic',
432 'taxonomy' => 'product_cat',
433 'value_format' => 'slug',
434 'usage_hint' => 'Recommend products from these categories as upsells. Requires custom_upsell_type=categories.',
435 ),
436 ),
437 ),
438 ),
439 ),
440 ),
441
442 array(
443 'id' => 'upsells_products_count_limitation_toggle',
444 'label' => esc_html__( 'Limit the number of upsells in the cart', 'merchant' ),
445 'type' => 'checkbox',
446 'default' => 0,
447 'conditions' => array(
448 'relation' => 'AND', // AND/OR, If not provided, only first term will be considered
449 'terms' => array(
450 array(
451 'field' => 'use_upsells', // field ID
452 'operator' => '===', // Available operators: ===, !==, >, <, >=, <=, in, !in, contains, !contains
453 'value' => true, // can be a single value or an array of string/number/int
454 ),
455 ),
456 ),
457 ),
458 array(
459 'id' => 'upsells_products_count_limitation',
460 'title' => esc_html__( 'Maximum number of upsells to display', 'merchant' ),
461 'type' => 'number',
462 'default' => 5,
463 'min' => 1,
464 'step' => 1,
465 'conditions' => array(
466 'relation' => 'AND', // AND/OR, If not provided, only first term will be considered
467 'terms' => array(
468 array(
469 'field' => 'use_upsells', // field ID
470 'operator' => '===', // Available operators: ===, !==, >, <, >=, <=, in, !in, contains, !contains
471 'value' => true, // can be a single value or an array of string/number/int
472 ),
473 array(
474 'field' => 'upsells_products_count_limitation_toggle', // field ID
475 'operator' => '===', // Available operators: ===, !==, >, <, >=, <=, in, !in, contains, !contains
476 'value' => true, // can be a single value or an array of string/number/int
477 ),
478 ),
479 ),
480 ),
481 array(
482 'id' => 'upsells_title',
483 'title' => esc_html__( 'Upsell title', 'merchant' ),
484 'type' => 'text',
485 'default' => esc_html__( 'You might also like', 'merchant' ),
486 'conditions' => array(
487 'relation' => 'AND', // AND/OR, If not provided, only first term will be considered
488 'terms' => array(
489 array(
490 'field' => 'use_upsells', // field ID
491 'operator' => '===', // Available operators: ===, !==, >, <, >=, <=, in, !in, contains, !contains
492 'value' => true, // can be a single value or an array of string/number/int
493 ),
494 ),
495 ),
496 ),
497 array(
498 'id' => 'upsells_add_to_cart_text',
499 'title' => esc_html__( 'Button text', 'merchant' ),
500 'type' => 'text',
501 'default' => esc_html__( 'Add', 'merchant' ),
502 'conditions' => array(
503 'relation' => 'AND', // AND/OR, If not provided, only first term will be considered
504 'terms' => array(
505 array(
506 'field' => 'use_upsells', // field ID
507 'operator' => '===', // Available operators: ===, !==, >, <, >=, <=, in, !in, contains, !contains
508 'value' => true, // can be a single value or an array of string/number/int
509 ),
510 ),
511 ),
512 ),
513 array(
514 'id' => 'upsells_style',
515 'type' => 'select',
516 'title' => esc_html__( 'Upsell layout', 'merchant' ),
517 'options' => array(
518 'carousel' => esc_html__( 'Carousel', 'merchant' ),
519 'block' => esc_html__( 'List', 'merchant' ),
520 ),
521 'default' => 'block',
522 'conditions' => array(
523 'relation' => 'AND', // AND/OR, If not provided, only first term will be considered
524 'terms' => array(
525 array(
526 'field' => 'use_upsells', // field ID
527 'operator' => '===', // Available operators: ===, !==, >, <, >=, <=, in, !in, contains, !contains
528 'value' => true, // can be a single value or an array of string/number/int
529 ),
530 ),
531 ),
532 ),
533 ),
534 ),
535 array(
536 'module' => Merchant_Side_Cart::MODULE_ID,
537 'title' => esc_html__( 'Floating Mini Cart', 'merchant' ),
538 'fields' => array(
539 array(
540 'id' => 'enable-floating-cart',
541 'type' => 'switcher',
542 'title' => esc_html__( 'Floating cart', 'merchant' ),
543 'desc' => esc_html__( 'Enable floating cart icon', 'merchant' ),
544 'default' => 0,
545 ),
546
547 array(
548 'id' => 'icon-display',
549 'type' => 'select',
550 'title' => esc_html__( 'Display', 'merchant' ),
551 'options' => array(
552 'cart-not-empty' => esc_html__( 'When cart is not empty', 'merchant' ),
553 'always' => esc_html__( 'Always', 'merchant' ),
554 ),
555 'default' => 'always',
556 'condition' => array( 'enable-floating-cart', '==', '1' ),
557 ),
558
559 array(
560 'id' => 'icon',
561 'type' => 'choices',
562 'title' => esc_html__( 'Icon', 'merchant' ),
563 'options' => array(
564 'cart-icon-1' => MERCHANT_URI . 'assets/images/icons/side-cart/admin/cart-icon-1.svg',
565 'cart-icon-2' => MERCHANT_URI . 'assets/images/icons/side-cart/admin/cart-icon-2.svg',
566 'cart-icon-3' => MERCHANT_URI . 'assets/images/icons/side-cart/admin/cart-icon-3.svg',
567 'cart-icon-4' => MERCHANT_URI . 'assets/images/icons/side-cart/admin/cart-icon-4.svg',
568 'cart-icon-5' => MERCHANT_URI . 'assets/images/icons/side-cart/admin/cart-icon-5.svg',
569 ),
570 'default' => 'cart-icon-1',
571 'condition' => array( 'enable-floating-cart', '==', '1' ),
572 ),
573
574 array(
575 'id' => 'icon-position',
576 'type' => 'radio',
577 'title' => esc_html__( 'Position', 'merchant' ),
578 'options' => array(
579 'left' => esc_html__( 'Left', 'merchant' ),
580 'right' => esc_html__( 'Right', 'merchant' ),
581 ),
582 'default' => 'right',
583 'condition' => array( 'enable-floating-cart', '==', '1' ),
584 ),
585
586 array(
587 'id' => 'icon-size',
588 'type' => 'range',
589 'title' => esc_html__( 'Icon size', 'merchant' ),
590 'min' => 0,
591 'max' => 250,
592 'step' => 1,
593 'default' => 25,
594 'unit' => 'px',
595 'condition' => array( 'enable-floating-cart', '==', '1' ),
596 ),
597
598 array(
599 'id' => 'icon-corner-offset',
600 'type' => 'range',
601 'title' => esc_html__( 'Corner offset', 'merchant' ),
602 'min' => 0,
603 'max' => 250,
604 'step' => 1,
605 'default' => 30,
606 'unit' => 'px',
607 'condition' => array( 'enable-floating-cart', '==', '1' ),
608 ),
609
610 array(
611 'id' => 'icon-border-radius',
612 'type' => 'range',
613 'title' => esc_html__( 'Border radius', 'merchant' ),
614 'min' => 0,
615 'max' => 35,
616 'step' => 1,
617 'default' => 35,
618 'unit' => 'px',
619 'condition' => array( 'enable-floating-cart', '==', '1' ),
620 ),
621
622 array(
623 'id' => 'icon-color',
624 'type' => 'color',
625 'title' => esc_html__( 'Icon color', 'merchant' ),
626 'default' => '#ffffff',
627 'condition' => array( 'enable-floating-cart', '==', '1' ),
628 ),
629
630 array(
631 'id' => 'icon-background-color',
632 'type' => 'color',
633 'title' => esc_html__( 'Background color', 'merchant' ),
634 'default' => '#212121',
635 'condition' => array( 'enable-floating-cart', '==', '1' ),
636 ),
637
638 array(
639 'id' => 'icon-counter-color',
640 'type' => 'color',
641 'title' => esc_html__( 'Counter color', 'merchant' ),
642 'default' => '#ffffff',
643 'condition' => array( 'enable-floating-cart', '==', '1' ),
644 ),
645
646 array(
647 'id' => 'icon-counter-background-color',
648 'type' => 'color',
649 'title' => esc_html__( 'Counter background color', 'merchant' ),
650 'default' => '#757575',
651 'condition' => array( 'enable-floating-cart', '==', '1' ),
652 ),
653 ),
654 ),
655 array(
656 'module' => Merchant_Side_Cart::MODULE_ID,
657 'title' => esc_html__( 'Look and Feel', 'merchant' ),
658 'fields' => array(
659
660 array(
661 'id' => 'side-cart-width',
662 'type' => 'range',
663 'title' => esc_html__( 'Side cart width', 'merchant' ),
664 'min' => 0,
665 'max' => 2000,
666 'step' => 1,
667 'default' => 380,
668 'unit' => 'px',
669 ),
670
671 array(
672 'id' => 'side-cart-title-color',
673 'type' => 'color',
674 'title' => esc_html__( 'Title color', 'merchant' ),
675 'default' => '#212121',
676 ),
677
678 array(
679 'id' => 'side-cart-title-icon-color',
680 'type' => 'color',
681 'title' => esc_html__( 'Title icon color', 'merchant' ),
682 'default' => '#212121',
683 ),
684
685 array(
686 'id' => 'side-cart-title-background-color',
687 'type' => 'color',
688 'title' => esc_html__( 'Title background color', 'merchant' ),
689 'default' => '#cccccc',
690 ),
691
692 array(
693 'id' => 'side-cart-content-text-color',
694 'type' => 'color',
695 'title' => esc_html__( 'Content text color', 'merchant' ),
696 'default' => '#212121',
697 ),
698
699 array(
700 'id' => 'side-cart-content-background-color',
701 'type' => 'color',
702 'title' => esc_html__( 'Content background color', 'merchant' ),
703 'default' => '#ffffff',
704 ),
705
706 array(
707 'id' => 'side-cart-content-remove-color',
708 'type' => 'color',
709 'title' => esc_html__( 'Content (x) color', 'merchant' ),
710 'default' => '#ffffff',
711 ),
712
713 array(
714 'id' => 'side-cart-content-remove-background-color',
715 'type' => 'color',
716 'title' => esc_html__( 'Content (x) background color', 'merchant' ),
717 'default' => '#212121',
718 ),
719
720 array(
721 'id' => 'side-cart-total-text-color',
722 'type' => 'color',
723 'title' => esc_html__( 'Total text color', 'merchant' ),
724 'default' => '#212121',
725 ),
726
727 array(
728 'id' => 'side-cart-total-background-color',
729 'type' => 'color',
730 'title' => esc_html__( 'Total background color', 'merchant' ),
731 'default' => '#f5f5f5',
732 ),
733
734 array(
735 'id' => 'side-cart-button-color',
736 'type' => 'color',
737 'title' => esc_html__( 'Button color', 'merchant' ),
738 'default' => '#ffffff',
739 ),
740
741 array(
742 'id' => 'side-cart-button-color-hover',
743 'type' => 'color',
744 'title' => esc_html__( 'Button color hover', 'merchant' ),
745 'default' => '#ffffff',
746 ),
747
748 array(
749 'id' => 'side-cart-button-border-color',
750 'type' => 'color',
751 'title' => esc_html__( 'Button border color', 'merchant' ),
752 'default' => '#212121',
753 ),
754
755 array(
756 'id' => 'side-cart-button-border-color-hover',
757 'type' => 'color',
758 'title' => esc_html__( 'Button border color hover', 'merchant' ),
759 'default' => '#313131',
760 ),
761
762 array(
763 'id' => 'side-cart-button-background-color',
764 'type' => 'color',
765 'title' => esc_html__( 'Button background color', 'merchant' ),
766 'default' => '#212121',
767 ),
768
769 array(
770 'id' => 'side-cart-button-background-color-hover',
771 'type' => 'color',
772 'title' => esc_html__( 'Button background color hover', 'merchant' ),
773 'default' => '#313131',
774 ),
775 ),
776 ),
777 );
778