PluginProbe
Ultimate Store Kit – Store Builder Addons for Elementor, WooCommerce Store Builder, EDD Store Builder / 1.5.2
Ultimate Store Kit – Store Builder Addons for Elementor, WooCommerce Store Builder, EDD Store Builder v1.5.2
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 / product-list / widgets / product-list.php

product-list.php in Ultimate Store Kit – Store Builder Addons for Elementor, WooCommerce Store Builder, EDD Store Builder 1.5.2, at modules/product-list/widgets/product-list.php

698 lines 25.7 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\ProductList\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_Box_Shadow;
11 use Elementor\Group_Control_Image_Size;
12 use Elementor\Group_Control_Typography;
13 use UltimateStoreKit\traits\Global_Widget_Controls;
14 use UltimateStoreKit\traits\Global_Widget_Template;
15 // use UltimateStoreKit\traits\Global_Swiper_Template;
16 use UltimateStoreKit\Includes\Controls\GroupQuery\Group_Control_Query;
17 use WP_Query;
18
19 if (!defined('ABSPATH')) {
20 exit;
21 }
22
23 // Exit if accessed directly
24
25 class Product_List extends Module_Base {
26 use Global_Widget_Controls;
27 use Global_Widget_Template;
28 // use Global_Swiper_Template;
29 use Group_Control_Query;
30
31 /**
32 * @var \WP_Query
33 */
34 private $_query = null;
35 public function get_name() {
36 return 'usk-product-list';
37 }
38
39 public function get_title() {
40 return esc_html__('Product List', 'ultimate-store-kit');
41 }
42
43 public function get_icon() {
44 return 'usk-widget-icon usk-icon-product-list';
45 }
46
47 public function get_categories() {
48 return ['ultimate-store-kit'];
49 }
50
51 public function get_keywords() {
52 return ['product', 'product-grid', 'table', 'wc'];
53 }
54
55 public function get_script_depends() {
56 return ['micromodal'];
57 }
58
59 public function get_style_depends() {
60 if ($this->usk_is_edit_mode()) {
61 return ['usk-all-styles'];
62 } else {
63 return ['ultimate-store-kit-font', 'usk-product-list'];
64 }
65 }
66
67 public function get_custom_help_url() {
68 return 'https://youtu.be/qJQ9wfdoMKg';
69 }
70
71 public function get_query() {
72 return $this->_query;
73 }
74 protected function register_controls() {
75
76 $this->start_controls_section(
77 'section_woocommerce_layout',
78 [
79 'label' => esc_html__('Layout', 'ultimate-store-kit'),
80 ]
81 );
82 $this->add_responsive_control(
83 'items_gap',
84 [
85 'label' => esc_html__('Items Gap', 'ultimate-wook'),
86 'type' => Controls_Manager::SLIDER,
87 'default' => [
88 'size' => 20,
89 ],
90 'selectors' => [
91 '{{WRAPPER}} .ultimate-store-kit .usk-list-wrap' => 'grid-gap: {{SIZE}}px;',
92 ],
93 ]
94 );
95 $this->add_control(
96 'title_tags',
97 [
98 'label' => esc_html__('Title HTML Tag', 'ultimate-store-kit'),
99 'type' => Controls_Manager::SELECT,
100 'default' => 'h3',
101 'options' => ultimate_store_kit_title_tags(),
102 ]
103 );
104 $this->add_group_control(
105 Group_Control_Image_Size::get_type(),
106 [
107 'name' => 'image',
108 'label' => esc_html__('Image Size', 'ultimate-store-kit'),
109 'exclude' => ['custom'],
110 'default' => 'full',
111 ]
112 );
113
114 $this->end_controls_section();
115 $this->start_controls_section(
116 'section_post_query_builder',
117 [
118 'label' => __('Query', 'ultimate-store-kit'),
119 'tab' => Controls_Manager::TAB_CONTENT,
120 ]
121 );
122 $this->register_query_builder_controls();
123 $this->register_controls_wc_additional();
124 $this->end_controls_section();
125
126 $this->start_controls_section(
127 'section_woocommerce_additional',
128 [
129 'label' => esc_html__('Additional', 'ultimate-store-kit'),
130 ]
131 );
132 $this->start_controls_tabs(
133 'tabs_show_hide_content'
134 );
135 $this->start_controls_tab(
136 'show_content_tab',
137 [
138 'label' => esc_html__('Content', 'ultimate-store-kit'),
139 ]
140 );
141 $this->add_control(
142 'show_image',
143 [
144 'label' => esc_html__('Image', 'ultimate-store-kit'),
145 'type' => Controls_Manager::SWITCHER,
146 'return_value' => 'yes',
147 'default' => 'yes',
148 ]
149 );
150 $this->add_control(
151 'show_title',
152 [
153 'label' => esc_html__('Title', 'ultimate-store-kit'),
154 'type' => Controls_Manager::SWITCHER,
155 'return_value' => 'yes',
156 'default' => 'yes',
157 ]
158 );
159 $this->add_control(
160 'show_price',
161 [
162 'label' => esc_html__('Price', 'ultimate-store-kit'),
163 'type' => Controls_Manager::SWITCHER,
164 'default' => 'yes',
165 ]
166 );
167 $this->add_control(
168 'show_rating',
169 [
170 'label' => esc_html__('Rating', 'ultimate-store-kit'),
171 'type' => Controls_Manager::SWITCHER,
172 'default' => 'yes',
173 ]
174 );
175 $this->add_control(
176 'hide_customer_review',
177 [
178 'label' => esc_html__('Hide Review Text', 'ultimate-store-kit'),
179 'type' => Controls_Manager::SWITCHER,
180 'label_on' => esc_html__('Yes', 'product-grid'),
181 'label_off' => esc_html__('No', 'product-grid'),
182 // 'return_value' => 'yes',
183 'default' => 'yes',
184 'condition' => [
185 'show_rating' => 'yes',
186 ],
187 'selectors' => [
188 '{{WRAPPER}} .usk-recently-view-products .usk-rating .woocommerce-product-rating .woocommerce-review-link' => 'display:none',
189 ],
190 ]
191 );
192
193 $this->end_controls_tab();
194 $this->start_controls_tab(
195 'show_badge_tab',
196 [
197 'label' => esc_html__('Badge', 'ultimate-store-kit'),
198 ]
199 );
200 $this->add_control(
201 'show_sale_badge',
202 [
203 'label' => esc_html__('Sale', 'ultimate-store-kit'),
204 'type' => Controls_Manager::SWITCHER,
205 'default' => 'yes',
206 ]
207 );
208 $this->add_control(
209 'show_discount_badge',
210 [
211 'label' => esc_html__('Percentage', 'ultimate-store-kit'),
212 'type' => Controls_Manager::SWITCHER,
213 'default' => 'yes',
214 ]
215 );
216 $this->add_control(
217 'show_stock_status',
218 [
219 'label' => esc_html__('Stock Status', 'ultimate-store-kit'),
220 'type' => Controls_Manager::SWITCHER,
221 'default' => 'yes',
222 ]
223 );
224 $this->add_control(
225 'show_trending_badge',
226 [
227 'label' => esc_html__('Trending', 'ultimate-store-kit'),
228 'type' => Controls_Manager::SWITCHER,
229 'default' => 'yes',
230 ]
231 );
232 $this->add_control(
233 'show_new_badge',
234 [
235 'label' => esc_html__('New', 'ultimate-store-kit'),
236 'type' => Controls_Manager::SWITCHER,
237 'default' => 'yes',
238 ]
239 );
240 $this->add_control(
241 'newness_days',
242 [
243 'label' => esc_html__('Newness Days', 'ultimate-store-kit'),
244 'type' => Controls_Manager::NUMBER,
245 'default' => 90,
246 'description' => esc_html__('Define newness day from product created date; default newness day is 30', 'ultimate-store-kit'),
247 'condition' => [
248 'show_new_badge' => 'yes',
249 ],
250 ]
251 );
252 $this->end_controls_tab();
253 $this->end_controls_tabs();
254
255 // $this-> add_control(
256 // 'heading_show_hide_badge',
257 // [
258 // 'label' => esc_html__( 'Badge', 'ultimate-store-kit' ),
259 // 'type' => Controls_Manager::HEADING,
260 // 'separator' => 'before',
261 // ]
262 // );
263
264 $this->end_controls_section();
265 $this->start_controls_section(
266 'section_style_item',
267 [
268 'label' => esc_html__('Items', 'ultimate-store-kit'),
269 'tab' => Controls_Manager::TAB_STYLE,
270 ]
271 );
272 $this->add_group_control(
273 Group_Control_Background::get_type(),
274 [
275 'name' => 'item_background',
276 'label' => esc_html__('Background', 'ultimate-store-kit'),
277 'types' => ['classic', 'gradient'],
278 'selector' => '{{WRAPPER}} .ultimate-store-kit .usk-list-wrap .usk-item',
279 ]
280 );
281 $this->add_control(
282 'item_padding',
283 [
284 'label' => esc_html__('Padding', 'ultimate-store-kit'),
285 'type' => Controls_Manager::DIMENSIONS,
286 'size_units' => ['px', '%', 'em'],
287 'selectors' => [
288 '{{WRAPPER}} .ultimate-store-kit .usk-list-wrap .usk-item' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
289 ],
290 ]
291 );
292 $this->add_control(
293 'item_margin',
294 [
295 'label' => esc_html__('Margin', 'ultimate-store-kit'),
296 'type' => Controls_Manager::DIMENSIONS,
297 'size_units' => ['px', '%', 'em'],
298 'selectors' => [
299 '{{WRAPPER}} .ultimate-store-kit .usk-list-wrap .usk-item' => 'border: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
300 ],
301 ]
302 );
303 $this->add_group_control(
304 Group_Control_Border::get_type(),
305 [
306 'name' => 'item_border',
307 'label' => esc_html__('Border', 'ultimate-store-kit'),
308 'selector' => '{{WRAPPER}} .ultimate-store-kit .usk-list-wrap .usk-item',
309 ]
310 );
311 $this->add_control(
312 'item_border_radius',
313 [
314 'label' => esc_html__('Radius', 'ultimate-store-kit'),
315 'type' => Controls_Manager::DIMENSIONS,
316 'size_units' => ['px', '%', 'em'],
317 'selectors' => [
318 '{{WRAPPER}} .ultimate-store-kit .usk-list-wrap .usk-item' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
319 ],
320 ]
321 );
322 $this->end_controls_section();
323
324 $this->start_controls_section(
325 'section_style_image',
326 [
327 'label' => esc_html__('Image', 'ultimate-store-kit'),
328 'tab' => Controls_Manager::TAB_STYLE,
329 ]
330 );
331
332 $this->add_group_control(
333 Group_Control_Border::get_type(),
334 [
335 'name' => 'image_border',
336 'label' => esc_html__('Image Border', 'ultimate-store-kit'),
337 'selector' => '{{WRAPPER}} .ultimate-store-kit .usk-list-wrap .usk-item .usk-item-box .usk-image-wrap',
338 ]
339 );
340
341 $this->add_responsive_control(
342 'image_border_radius',
343 [
344 'label' => esc_html__('Border Radius', 'ultimate-store-kit'),
345 'type' => Controls_Manager::DIMENSIONS,
346 'size_units' => ['px', '%'],
347 'selectors' => [
348 '{{WRAPPER}} .ultimate-store-kit .usk-list-wrap .usk-item .usk-item-box .usk-image-wrap' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
349 ],
350 ]
351 );
352
353 $this->add_group_control(
354 Group_Control_Box_Shadow::get_type(),
355 [
356 'name' => 'image_shadow',
357 'exclude' => [
358 'shadow_position',
359 ],
360 'selector' => '{{WRAPPER}} .ultimate-store-kit .usk-list-wrap .usk-item .usk-item-box .usk-image-wrap',
361 ]
362 );
363
364 $this->end_controls_section();
365 $this->register_global_controls_title();
366 $this->register_global_controls_price();
367 $this->register_global_controls_rating();
368 $this->start_controls_section(
369 'badge',
370 [
371 'label' => esc_html__('Badge', 'ultimate-store-kit'),
372 'tab' => Controls_Manager::TAB_STYLE,
373 ]
374 );
375 $this->start_controls_tabs(
376 'label_badge_tabs'
377 );
378 $this->start_controls_tab(
379 'sale_badge_tab',
380 [
381 'label' => esc_html__('Sale', 'ultimate-store-kit'),
382 'condition' => [
383 'show_sale_badge' => 'yes',
384 ]
385 ]
386 );
387 $this->add_control(
388 'sale_badge_color',
389 [
390 'label' => esc_html__('Color', 'ultimate-store-kit'),
391 'type' => Controls_Manager::COLOR,
392 'selectors' => [
393 '{{WRAPPER}} .usk-product-list .usk-item .usk-badge-label-wrapper .usk-sale-badge .usk-badge' => 'color: {{VALUE}}',
394 ],
395 ]
396 );
397 $this->add_control(
398 'sale_badge_bg',
399 [
400 'label' => esc_html__('Background', 'ultimae-woo-kit'),
401 'type' => Controls_Manager::COLOR,
402 'selectors' => [
403 '{{WRAPPER}} .usk-product-list .usk-item .usk-badge-label-wrapper .usk-sale-badge .usk-badge' => 'background: {{VALUE}}',
404 ],
405 ]
406 );
407 $this->end_controls_tab();
408 $this->start_controls_tab(
409 'discount_badge_tab',
410 [
411 'label' => esc_html__('Discount', 'ultimate-store-kit'),
412 'condition' => [
413 'show_discount_badge' => 'yes',
414 ],
415 ]
416 );
417 $this->add_control(
418 'discount_badge_color',
419 [
420 'label' => esc_html__('Color', 'ultimate-store-kit'),
421 'type' => Controls_Manager::COLOR,
422 'selectors' => [
423 '{{WRAPPER}} .usk-product-list .usk-item .usk-badge-label-wrapper .usk-percantage-badge .usk-badge' => 'color: {{VALUE}}',
424 ],
425 ]
426 );
427 $this->add_control(
428 'discount_badge_bg',
429 [
430 'label' => esc_html__('Background', 'ultimae-woo-kit'),
431 'type' => Controls_Manager::COLOR,
432 'selectors' => [
433 '{{WRAPPER}} .usk-product-list .usk-item .usk-badge-label-wrapper .usk-percantage-badge .usk-badge' => 'background: {{VALUE}}',
434 ],
435 ]
436 );
437 $this->end_controls_tab();
438 $this->start_controls_tab(
439 'stock_badge_tab',
440 [
441 'label' => esc_html__('Stock', 'ultimate-store-kit'),
442 'condition' => [
443 'show_stock_status' => 'yes',
444 ],
445 ]
446 );
447 $this->add_control(
448 'stock_badge_color',
449 [
450 'label' => esc_html__('Color', 'ultimate-store-kit'),
451 'type' => Controls_Manager::COLOR,
452 'selectors' => [
453 '{{WRAPPER}} .usk-product-list .usk-item .usk-badge-label-wrapper .usk-stock-status-badge .usk-badge' => 'color: {{VALUE}}',
454 ],
455 ]
456 );
457 $this->add_control(
458 'stock_badge_bg',
459 [
460 'label' => esc_html__('Background', 'ultimae-woo-kit'),
461 'type' => Controls_Manager::COLOR,
462 'selectors' => [
463 '{{WRAPPER}} .usk-product-list .usk-item .usk-badge-label-wrapper .usk-stock-status-badge .usk-badge' => 'background: {{VALUE}}',
464 ],
465 ]
466 );
467 $this->end_controls_tab();
468 $this->start_controls_tab(
469 'trending_badge_tab',
470 [
471 'label' => esc_html__('Trending', 'ultimate-store-kit'),
472 'condition' => [
473 'show_trending_badge' => 'yes',
474 ],
475 ]
476 );
477 $this->add_control(
478 'trending_badge_color',
479 [
480 'label' => esc_html__('Color', 'ultimate-store-kit'),
481 'type' => Controls_Manager::COLOR,
482 'selectors' => [
483 '{{WRAPPER}} .usk-product-list .usk-item .usk-badge-label-wrapper .usk-trending-badge .usk-badge' => 'color: {{VALUE}}',
484 ],
485 ]
486 );
487 $this->add_control(
488 'trending_badge_bg',
489 [
490 'label' => esc_html__('Background', 'ultimae-woo-kit'),
491 'type' => Controls_Manager::COLOR,
492 'selectors' => [
493 '{{WRAPPER}} .usk-product-list .usk-item .usk-badge-label-wrapper .usk-trending-badge .usk-badge' => 'background: {{VALUE}}',
494 ],
495 ]
496 );
497 $this->end_controls_tab();
498 $this->start_controls_tab(
499 'new_badge_tab',
500 [
501 'label' => esc_html__('new', 'ultimate-store-kit'),
502 'condition' => [
503 'show_new_badge' => 'yes',
504 ],
505 ]
506 );
507 $this->add_control(
508 'new_badge_color',
509 [
510 'label' => esc_html__('Color', 'ultimate-store-kit'),
511 'type' => Controls_Manager::COLOR,
512 'selectors' => [
513 '{{WRAPPER}} .usk-product-list .usk-item .usk-badge-label-wrapper .usk-new-badge .usk-badge' => 'color: {{VALUE}}',
514 ],
515 ]
516 );
517 $this->add_control(
518 'new_badge_bg',
519 [
520 'label' => esc_html__('Background', 'ultimae-woo-kit'),
521 'type' => Controls_Manager::COLOR,
522 'selectors' => [
523 '{{WRAPPER}} .usk-product-list .usk-item .usk-badge-label-wrapper .usk-new-badge .usk-badge' => 'background: {{VALUE}}',
524 ],
525 ]
526 );
527 $this->end_controls_tab();
528 $this->end_controls_tabs();
529 $this->add_responsive_control(
530 'badge_padding',
531 [
532 'label' => esc_html__('Padding', 'ultimate-store-kit'),
533 'type' => Controls_Manager::DIMENSIONS,
534 'size_units' => ['px', '%', 'em'],
535 'selectors' => [
536 '{{WRAPPER}} .usk-product-list .usk-item .usk-badge-label-wrapper div .usk-badge' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
537 ],
538 'separator' => 'before',
539 ]
540 );
541 $this->add_responsive_control(
542 'badge_margin',
543 [
544 'label' => esc_html__('Margin', 'ultimate-store-kit'),
545 'type' => Controls_Manager::DIMENSIONS,
546 'size_units' => ['px', '%', 'em'],
547 'selectors' => [
548 '{{WRAPPER}} .usk-product-list .usk-item .usk-badge-label-wrapper div .usk-badge' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
549 ],
550 ]
551 );
552 $this->add_responsive_control(
553 'badge_radius',
554 [
555 'label' => esc_html__('Radius', 'ultimate-store-kit'),
556 'type' => Controls_Manager::DIMENSIONS,
557 'size_units' => ['px', '%', 'em'],
558 'selectors' => [
559 '{{WRAPPER}} .usk-product-list .usk-item .usk-badge-label-wrapper div .usk-badge' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
560 ],
561 ]
562 );
563 $this->add_group_control(
564 Group_Control_Typography::get_type(),
565 [
566 'name' => 'badge_typography',
567 'label' => esc_html__('Typography', 'ultimate-store-kit'),
568 'selector' => '{{WRAPPER}} .usk-product-list .usk-item .usk-badge-label-wrapper div .usk-badge',
569 'separator' => 'before'
570 ]
571 );
572 $this->add_responsive_control(
573 'badge_top_spacing',
574 [
575 'label' => esc_html__('Top Spacing', 'ultimate-store-kit'),
576 'type' => Controls_Manager::SLIDER,
577 'default' => [
578 'unit' => 'px',
579 'size' => 10,
580 ],
581 'selectors' => [
582 '{{WRAPPER}} .usk-product-list .usk-item .usk-badge-label-wrapper' => 'top: {{SIZE}}{{UNIT}};',
583 ],
584 'separator' => 'before'
585 ]
586 );
587 $this->add_responsive_control(
588 'badge_right_spacing',
589 [
590 'label' => esc_html__('Right Spacing', 'ultimate-store-kit'),
591 'type' => Controls_Manager::SLIDER,
592 'default' => [
593 'unit' => 'px',
594 'size' => 10,
595 ],
596 'selectors' => [
597 '{{WRAPPER}} .usk-product-list .usk-item .usk-badge-label-wrapper' => 'right: {{SIZE}}{{UNIT}};',
598 ],
599 ]
600 );
601 $this->end_controls_section();
602 }
603
604 public function render_header() { ?>
605 <div class="ultimate-store-kit">
606 <div class="usk-product-list">
607 <div class="usk-list-wrap">
608 <?php
609 }
610 public function render_footer() {
611 ?>
612 </div>
613 </div>
614 </div>
615 <?php
616 }
617 public function render_image() {
618 $settings = $this->get_settings_for_display();
619 global $product;
620 ?>
621 <div class="usk-image-wrap">
622 <a href="<?php echo esc_url($product->get_permalink()); ?>">
623 <img class="img image-default" src="<?php echo wp_get_attachment_image_url(get_post_thumbnail_id(), $settings['image_size']); ?>" alt="<?php echo get_the_title(); ?>">
624 </a>
625 </div>
626 <?php
627 }
628 public function print_price_output($output) {
629 $tags = [
630 'del' => ['aria-hidden' => []],
631 'span' => ['class' => []],
632 'bdi' => [],
633 'ins' => [],
634 ];
635
636 if (isset($output)) {
637 echo wp_kses($output, $tags);
638 }
639 }
640 public function render_loop_item() {
641 $settings = $this->get_settings_for_display();
642 $this->query_product();
643 $wp_query = $this->get_query();
644 if ($wp_query) {
645 while ($wp_query->have_posts()) : $wp_query->the_post();
646 global $product;
647 $average = $product->get_average_rating();
648 $rating_count = $product->get_rating_count();
649 ?>
650 <div class="usk-item">
651 <div class="usk-item-box">
652 <?php
653 if ($settings['show_image']) :
654 $this->render_image();
655 endif;
656 ?>
657 <div class="usk-content">
658 <?php
659 if ($settings['show_title']) :
660 printf('<a href="%2$s" class="usk-title"><%1$s class="title">%3$s</%1$s></a>', $settings['title_tags'], $product->get_permalink(), $product->get_title());
661 endif; ?>
662 <?php if ($settings['show_rating']) : ?>
663 <div class="usk-rating">
664 <?php echo $this->register_global_template_wc_rating($average, $rating_count); ?>
665 </div>
666 <?php endif; ?>
667 <?php if ('yes' == $settings['show_price']) : ?>
668 <div class="usk-price">
669 <?php $this->print_price_output($product->get_price_html()); ?>
670 </div>
671 <?php endif; ?>
672 </div>
673 <div class="usk-badge-label-wrapper">
674 <?php $this->register_global_template_badge_label(); ?>
675 </div>
676 </div>
677 </div>
678 <?php endwhile; ?>
679 <?php
680 wp_reset_postdata();
681 } else {
682 echo '<div class="usk-alert-warning" usk-alert>' . esc_html__('Ops! There no product to display.', 'ultimate-store-kit') . '</div>';
683 }
684 }
685
686 public function render() {
687 $this->render_header();
688 $this->render_loop_item();
689 $this->render_footer();
690 }
691 public function query_product() {
692 $default = $this->getGroupControlQueryArgs();
693 $default['post_type'] = 'product';
694 unset($default['p']);
695 $this->_query = new WP_Query($default);
696 }
697 }
698