PluginProbe
Ultimate Store Kit – Store Builder Addons for Elementor, WooCommerce Store Builder, EDD Store Builder / 1.6.1
Ultimate Store Kit – Store Builder Addons for Elementor, WooCommerce Store Builder, EDD Store Builder v1.6.1
3.1.4 3.0.8 3.0.9 3.1.0 3.1.2 3.1.3 3.0.7 3.0.5 3.0.4 3.0.3 3.0.2 trunk 1.5.0 1.5.1 1.5.2 1.6.1 1.6.2 1.6.3 1.6.4 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 All 93 releases
ultimate-store-kit / modules / heaven-slider / widgets / heaven-slider.php

heaven-slider.php in Ultimate Store Kit – Store Builder Addons for Elementor, WooCommerce Store Builder, EDD Store Builder 1.6.1, at modules/heaven-slider/widgets/heaven-slider.php

1,721 lines 62.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace UltimateStoreKit\Modules\HeavenSlider\Widgets;
4
5
6 use Elementor\Controls_Manager;
7 use UltimateStoreKit\Base\Module_Base;
8 use Elementor\Group_Control_Border;
9 use Elementor\Group_Control_Background;
10 use Elementor\Group_Control_Css_Filter;
11 use Elementor\Group_Control_Box_Shadow;
12 use Elementor\Group_Control_Image_Size;
13 use Elementor\Group_Control_Text_Shadow;
14 use Elementor\Group_Control_Text_Stroke;
15 use Elementor\Group_Control_Typography;
16 use UltimateStoreKit\traits\Global_Widget_Controls;
17 use UltimateStoreKit\traits\Global_Widget_Template;
18 use UltimateStoreKit\Includes\Controls\GroupQuery\Group_Control_Query;
19 use WP_Query;
20
21 if (!defined('ABSPATH')) {
22 exit;
23 }
24
25 // Exit if accessed directly
26
27 class Heaven_Slider extends Module_Base {
28 use Global_Widget_Controls;
29 use Global_Widget_Template;
30 use Group_Control_Query;
31
32 /**
33 * @var \WP_Query
34 */
35 private $_query = null;
36 public function get_name() {
37 return 'usk-heaven-slider';
38 }
39
40 public function get_title() {
41 return esc_html__('Heaven Slider', 'ultimate-store-kit');
42 }
43
44 public function get_icon() {
45 return 'usk-widget-icon usk-icon-heaven-slider usk-new';
46 }
47
48 public function get_categories() {
49 return ['ultimate-store-kit'];
50 }
51
52 public function get_keywords() {
53 return ['product', 'product-grid', 'table', 'wc'];
54 }
55
56 public function get_script_depends() {
57 return ['micromodal'];
58 }
59
60 public function get_style_depends() {
61 if ($this->usk_is_edit_mode()) {
62 return ['usk-all-styles'];
63 } else {
64 return ['ultimate-store-kit-font', 'usk-heaven-slider'];
65 }
66 }
67
68 // public function get_custom_help_url() {
69 // return 'https://youtu.be/3VkvEpVaNAM';
70 // }
71 public function get_query() {
72 return $this->_query;
73 }
74 protected function register_controls() {
75 $this->start_controls_section(
76 'section_woocommerce_layout',
77 [
78 'label' => esc_html__('Layout', 'ultimate-store-kit'),
79 ]
80 );
81 $this->add_responsive_control(
82 'items_height',
83 [
84 'label' => esc_html__('Item Height', 'ultimate-store-kit'),
85 'type' => Controls_Manager::SLIDER,
86 'size_units' => ['px', 'vh', 'em'],
87 'range' => [
88 'px' => [
89 'min' => 200,
90 'max' => 1080,
91 ],
92 'vh' => [
93 'min' => 10,
94 'max' => 100,
95 ],
96 ],
97 'selectors' => [
98 '{{WRAPPER}} .usk-heaven-slider' => 'height: {{SIZE}}{{UNIT}}',
99 ],
100 ]
101 );
102
103 $this->add_group_control(
104 Group_Control_Image_Size::get_type(),
105 [
106 'name' => 'image',
107 'label' => esc_html__('Image Size', 'ultimate-store-kit'),
108 'exclude' => ['custom'],
109 'default' => 'full',
110 ]
111 );
112
113 $this->add_control(
114 'show_arrows',
115 [
116 'label' => esc_html__('Show Arrows', 'ultimate-store-kit'),
117 'type' => Controls_Manager::SWITCHER,
118 'default' => 'yes',
119 ]
120 );
121
122 $this->end_controls_section();
123
124 //Query
125 $this->start_controls_section(
126 'section_post_query_builder',
127 [
128 'label' => __('Query', 'bdthemes-element-pack'),
129 'tab' => Controls_Manager::TAB_CONTENT,
130 ]
131 );
132 $this->register_query_builder_controls();
133 $this->end_controls_section();
134
135 //Additional
136 $this->start_controls_section(
137 'section_woocommerce_additional',
138 [
139 'label' => esc_html__('Additional', 'ultimate-store-kit'),
140 ]
141 );
142 $this->start_controls_tabs(
143 'tabs_show_hide_content'
144 );
145 $this->start_controls_tab(
146 'show_content_tab',
147 [
148 'label' => esc_html__('Content', 'ultimate-store-kit'),
149 ]
150 );
151 $this->add_control(
152 'show_title',
153 [
154 'label' => esc_html__('Title', 'ultimate-store-kit'),
155 'type' => Controls_Manager::SWITCHER,
156 'default' => 'yes'
157 ]
158 );
159 $this->add_control(
160 'title_tags',
161 [
162 'label' => esc_html__('Title HTML Tag', 'ultimate-store-kit'),
163 'type' => Controls_Manager::SELECT,
164 'default' => 'h3',
165 'options' => ultimate_store_kit_title_tags(),
166 ]
167 );
168
169 $this->add_control(
170 'show_rating',
171 [
172 'label' => esc_html__('Rating', 'ultimate-store-kit'),
173 'type' => Controls_Manager::SWITCHER,
174 'default' => 'yes',
175 'separator' => 'before'
176 ]
177 );
178 $this->add_control(
179 'hide_customer_review',
180 [
181 'label' => esc_html__('Hide Review Text', 'ultimate-store-kit'),
182 'type' => Controls_Manager::SWITCHER,
183 'label_on' => esc_html__('Yes', 'ultimate-store-kit'),
184 'label_off' => esc_html__('No', 'ultimate-store-kit'),
185 // 'return_value' => 'yes',
186 'default' => 'yes',
187 'condition' => [
188 'show_rating' => 'yes',
189 ],
190 'selectors' => [
191 '{{WRAPPER}} .usk-heaven-slider .usk-rating .woocommerce-review-link' => 'display:none',
192 ],
193 ]
194 );
195 // $this->add_control(
196 // 'show_button',
197 // [
198 // 'label' => esc_html__('Button', 'ultimate-store-kit'),
199 // 'type' => Controls_Manager::SWITCHER,
200 // 'default' => 'yes'
201 // ]
202 // );
203 $this->add_control(
204 'show_price',
205 [
206 'label' => esc_html__('Price', 'ultimate-store-kit'),
207 'type' => Controls_Manager::SWITCHER,
208 'default' => 'yes',
209 ]
210 );
211 $this->add_control(
212 'show_category',
213 [
214 'label' => esc_html__('Category', 'ultimate-store-kit'),
215 'type' => Controls_Manager::SWITCHER,
216 'default' => 'yes',
217 ]
218 );
219
220 $this->add_control(
221 'show_excerpt',
222 [
223 'label' => esc_html__('Text', 'ultimate-store-kit'),
224 'type' => Controls_Manager::SWITCHER,
225 'default' => 'yes',
226 'separator' => 'before',
227 ]
228 );
229 $this->add_control(
230 'excerpt_limit',
231 [
232 'label' => esc_html__('Text Limit', 'ultimate-store-kit'),
233 'type' => Controls_Manager::NUMBER,
234 'default' => 15,
235 'condition' => [
236 'show_excerpt' => 'yes',
237 ],
238 ]
239 );
240
241 $this->end_controls_tab();
242 $this->start_controls_tab(
243 'show_sale_badge_tab',
244 [
245 'label' => esc_html__('Badge', 'ultimate-store-kit'),
246 ]
247 );
248 $this->add_control(
249 'show_sale_badge',
250 [
251 'label' => esc_html__('Sale', 'ultimate-store-kit'),
252 'type' => Controls_Manager::SWITCHER,
253 'default' => 'yes',
254 ]
255 );
256 $this->add_control(
257 'show_discount_badge',
258 [
259 'label' => esc_html__('Percentage', 'ultimate-store-kit'),
260 'type' => Controls_Manager::SWITCHER,
261 'default' => 'yes',
262 ]
263 );
264 $this->add_control(
265 'show_stock_status',
266 [
267 'label' => esc_html__('Stock Status', 'ultimate-store-kit'),
268 'type' => Controls_Manager::SWITCHER,
269 // 'default' => 'yes',
270 ]
271 );
272 $this->add_control(
273 'show_trending_badge',
274 [
275 'label' => esc_html__('Trending', 'ultimate-store-kit'),
276 'type' => Controls_Manager::SWITCHER,
277 'default' => 'yes',
278 ]
279 );
280 $this->add_control(
281 'show_new_badge',
282 [
283 'label' => esc_html__('New', 'ultimate-store-kit'),
284 'type' => Controls_Manager::SWITCHER,
285 'default' => 'yes',
286 ]
287 );
288 $this->add_control(
289 'newness_days',
290 [
291 'label' => esc_html__('Newness Days', 'ultimate-store-kit'),
292 'type' => Controls_Manager::NUMBER,
293 'default' => 30,
294 'condition' => [
295 'show_new_badge' => 'yes',
296 ],
297 ]
298 );
299 $this->end_controls_tab();
300
301 $this->start_controls_tab(
302 'show_action_btn_tab',
303 [
304 'label' => esc_html__('Action btn', 'ultimate-store-kit'),
305 ]
306 );
307 $this->add_control(
308 'show_cart',
309 [
310 'label' => esc_html__('Add to Cart', 'ultimate-store-kit'),
311 'type' => Controls_Manager::SWITCHER,
312 'default' => 'yes',
313 ]
314 );
315
316 $this->add_control(
317 'show_wishlist',
318 [
319 'label' => esc_html__('Wishlist', 'ultimate-store-kit'),
320 'type' => Controls_Manager::SWITCHER,
321 'label_on' => esc_html__('Show', 'ultimate-store-kit'),
322 'label_off' => esc_html__('Hide', 'ultimate-store-kit'),
323 'return_value' => 'yes',
324 'default' => 'yes',
325 ]
326 );
327 $this->add_control(
328 'show_quick_view',
329 [
330 'label' => esc_html__('Quick View', 'ultimate-store-kit'),
331 'type' => Controls_Manager::SWITCHER,
332 'default' => 'yes',
333 ]
334 );
335
336 $this->end_controls_tab();
337 $this->end_controls_tabs();
338 $this->end_controls_section();
339
340 /**
341 * Slider settings
342 */
343 $this->start_controls_section(
344 'section_carousel_settings',
345 [
346 'label' => __('Slider Settings', 'ultimate-store-kit'),
347 ]
348 );
349
350 $this->add_control(
351 'autoplay',
352 [
353 'label' => __('Autoplay', 'ultimate-store-kit'),
354 'type' => Controls_Manager::SWITCHER,
355 'default' => 'yes',
356
357 ]
358 );
359
360 $this->add_control(
361 'autoplay_speed',
362 [
363 'label' => esc_html__('Autoplay Speed', 'ultimate-store-kit'),
364 'type' => Controls_Manager::NUMBER,
365 'default' => 5000,
366 'condition' => [
367 'autoplay' => 'yes',
368 ],
369 ]
370 );
371
372 $this->add_control(
373 'pauseonhover',
374 [
375 'label' => esc_html__('Pause on Hover', 'ultimate-store-kit'),
376 'type' => Controls_Manager::SWITCHER,
377 ]
378 );
379
380 $this->add_control(
381 'grab_cursor',
382 [
383 'label' => __('Grab Cursor', 'ultimate-store-kit'),
384 'type' => Controls_Manager::SWITCHER,
385 ]
386 );
387
388 $this->add_control(
389 'loop',
390 [
391 'label' => __('Loop', 'ultimate-store-kit'),
392 'type' => Controls_Manager::SWITCHER,
393 'default' => 'yes',
394
395 ]
396 );
397
398 $this->add_control(
399 'mousewheel',
400 [
401 'label' => __('Mousewheel', 'ultimate-store-kit'),
402 'type' => Controls_Manager::SWITCHER,
403 'default' => 'yes',
404
405 ]
406 );
407
408
409 $this->add_control(
410 'speed',
411 [
412 'label' => __('Animation Speed (ms)', 'ultimate-store-kit'),
413 'type' => Controls_Manager::SLIDER,
414 'default' => [
415 'size' => 800,
416 ],
417 'range' => [
418 'px' => [
419 'min' => 100,
420 'max' => 5000,
421 'step' => 50,
422 ],
423 ],
424 ]
425 );
426
427 $this->add_control(
428 'observer',
429 [
430 'label' => __('Observer', 'ultimate-store-kit'),
431 'description' => __('When you use carousel in any hidden place (in tabs, accordion etc) keep it yes.', 'ultimate-store-kit'),
432 'type' => Controls_Manager::SWITCHER,
433 ]
434 );
435
436 $this->end_controls_section();
437
438 /**
439 * Start Style Controls
440 */
441 $this->start_controls_section(
442 'section_style_items',
443 [
444 'label' => esc_html__('Slider', 'ultimate-store-kit'),
445 'tab' => Controls_Manager::TAB_STYLE,
446 ]
447 );
448
449 $this->add_group_control(
450 Group_Control_Background::get_type(),
451 [
452 'name' => 'slider_items_background',
453 'label' => esc_html__('Background', 'ultimate-store-kit'),
454 'types' => ['classic', 'gradient'],
455 'selector' => '{{WRAPPER}} .usk-heaven-slider',
456 ]
457 );
458
459 $this->add_group_control(
460 Group_Control_Border::get_type(),
461 [
462 'name' => 'slider_items_border',
463 'label' => __('Border', 'ultimate-store-kit'),
464 'fields_options' => [
465 'border' => [
466 'default' => 'solid',
467 ],
468 'width' => [
469 'default' => [
470 'top' => '1',
471 'right' => '1',
472 'bottom' => '1',
473 'left' => '1',
474 'isLinked' => false,
475 ],
476 ],
477 'color' => [
478 'default' => '#5bb300',
479 ],
480 ],
481 'selector' => '{{WRAPPER}} .usk-heaven-slider',
482 ]
483 );
484
485 $this->add_responsive_control(
486 'slider_items_radius',
487 [
488 'label' => esc_html__('Border Radius', 'ultimate-store-kit'),
489 'type' => Controls_Manager::DIMENSIONS,
490 'size_units' => ['px'],
491 'selectors' => [
492 '{{WRAPPER}} .usk-heaven-slider' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}; overflow: hidden;',
493 ],
494 ]
495 );
496 $this->add_responsive_control(
497 'slider_items_padding',
498 [
499 'label' => esc_html__('Padding', 'ultimate-store-kit'),
500 'type' => Controls_Manager::DIMENSIONS,
501 'size_units' => [
502 'px', 'em', '%'
503 ],
504 'selectors' => [
505 '{{WRAPPER}} .usk-heaven-slider' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
506 ],
507 ]
508 );
509
510 $this->end_controls_section();
511
512 $this->start_controls_section(
513 'section_style_image',
514 [
515 'label' => esc_html__('Image', 'ultimate-store-kit'),
516 'tab' => Controls_Manager::TAB_STYLE,
517 ]
518 );
519
520 $this->add_group_control(
521 Group_Control_Border::get_type(),
522 [
523 'name' => 'image_border',
524 'label' => esc_html__('Border', 'ultimate-store-kit'),
525 'selector' => '{{WRAPPER}} .usk-heaven-slider .usk-main-slider .usk-image-wrap .usk-img',
526 ]
527 );
528
529 $this->add_responsive_control(
530 'image_radius',
531 [
532 'label' => esc_html__('Border Radius', 'ultimate-store-kit'),
533 'type' => Controls_Manager::DIMENSIONS,
534 'size_units' => ['px', '%', 'em'],
535 'selectors' => [
536 '{{WRAPPER}} .usk-heaven-slider .usk-main-slider .usk-image-wrap .usk-img' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
537 ],
538 ]
539 );
540
541 $this->add_group_control(
542 Group_Control_Box_Shadow::get_type(),
543 [
544 'name' => 'box_shadow',
545 'label' => esc_html__('Box Shadow', 'ultimate-store-kit'),
546 'selector' => '{{WRAPPER}} .usk-heaven-slider .usk-main-slider .usk-image-wrap .usk-img',
547 ]
548 );
549
550 $this->add_group_control(
551 Group_Control_Css_Filter::get_type(),
552 [
553 'name' => 'image_css_filters',
554 'selector' => '{{WRAPPER}} .usk-heaven-slider .usk-main-slider .usk-image-wrap .usk-img',
555 ]
556 );
557
558 $this->end_controls_section();
559
560 $this->start_controls_section(
561 'section_style_title',
562 [
563 'label' => esc_html__('Title', 'ultimate-store-kit'),
564 'tab' => Controls_Manager::TAB_STYLE,
565 'condition' => [
566 'show_title' => 'yes'
567 ]
568 ]
569 );
570
571 $this->add_control(
572 'title_color',
573 [
574 'label' => esc_html__('Color', 'ultimate-store-kit'),
575 'type' => Controls_Manager::COLOR,
576 'selectors' => [
577 '{{WRAPPER}} .usk-main-slider .usk-title a' => 'color: {{VALUE}}',
578 ],
579 ]
580 );
581
582 $this->add_control(
583 'hover_title_color',
584 [
585 'label' => esc_html__('Hover Color', 'ultimate-store-kit'),
586 'type' => Controls_Manager::COLOR,
587 'selectors' => [
588 '{{WRAPPER}} .usk-main-slider .usk-title a:hover' => 'color: {{VALUE}};',
589 ],
590 ]
591 );
592
593 $this->add_responsive_control(
594 'title_margin',
595 [
596 'label' => esc_html__('Margin', 'ultimate-store-kit'),
597 'type' => Controls_Manager::DIMENSIONS,
598 'size_units' => ['px', '%'],
599 'selectors' => [
600 '{{WRAPPER}} .usk-main-slider .usk-title' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
601 ],
602 ]
603 );
604
605 $this->add_group_control(
606 Group_Control_Typography::get_type(),
607 [
608 'name' => 'title_typography',
609 'label' => esc_html__('Typography', 'ultimate-store-kit'),
610 'selector' => '{{WRAPPER}} .usk-main-slider .usk-title',
611 ]
612 );
613
614 $this->add_group_control(
615 Group_Control_Text_Shadow::get_type(),
616 [
617 'name' => 'title_text_shadow',
618 'selector' => '{{WRAPPER}} .usk-main-slider .usk-title',
619 ]
620 );
621
622 $this->add_group_control(
623 Group_Control_Text_Stroke::get_type(),
624 [
625 'name' => 'title_text_stroke',
626 'selector' => '{{WRAPPER}} .usk-main-slider .usk-title',
627 ]
628 );
629
630 $this->end_controls_section();
631
632 $this->start_controls_section(
633 'section_style_text',
634 [
635 'label' => esc_html__('Text', 'ultimate-store-kit'),
636 'tab' => Controls_Manager::TAB_STYLE,
637 'condition' => [
638 'show_excerpt' => 'yes'
639 ]
640 ]
641 );
642
643 $this->add_control(
644 'text_color',
645 [
646 'label' => esc_html__('Color', 'ultimate-store-kit'),
647 'type' => Controls_Manager::COLOR,
648 'selectors' => [
649 '{{WRAPPER}} .usk-main-slider .usk-text' => 'color: {{VALUE}}',
650 ],
651 ]
652 );
653
654 $this->add_responsive_control(
655 'text_margin',
656 [
657 'label' => esc_html__('Margin', 'ultimate-store-kit'),
658 'type' => Controls_Manager::DIMENSIONS,
659 'size_units' => ['px', '%'],
660 'selectors' => [
661 '{{WRAPPER}} .usk-main-slider .usk-text' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
662 ],
663 ]
664 );
665
666 $this->add_group_control(
667 Group_Control_Typography::get_type(),
668 [
669 'name' => 'text_typography',
670 'label' => esc_html__('Typography', 'ultimate-store-kit'),
671 'selector' => '{{WRAPPER}} .usk-main-slider .usk-text',
672 ]
673 );
674
675 $this->end_controls_section();
676
677 //Global Controls Price
678 $this->register_global_controls_price();
679
680 $this->start_controls_section(
681 'section_style_rating',
682 [
683 'label' => esc_html__('Rating', 'ultimate-store-kit'),
684 'tab' => Controls_Manager::TAB_STYLE,
685 'condition' => [
686 'show_rating' => 'yes',
687 ],
688 ]
689 );
690
691 $this->add_control(
692 'rating_color',
693 [
694 'label' => esc_html__('Color', 'ultimate-store-kit'),
695 'type' => Controls_Manager::COLOR,
696 'default' => '#e7e7e7',
697 'selectors' => [
698 '{{WRAPPER}} .' . $this->get_name() . ' .usk-rating .star-rating::before' => 'color: {{VALUE}};',
699 ],
700 ]
701 );
702
703 $this->add_control(
704 'active_rating_color',
705 [
706 'label' => esc_html__('Active Color', 'ultimate-store-kit'),
707 'type' => Controls_Manager::COLOR,
708 'default' => '#FFCC00',
709 'selectors' => [
710 '{{WRAPPER}} .' . $this->get_name() . ' .usk-rating .star-rating span::before' => 'color: {{VALUE}};',
711 ],
712 ]
713 );
714
715 $this->add_responsive_control(
716 'rating_margin',
717 [
718 'label' => esc_html__('Margin', 'ultimate-store-kit'),
719 'type' => Controls_Manager::DIMENSIONS,
720 'size_units' => ['px', '%', 'em'],
721 'selectors' => [
722 '{{WRAPPER}} .usk-heaven-slider .usk-main-slider .usk-rating' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
723 ],
724 ]
725 );
726
727 $this->end_controls_section();
728
729 //Badge Global
730 $this->register_global_controls_badge();
731
732 $this->start_controls_section(
733 'style_action_btn',
734 [
735 'label' => esc_html__('Action Button', 'ultimate-store-kit'),
736 'tab' => Controls_Manager::TAB_STYLE,
737 ]
738 );
739
740 $this->add_control(
741 'action_button_color',
742 [
743 'label' => esc_html__('Color', 'ultimate-store-kit'),
744 'type' => Controls_Manager::COLOR,
745 'selectors' => [
746 '{{WRAPPER}} .usk-heaven-slider .usk-main-slider .usk-action-btn a' => 'color: {{VALUE}}',
747 ],
748 ]
749 );
750
751 $this->add_control(
752 'action_button_bg',
753 [
754 'label' => esc_html__('Background', 'ultimate-store-kit'),
755 'type' => Controls_Manager::COLOR,
756 'selectors' => [
757 '{{WRAPPER}} .usk-heaven-slider .usk-main-slider .usk-action-btn a' => 'background: {{VALUE}}',
758 ],
759 ]
760 );
761 $this->add_control(
762 'heading_action_button_hover',
763 [
764 'label' => esc_html__('Hover', 'ultimate-store-kit'),
765 'type' => Controls_Manager::HEADING,
766 'separator' => 'before',
767 ]
768 );
769 $this->add_control(
770 'action_button_color_hover',
771 [
772 'label' => esc_html__('Color', 'ultimate-store-kit'),
773 'type' => Controls_Manager::COLOR,
774 'selectors' => [
775 '{{WRAPPER}} .usk-heaven-slider .usk-main-slider .usk-action-btn a:hover' => 'color: {{VALUE}}',
776 ],
777 ]
778 );
779 $this->add_control(
780 'action_button_bg_hover',
781 [
782 'label' => esc_html__('Background', 'ultimate-store-kit'),
783 'type' => Controls_Manager::COLOR,
784 'selectors' => [
785 '{{WRAPPER}} .usk-heaven-slider .usk-main-slider .usk-action-btn a:hover' => 'background: {{VALUE}}',
786 ],
787 ]
788 );
789
790 $this->add_group_control(
791 Group_Control_Border::get_type(),
792 [
793 'name' => 'action_btn_border',
794 'label' => esc_html__('Border', 'ultimate-store-kit'),
795 'selector' => '{{WRAPPER}} .usk-heaven-slider .usk-main-slider .usk-action-btn a',
796 ]
797 );
798 $this->add_responsive_control(
799 'action_btn_radius',
800 [
801 'label' => esc_html__('Border Radius', 'ultimate-store-kit'),
802 'type' => Controls_Manager::DIMENSIONS,
803 'size_units' => ['px', '%', 'em'],
804 'selectors' => [
805 '{{WRAPPER}} .usk-heaven-slider .usk-main-slider .usk-action-btn a' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
806 ],
807 ]
808 );
809 $this->add_responsive_control(
810 'action_btn_padding',
811 [
812 'label' => esc_html__('Padding', 'ultimate-store-kit'),
813 'type' => Controls_Manager::DIMENSIONS,
814 'size_units' => ['px', '%', 'em'],
815 'selectors' => [
816 '{{WRAPPER}} .usk-heaven-slider .usk-main-slider .usk-action-btn a' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
817 ],
818 ]
819 );
820 $this->add_responsive_control(
821 'action_btn_margin',
822 [
823 'label' => esc_html__('Margin', 'ultimate-store-kit'),
824 'type' => Controls_Manager::DIMENSIONS,
825 'size_units' => ['px', '%', 'em'],
826 'selectors' => [
827 '{{WRAPPER}} .usk-heaven-slider .usk-main-slider .usk-action-btn a' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
828 ],
829 ]
830 );
831
832 $this->add_control(
833 'font_family',
834 [
835 'label' => esc_html__('Tooltip Font', 'font family'),
836 'type' => Controls_Manager::FONT,
837 'default' => "'Open Sans', sans-serif",
838 'selectors' => [
839 '{{WRAPPER}} .usk-heaven-slider .usk-main-slider .usk-action-btn a' => 'font-family: {{VALUE}}',
840 ],
841 ]
842 );
843
844 $this->add_control(
845 'action_btn_separator',
846 [
847 'label' => esc_html__('Button Separator', 'ultimate-store-kit'),
848 'show_label' => false,
849 'label_block' => false,
850 'type' => Controls_Manager::HEADING,
851 'separator' => 'before',
852 ]
853 );
854 $this->start_controls_tabs(
855 'action_btn_tabs'
856 );
857 $this->start_controls_tab(
858 'wishlist_tab',
859 [
860 'label' => esc_html__('Wishlist', 'ultimate-store-kit'),
861 'condition' => [
862 'show_wishlist' => 'yes'
863 ]
864 ]
865 );
866 $this->add_control(
867 'wishlist_normal_color',
868 [
869 'label' => esc_html__('Color', 'ultimate-store-kit'),
870 'type' => Controls_Manager::COLOR,
871 'selectors' => [
872 '{{WRAPPER}} .usk-heaven-slider .usk-main-slider .usk-action-btn .usk-wishlist' => 'color: {{VALUE}}',
873 ],
874 ]
875 );
876 $this->add_control(
877 'wishlist_icon_bg',
878 [
879 'label' => esc_html__('Background', 'ultimate-store-kit'),
880 'type' => Controls_Manager::COLOR,
881 'selectors' => [
882 '{{WRAPPER}} .usk-heaven-slider .usk-main-slider .usk-action-btn .usk-wishlist' => 'background: {{VALUE}}',
883 ],
884 ]
885 );
886 $this->add_control(
887 'heading_wishlist_hover',
888 [
889 'label' => esc_html__('Hover', 'ultimate-store-kit'),
890 'type' => Controls_Manager::HEADING,
891 'separator' => 'before',
892 ]
893 );
894 $this->add_control(
895 'wishlist_hover_color',
896 [
897 'label' => esc_html__('Color', 'ultimate-store-kit'),
898 'type' => Controls_Manager::COLOR,
899 'selectors' => [
900 '{{WRAPPER}} .usk-heaven-slider .usk-main-slider .usk-action-btn .usk-wishlist:hover' => 'color: {{VALUE}}',
901 ],
902 ]
903 );
904 $this->add_control(
905 'wishlist_icon_hover_bg',
906 [
907 'label' => esc_html__('Background', 'ultimate-store-kit'),
908 'type' => Controls_Manager::COLOR,
909 'selectors' => [
910 '{{WRAPPER}} .usk-heaven-slider .usk-main-slider .usk-action-btn .usk-wishlist:hover' => 'background: {{VALUE}}',
911 ],
912 ]
913 );
914
915 $this->end_controls_tab();
916 $this->start_controls_tab(
917 'quickview_tab',
918 [
919 'label' => esc_html__('Quickview', 'ultimate-store-kit'),
920 'condition' => [
921 'show_quick_view' => 'yes'
922 ]
923 ]
924 );
925 $this->add_control(
926 'quickview_color',
927 [
928 'label' => esc_html__('Color', 'ultimate-store-kit'),
929 'type' => Controls_Manager::COLOR,
930 'selectors' => [
931 '{{WRAPPER}} .usk-heaven-slider .usk-main-slider .usk-action-btn .usk-view' => 'color: {{VALUE}}',
932 ],
933 ]
934 );
935 $this->add_control(
936 'quickview_icon_bg',
937 [
938 'label' => esc_html__('Background', 'ultimate-store-kit'),
939 'type' => Controls_Manager::COLOR,
940 'selectors' => [
941 '{{WRAPPER}} .usk-heaven-slider .usk-main-slider .usk-action-btn .usk-view' => 'background: {{VALUE}}',
942 ],
943 ]
944 );
945 $this->add_control(
946 'heading_quickview_hover',
947 [
948 'label' => esc_html__('Hover', 'ultimate-store-kit'),
949 'type' => Controls_Manager::HEADING,
950 'separator' => 'before',
951 ]
952 );
953 $this->add_control(
954 'quickview_color_hover',
955 [
956 'label' => esc_html__('Color', 'ultimate-store-kit'),
957 'type' => Controls_Manager::COLOR,
958 'selectors' => [
959 '{{WRAPPER}} .usk-heaven-slider .usk-main-slider .usk-action-btn .usk-view:hover' => 'color: {{VALUE}}',
960 ],
961 ]
962 );
963 $this->add_control(
964 'quickview_icon_bg_hover',
965 [
966 'label' => esc_html__('Background', 'ultimate-store-kit'),
967 'type' => Controls_Manager::COLOR,
968 'selectors' => [
969 '{{WRAPPER}} .usk-heaven-slider .usk-main-slider .usk-action-btn .usk-view:hover' => 'background: {{VALUE}}',
970 ],
971 ]
972 );
973 $this->end_controls_tab();
974 $this->start_controls_tab(
975 'add_to_cart_tab',
976 [
977 'label' => esc_html__('Cart', 'ultimate-store-kit'),
978 'condition' => [
979 'show_cart' => 'yes'
980 ]
981 ]
982 );
983 $this->add_control(
984 'cart_color',
985 [
986 'label' => esc_html__('Color', 'ultimate-store-kit'),
987 'type' => Controls_Manager::COLOR,
988 'selectors' => [
989 '{{WRAPPER}} .usk-heaven-slider .usk-main-slider .usk-action-btn .usk-cart' => 'color: {{VALUE}}',
990 ],
991 ]
992 );
993 $this->add_control(
994 'cart_icon_bg',
995 [
996 'label' => esc_html__('Background', 'ultimate-store-kit'),
997 'type' => Controls_Manager::COLOR,
998 'selectors' => [
999 '{{WRAPPER}} .usk-heaven-slider .usk-main-slider .usk-action-btn .usk-cart' => 'background: {{VALUE}}',
1000 ],
1001 ]
1002 );
1003 $this->add_control(
1004 'heading_cart_hover',
1005 [
1006 'label' => esc_html__('Hover', 'ultimate-store-kit'),
1007 'type' => Controls_Manager::HEADING,
1008 'separator' => 'before',
1009 ]
1010 );
1011 $this->add_control(
1012 'cart_color_hover',
1013 [
1014 'label' => esc_html__('Color', 'ultimate-store-kit'),
1015 'type' => Controls_Manager::COLOR,
1016 'selectors' => [
1017 '{{WRAPPER}} .usk-heaven-slider .usk-main-slider .usk-action-btn .usk-cart:hover' => 'color: {{VALUE}}',
1018 ],
1019 ]
1020 );
1021 $this->add_control(
1022 'cart_icon_bg_hover',
1023 [
1024 'label' => esc_html__('Background', 'ultimate-store-kit'),
1025 'type' => Controls_Manager::COLOR,
1026 'selectors' => [
1027 '{{WRAPPER}} .usk-heaven-slider .usk-main-slider .usk-action-btn .usk-cart:hover' => 'background: {{VALUE}}',
1028 ],
1029 ]
1030 );
1031 $this->end_controls_tab();
1032 $this->end_controls_tabs();
1033 $this->end_controls_section();
1034
1035 $this->start_controls_section(
1036 'section_style_category',
1037 [
1038 'label' => esc_html__('Category', 'ultimate-store-kit'),
1039 'tab' => Controls_Manager::TAB_STYLE,
1040 'condition' => [
1041 'show_category' => 'yes',
1042 ],
1043 ]
1044 );
1045 $this->start_controls_tabs(
1046 'category_tabs'
1047 );
1048 $this->start_controls_tab(
1049 'category_tab_normal',
1050 [
1051 'label' => esc_html__('Normal', 'ultimate-store-kit'),
1052 ]
1053 );
1054 $this->add_control(
1055 'category_color',
1056 [
1057 'label' => esc_html__('Color', 'ultimate-store-kit'),
1058 'type' => Controls_Manager::COLOR,
1059 'selectors' => [
1060 '{{WRAPPER}} .usk-heaven-slider .usk-category a' => 'color: {{VALUE}};',
1061 ],
1062 ]
1063 );
1064 $this->add_group_control(
1065 Group_Control_Background::get_type(),
1066 [
1067 'name' => 'category_bg_color',
1068 'selector' => '{{WRAPPER}} .usk-heaven-slider .usk-category a',
1069 ]
1070 );
1071 $this->add_group_control(
1072 Group_Control_Border::get_type(),
1073 [
1074 'name' => 'category_border',
1075 'label' => __('Border', 'elementor'),
1076 'selector' => '{{WRAPPER}} .usk-heaven-slider .usk-category a',
1077 'separator' => 'before'
1078 ]
1079 );
1080 $this->add_responsive_control(
1081 'category_radius',
1082 [
1083 'label' => esc_html__('Border Radius', 'ultimate-store-kit'),
1084 'type' => Controls_Manager::DIMENSIONS,
1085 'size_units' => ['px', '%', 'em'],
1086 'selectors' => [
1087 '{{WRAPPER}} .usk-heaven-slider .usk-category a' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1088 ],
1089 ]
1090 );
1091 $this->add_responsive_control(
1092 'category_padding',
1093 [
1094 'label' => esc_html__('Padding', 'ultimate-store-kit'),
1095 'type' => Controls_Manager::DIMENSIONS,
1096 'size_units' => ['px', '%'],
1097 'selectors' => [
1098 '{{WRAPPER}} .usk-heaven-slider .usk-category a' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1099 ],
1100 ]
1101 );
1102 $this->add_responsive_control(
1103 'category_margin',
1104 [
1105 'label' => esc_html__('Margin', 'ultimate-store-kit'),
1106 'type' => Controls_Manager::DIMENSIONS,
1107 'size_units' => ['px', '%'],
1108 'selectors' => [
1109 '{{WRAPPER}} .usk-heaven-slider .usk-category' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1110 ],
1111 ]
1112 );
1113
1114 $this->add_responsive_control(
1115 'category_space_between',
1116 [
1117 'label' => esc_html__('Space Between', 'ultimate-store-kit'),
1118 'type' => Controls_Manager::SLIDER,
1119 'size_units' => ['px', 'em', '%'],
1120 'selectors' => [
1121 '{{WRAPPER}} .usk-heaven-slider .usk-category' => 'gap: {{SIZE}}{{UNIT}};',
1122 ],
1123 ]
1124 );
1125 $this->add_group_control(
1126 Group_Control_Typography::get_type(),
1127 [
1128 'name' => 'category_typography',
1129 'label' => esc_html__('Typography', 'ultimate-store-kit'),
1130 'selector' => '{{WRAPPER}} .usk-heaven-slider .usk-category a',
1131 ]
1132 );
1133 $this->add_group_control(
1134 Group_Control_Box_Shadow::get_type(),
1135 [
1136 'name' => 'category_shadow',
1137 'selector' => '{{WRAPPER}} .usk-heaven-slider .usk-category a',
1138 ]
1139 );
1140 $this->end_controls_tab();
1141 $this->start_controls_tab(
1142 'category_tab_hover',
1143 [
1144 'label' => esc_html__('Hover', 'ultimate-store-kit'),
1145 ]
1146 );
1147 $this->add_control(
1148 'hover_category_color',
1149 [
1150 'label' => esc_html__('Color', 'ultimate-store-kit'),
1151 'type' => Controls_Manager::COLOR,
1152 'selectors' => [
1153 '{{WRAPPER}} .usk-heaven-slider .usk-category a:hover' => 'color: {{VALUE}};',
1154 ],
1155 ]
1156 );
1157 $this->add_group_control(
1158 Group_Control_Background::get_type(),
1159 [
1160 'name' => 'hover_category_bg_color',
1161 'selector' => '{{WRAPPER}} .usk-heaven-slider .usk-category a:hover',
1162 ]
1163 );
1164 $this->add_control(
1165 'hover_category_border_color',
1166 [
1167 'label' => esc_html__('Border Color', 'ultimate-store-kit'),
1168 'type' => Controls_Manager::COLOR,
1169 'selectors' => [
1170 '{{WRAPPER}} .usk-heaven-slider .usk-category a:hover' => 'border-color: {{VALUE}};',
1171 ],
1172 'condition' => [
1173 'category_border_border!' => ''
1174 ],
1175 'separator' => 'before'
1176 ]
1177 );
1178 $this->end_controls_tab();
1179 $this->end_controls_tabs();
1180 $this->end_controls_section();
1181
1182 $this->start_controls_section(
1183 'section_style_navigation',
1184 [
1185 'label' => __('Navigation', 'ultimate-store-kit'),
1186 'tab' => Controls_Manager::TAB_STYLE,
1187 'condition' => [
1188 'show_arrows' => 'yes'
1189 ],
1190 ]
1191 );
1192
1193 $this->add_control(
1194 'nav_arrows_icon',
1195 [
1196 'label' => esc_html__('Arrows Icon', 'ultimate-store-kit'),
1197 'type' => Controls_Manager::SELECT,
1198 'default' => '0',
1199 'options' => [
1200 '0' => esc_html__('Default', 'ultimate-store-kit'),
1201 '1' => esc_html__('Style 1', 'ultimate-store-kit'),
1202 '2' => esc_html__('Style 2', 'ultimate-store-kit'),
1203 '3' => esc_html__('Style 3', 'ultimate-store-kit'),
1204 '4' => esc_html__('Style 4', 'ultimate-store-kit'),
1205 '5' => esc_html__('Style 5', 'ultimate-store-kit'),
1206 '6' => esc_html__('Style 6', 'ultimate-store-kit'),
1207 '7' => esc_html__('Style 7', 'ultimate-store-kit'),
1208 '8' => esc_html__('Style 8', 'ultimate-store-kit'),
1209 '9' => esc_html__('Style 9', 'ultimate-store-kit'),
1210 '10' => esc_html__('Style 10', 'ultimate-store-kit'),
1211 '11' => esc_html__('Style 11', 'ultimate-store-kit'),
1212 '12' => esc_html__('Style 12', 'ultimate-store-kit'),
1213 '13' => esc_html__('Style 13', 'ultimate-store-kit'),
1214 '14' => esc_html__('Style 14', 'ultimate-store-kit'),
1215 '15' => esc_html__('Style 15', 'ultimate-store-kit'),
1216 '16' => esc_html__('Style 16', 'ultimate-store-kit'),
1217 '17' => esc_html__('Style 17', 'ultimate-store-kit'),
1218 '18' => esc_html__('Style 18', 'ultimate-store-kit'),
1219 'circle-1' => esc_html__('Style 19', 'ultimate-store-kit'),
1220 'circle-2' => esc_html__('Style 20', 'ultimate-store-kit'),
1221 'circle-3' => esc_html__('Style 21', 'ultimate-store-kit'),
1222 'circle-4' => esc_html__('Style 22', 'ultimate-store-kit'),
1223 'square-1' => esc_html__('Style 23', 'ultimate-store-kit'),
1224 ],
1225 ]
1226 );
1227
1228 $this->start_controls_tabs('tabs_navigation_arrows_style');
1229
1230 $this->start_controls_tab(
1231 'tabs_nav_arrows_normal',
1232 [
1233 'label' => __('Normal', 'ultimate-store-kit'),
1234 ]
1235 );
1236
1237 $this->add_control(
1238 'arrows_color',
1239 [
1240 'label' => __('Color', 'ultimate-store-kit'),
1241 'type' => Controls_Manager::COLOR,
1242 'selectors' => [
1243 '{{WRAPPER}} .usk-heaven-slider .usk-nav-btn' => 'color: {{VALUE}}',
1244 ],
1245 ]
1246 );
1247
1248 $this->add_group_control(
1249 Group_Control_Background::get_type(),
1250 [
1251 'name' => 'arrows_background',
1252 'label' => esc_html__('Background', 'ultimate-store-kit'),
1253 'types' => ['classic', 'gradient'],
1254 'selector' => '{{WRAPPER}} .usk-heaven-slider .usk-nav-btn',
1255 ]
1256 );
1257
1258 $this->add_group_control(
1259 Group_Control_Border::get_type(),
1260 [
1261 'name' => 'nav_arrows_border',
1262 'selector' => '{{WRAPPER}} .usk-heaven-slider .usk-nav-btn',
1263 'separator' => 'before'
1264 ]
1265 );
1266
1267 $this->add_responsive_control(
1268 'border_radius',
1269 [
1270 'label' => __('Border Radius', 'ultimate-store-kit'),
1271 'type' => Controls_Manager::DIMENSIONS,
1272 'size_units' => ['px', '%'],
1273 'selectors' => [
1274 '{{WRAPPER}} .usk-heaven-slider .usk-nav-btn' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1275 ],
1276 ]
1277 );
1278
1279 $this->add_responsive_control(
1280 'arrows_padding',
1281 [
1282 'label' => esc_html__('Padding', 'ultimate-store-kit'),
1283 'type' => Controls_Manager::DIMENSIONS,
1284 'size_units' => ['px', 'em', '%'],
1285 'selectors' => [
1286 '{{WRAPPER}} .usk-heaven-slider .usk-nav-btn' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1287 ],
1288 ]
1289 );
1290
1291 $this->add_responsive_control(
1292 'arrows_margin',
1293 [
1294 'label' => esc_html__('Margin', 'ultimate-store-kit'),
1295 'type' => Controls_Manager::DIMENSIONS,
1296 'size_units' => ['px', 'em', '%'],
1297 'selectors' => [
1298 '{{WRAPPER}} .usk-heaven-slider .usk-navigation-wrap' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1299 ],
1300 ]
1301 );
1302
1303 $this->add_responsive_control(
1304 'arrows_size',
1305 [
1306 'label' => __('Size', 'ultimate-store-kit'),
1307 'type' => Controls_Manager::SLIDER,
1308 'range' => [
1309 'px' => [
1310 'min' => 10,
1311 'max' => 100,
1312 ],
1313 ],
1314 'selectors' => [
1315 '{{WRAPPER}} .usk-heaven-slider .usk-nav-btn' => 'font-size: {{SIZE || 18}}{{UNIT}};',
1316 ],
1317 ]
1318 );
1319
1320 $this->add_responsive_control(
1321 'arrows_space',
1322 [
1323 'label' => __('Space Between Arrows', 'ultimate-store-kit'),
1324 'type' => Controls_Manager::SLIDER,
1325 'range' => [
1326 'px' => [
1327 'min' => 0,
1328 'max' => 100,
1329 ],
1330 ],
1331 'selectors' => [
1332 '{{WRAPPER}} .usk-heaven-slider .usk-navigation-wrap' => 'grid-column-gap: {{SIZE}}px;',
1333 ],
1334 ]
1335 );
1336
1337 $this->end_controls_tab();
1338
1339 $this->start_controls_tab(
1340 'tabs_nav_arrows_hover',
1341 [
1342 'label' => __('Hover', 'ultimate-store-kit'),
1343 ]
1344 );
1345
1346 $this->add_control(
1347 'arrows_hover_color',
1348 [
1349 'label' => __('Color', 'ultimate-store-kit'),
1350 'type' => Controls_Manager::COLOR,
1351 'selectors' => [
1352 '{{WRAPPER}} .usk-heaven-slider .usk-nav-btn:hover' => 'color: {{VALUE}}',
1353 ],
1354 ]
1355 );
1356
1357 $this->add_group_control(
1358 Group_Control_Background::get_type(),
1359 [
1360 'name' => 'arrows_hover_background',
1361 'label' => esc_html__('Background', 'ultimate-store-kit'),
1362 'types' => ['classic', 'gradient'],
1363 'selector' => '{{WRAPPER}} .usk-heaven-slider .usk-nav-btn:hover',
1364 ]
1365 );
1366
1367 $this->add_control(
1368 'nav_arrows_hover_border_color',
1369 [
1370 'label' => __('Border Color', 'ultimate-store-kit'),
1371 'type' => Controls_Manager::COLOR,
1372 'selectors' => [
1373 '{{WRAPPER}} .usk-heaven-slider .usk-nav-btn:hover' => 'border-color: {{VALUE}};',
1374 ],
1375 ]
1376 );
1377
1378 $this->end_controls_tab();
1379
1380 $this->end_controls_tabs();
1381
1382 $this->end_controls_section();
1383
1384 $this->start_controls_section(
1385 'section_style_thumbs_slide',
1386 [
1387 'label' => esc_html__('Thumbs', 'ultimate-store-kit'),
1388 'tab' => Controls_Manager::TAB_STYLE,
1389 ]
1390 );
1391
1392 $this->start_controls_tabs('tabs_thumbs_style');
1393
1394 $this->start_controls_tab(
1395 'tabs_thumbs_normal',
1396 [
1397 'label' => __('Normal', 'ultimate-store-kit'),
1398 ]
1399 );
1400
1401 $this->add_group_control(
1402 Group_Control_Background::get_type(),
1403 [
1404 'name' => 'thumbs_items_background',
1405 'label' => esc_html__('Background', 'ultimate-store-kit'),
1406 'types' => ['classic', 'gradient'],
1407 'selector' => '{{WRAPPER}} .usk-heaven-slider .usk-thumbs-slider .usk-item:before',
1408 ]
1409 );
1410
1411 $this->add_group_control(
1412 Group_Control_Border::get_type(),
1413 [
1414 'name' => 'thumbs_items_border',
1415 'label' => __('Border', 'ultimate-store-kit'),
1416 'fields_options' => [
1417 'border' => [
1418 'default' => 'solid',
1419 ],
1420 'width' => [
1421 'default' => [
1422 'top' => '1',
1423 'right' => '1',
1424 'bottom' => '1',
1425 'left' => '1',
1426 'isLinked' => false,
1427 ],
1428 ],
1429 'color' => [
1430 'default' => '#e8e8ea',
1431 ],
1432 ],
1433 'selector' => '{{WRAPPER}} .usk-heaven-slider .usk-thumbs-slider .usk-item:before',
1434 'separator' => 'before'
1435 ]
1436 );
1437
1438 $this->add_responsive_control(
1439 'thumbs_items_radius',
1440 [
1441 'label' => esc_html__('Border Radius', 'ultimate-store-kit'),
1442 'type' => Controls_Manager::DIMENSIONS,
1443 'size_units' => ['px'],
1444 'selectors' => [
1445 '{{WRAPPER}} .usk-heaven-slider .usk-thumbs-slider .usk-item:before' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}; overflow: hidden;',
1446 ],
1447 ]
1448 );
1449
1450 $this->end_controls_tab();
1451
1452 $this->start_controls_tab(
1453 'tabs_thumbs_hover',
1454 [
1455 'label' => __('Hover', 'ultimate-store-kit'),
1456 ]
1457 );
1458
1459 $this->add_control(
1460 'thumbs_items_hover_border_color',
1461 [
1462 'label' => __('Border Color', 'ultimate-store-kit'),
1463 'type' => Controls_Manager::COLOR,
1464 'default' => '#5bb300',
1465 'selectors' => [
1466 '{{WRAPPER}} .usk-heaven-slider .usk-thumbs-slider .usk-item:hover::before' => 'border-color: {{VALUE}};',
1467 ],
1468 'condition' => [
1469 'thumbs_items_border_border!' => ''
1470 ]
1471 ]
1472 );
1473
1474 $this->end_controls_tab();
1475
1476 $this->start_controls_tab(
1477 'tabs_thumbs_active',
1478 [
1479 'label' => __('Active', 'ultimate-store-kit'),
1480 ]
1481 );
1482
1483 $this->add_control(
1484 'thumbs_items_active_border_color',
1485 [
1486 'label' => __('Border Color', 'ultimate-store-kit'),
1487 'type' => Controls_Manager::COLOR,
1488 'default' => '#5bb300',
1489 'selectors' => [
1490 '{{WRAPPER}} .usk-heaven-slider .usk-thumbs-slider .usk-item.swiper-slide-active::before' => 'border-color: {{VALUE}};',
1491 ],
1492 'condition' => [
1493 'thumbs_items_border_border!' => ''
1494 ]
1495 ]
1496 );
1497
1498 $this->end_controls_tab();
1499
1500 $this->end_controls_tabs();
1501
1502 $this->end_controls_section();
1503 }
1504
1505 public function render_image() {
1506 global $product;
1507 $settings = $this->get_settings_for_display();
1508 $product_image = wp_get_attachment_image_url(get_post_thumbnail_id(), $settings['image_size']);
1509 ?>
1510 <div class="usk-image-wrap">
1511 <img class="usk-img" src="<?php echo esc_url($product_image); ?>" alt="<?php echo esc_html(get_the_title()); ?>">
1512 </div>
1513 <?php
1514 }
1515
1516 public function render_slider_header() {
1517 $settings = $this->get_settings_for_display();
1518 $this->add_render_attribute('slider', 'class', ['usk-heaven-slider']);
1519 $id = 'ultimate-store-kit-' . $this->get_id();
1520
1521 $this->add_render_attribute('slider', 'id', $id);
1522
1523 $this->add_render_attribute(
1524 [
1525 'slider' => [
1526 'data-settings' => [
1527 wp_json_encode(array_filter([
1528 "autoplay" => ("yes" == $settings["autoplay"]) ? ["delay" => $settings["autoplay_speed"]] : false,
1529 "loop" => ($settings["loop"] == "yes") ? true : false,
1530 "speed" => $settings["speed"]["size"],
1531 "pauseOnHover" => ("yes" == $settings["pauseonhover"]) ? true : false,
1532 "grabCursor" => ($settings["grab_cursor"] === "yes") ? true : false,
1533 "effect" => 'fade',
1534 "fadeEffect" => ['crossFade' => true],
1535 "lazy" => true,
1536 "mousewheel" => ($settings["mousewheel"]) ? true : false,
1537 "observer" => ($settings["observer"]) ? true : false,
1538 "observeParents" => ($settings["observer"]) ? true : false,
1539 "slidesPerView" => 1,
1540 "loopedSlides" => 4,
1541 "navigation" => [
1542 "nextEl" => "#" . $id . " .usk-button-next",
1543 "prevEl" => "#" . $id . " .usk-button-prev",
1544 ],
1545 "lazy" => [
1546 "loadPrevNext" => "true",
1547 ],
1548
1549 ]))
1550 ]
1551 ]
1552 ]
1553 );
1554 ?>
1555 <div class="ultimate-store-kit">
1556 <div <?php $this->print_render_attribute_string('slider'); ?>>
1557 <div class="swiper usk-main-slider">
1558 <div class="swiper-wrapper">
1559 <?php
1560 }
1561
1562 public function render_slider_footer() {
1563 $settings = $this->get_settings_for_display();
1564 ?>
1565 </div>
1566 </div>
1567
1568 <?php if ($settings['show_arrows']) : ?>
1569 <div class="usk-navigation-wrap" style="direction:ltr;">
1570 <div class="usk-nav-btn usk-button-next">
1571 <i class="usk-icon-arrow-right-<?php echo esc_html($settings['nav_arrows_icon']); ?>" aria-hidden="true"></i>
1572 </div>
1573 <div class="usk-nav-btn usk-button-prev">
1574 <i class="usk-icon-arrow-left-<?php echo esc_html($settings['nav_arrows_icon']); ?>" aria-hidden="true"></i>
1575 </div>
1576 </div>
1577 <?php endif; ?>
1578
1579 <!-- thumbsslider -->
1580 <div thumbsSlider="" class="usk-thumbs-slider">
1581 <div class="swiper-wrapper">
1582 <?php $this->render_thumbs_item(); ?>
1583 </div>
1584 </div>
1585 <!-- thumbsslider -->
1586 </div>
1587 </div>
1588 <?php
1589 }
1590
1591 public function print_price_output($output) {
1592 $tags = [
1593 'del' => ['aria-hidden' => []],
1594 'span' => ['class' => []],
1595 'bdi' => [],
1596 'ins' => [],
1597 ];
1598
1599 if (isset($output)) {
1600 echo wp_kses($output, $tags);
1601 }
1602 }
1603
1604 public function render_loop_item() {
1605 $settings = $this->get_settings_for_display();
1606 $id = 'usk-wc-product-' . $this->get_id();
1607 $modal_id = wp_unique_id('modal-id-');
1608
1609 // $wp_query = $this->render_query();
1610 $this->query_product();
1611 $wp_query = $this->get_query();
1612 if ($wp_query->have_posts()) { ?>
1613 <?php while ($wp_query->have_posts()) : $wp_query->the_post();
1614 global $product;
1615 $tooltip_position = 'top';
1616
1617 $rating_count = $product->get_rating_count();
1618 $average = $product->get_average_rating();
1619 if ($settings['show_rating'] == 'yes') {
1620 $this->add_render_attribute('usk-item', 'class', ['usk-item swiper-slide', 'usk-have-rating'], true);
1621 } else {
1622 $this->add_render_attribute('usk-item', 'class', ['usk-item swiper-slide'], true);
1623 }
1624
1625 ?>
1626 <div <?php $this->print_render_attribute_string('usk-item'); ?>>
1627 <div class="usk-item-box">
1628 <?php $this->render_image(); ?>
1629 <div class="usk-content">
1630
1631 <div class="usk-badge-label-wrapper">
1632 <div class="usk-badge-label-content">
1633 <?php $this->register_global_template_badge_label(); ?>
1634 </div>
1635 </div>
1636
1637 <div>
1638
1639 <?php if ('yes' == $settings['show_category']) : ?>
1640 <?php printf('<div class="usk-category">%1$s</div>', wp_kses_post(wc_get_product_category_list($product->get_id(), ' '))); ?>
1641 <?php endif; ?>
1642
1643 <?php if ('yes' == $settings['show_title']) :
1644 printf('<%1$s class="usk-title"><a href="%2$s">%3$s</a></%1$s>', esc_attr($settings['title_tags']), esc_url($product->get_permalink()), esc_html($product->get_title()));
1645 endif; ?>
1646
1647 <?php if ('yes' == $settings['show_excerpt']) : ?>
1648 <div class="usk-text">
1649 <?php echo wp_kses_post(wp_trim_words($product->get_short_description(), $settings['excerpt_limit'], '...')); ?>
1650 </div>
1651 <?php endif; ?>
1652
1653 <?php if ('yes' == $settings['show_price']) : ?>
1654 <div class="usk-price">
1655 <?php
1656 $this->print_price_output($product->get_price_html());
1657 ?>
1658 </div>
1659 <?php endif; ?>
1660
1661 <?php if ('yes' == $settings['show_rating']) : ?>
1662 <div class="usk-rating">
1663 <span><?php echo $this->register_global_template_wc_rating($average, wp_kses_post($rating_count)); ?></span>
1664 </div>
1665 <?php endif; ?>
1666
1667 <?php if ('yes' == $settings['show_cart'] or 'yes' == $settings['show_wishlist'] or 'yes' == $settings['show_quick_view']) : ?>
1668 <div class="usk-action-btn">
1669 <?php
1670 $this->register_global_template_add_to_cart($tooltip_position);
1671 $this->register_global_template_add_to_wishlist($tooltip_position);
1672 $this->register_global_template_quick_view($product->get_id(), $tooltip_position);
1673 ?>
1674 </div>
1675 <?php endif; ?>
1676 </div>
1677 <!-- div uses for space -->
1678 <div></div>
1679
1680 </div>
1681 </div>
1682 </div>
1683 <?php endwhile;
1684 wp_reset_postdata();
1685 } else {
1686 echo '<div class="usk-alert-warning" usk-alert>' . esc_html__('Ops! There no product to display.', 'ultimate-store-kit') . '</div>';
1687 }
1688 }
1689
1690 public function render_thumbs_item() {
1691 $settings = $this->get_settings_for_display();
1692 $this->query_product();
1693 $wp_query = $this->get_query();
1694 if ($wp_query->have_posts()) { ?>
1695 <?php while ($wp_query->have_posts()) : $wp_query->the_post();
1696 global $product;
1697
1698 ?>
1699 <div class="swiper-slide usk-item">
1700 <div class="usk-item-box">
1701 <?php $this->render_image(); ?>
1702 </div>
1703 </div>
1704 <?php endwhile;
1705 wp_reset_postdata();
1706 } else {
1707 echo '<div class="usk-alert-warning" usk-alert>' . esc_html__('Ops! There no product to display.', 'ultimate-store-kit') . '</div>';
1708 }
1709 }
1710
1711 public function render() {
1712 $this->render_slider_header();
1713 $this->render_loop_item();
1714 $this->render_slider_footer();
1715 }
1716 public function query_product() {
1717 $default = $this->getGroupControlQueryArgs();
1718 $this->_query = new WP_Query($default);
1719 }
1720 }
1721