PluginProbe ʕ •ᴥ•ʔ
ShopEngine Elementor WooCommerce Builder Addon – All in One WooCommerce Solution / 4.6.9
ShopEngine Elementor WooCommerce Builder Addon – All in One WooCommerce Solution v4.6.9
4.9.2 4.9.1 4.9.0 2.0.0 2.1.0 2.2.0 2.2.1 2.2.2 2.3.0 2.4.0 2.5.0 2.5.1 3.0.0 3.1.0 3.1.1 4.0.0 4.0.1 4.1.0 4.1.1 4.2.0 4.2.1 4.3.0 4.3.1 4.4.0 4.5.0 4.5.1 4.6.0 4.6.1 4.6.2 4.6.3 4.6.4 4.6.5 4.6.6 4.6.7 4.6.8 4.6.9 4.7.0 4.7.1 4.7.2 4.7.3 4.7.4 4.7.5 4.7.6 4.7.7 4.7.8 4.7.9 4.8.0 4.8.1 4.8.2 4.8.3 4.8.4 4.8.5 4.8.6 4.8.7 4.8.8 4.8.9 trunk 0.1.2-beta 0.1.3-beta 0.1.4-beta 1.0.0 1.1.0 1.1.1 1.1.2 1.1.3 1.2.0 1.2.1 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.4.0 1.4.1 1.5.0 1.5.1 1.6.0 1.6.1 1.7.0 1.8.0 1.8.1 1.9.0
shopengine / widgets / archive-products / archive-products.php
shopengine / widgets / archive-products Last commit date
screens 1 year ago archive-products-config.php 4 years ago archive-products.php 1 year ago
archive-products.php
2546 lines
1 <?php
2
3 namespace Elementor;
4
5 use ShopEngine\Widgets\Products;
6
7 defined('ABSPATH') || exit;
8
9
10 class ShopEngine_Archive_Products extends \ShopEngine\Base\Widget
11 {
12
13 public function config()
14 {
15 return new ShopEngine_Archive_Products_Config();
16 }
17
18
19 protected function register_controls()
20 {
21 /*
22 ===============================
23 Layout Panel
24 ===============================
25 */
26 $this->start_controls_section(
27 'shopengine_section_layout',
28 [
29 'label' => esc_html__('Layout', 'shopengine'),
30 'tab' => Controls_Manager::TAB_LAYOUT,
31 ]
32 );
33
34 $this->add_control(
35 'shopengine_layout_note',
36 [
37 'type' => Controls_Manager::RAW_HTML,
38 'raw' => esc_html__('you can manage the number of columns and rows from woocommerce customizer(product catalog)', 'shopengine'),
39 'content_classes' => 'elementor-panel-alert elementor-panel-alert-info',
40 ]
41 );
42
43
44 $this->end_controls_section(); // end ./ Layout Panel
45
46 /*
47 ============================
48 Content Panel
49 ============================
50 */
51
52 $this->start_controls_section(
53 'shopengine_section_content',
54 [
55 'label' => esc_html__('Content', 'shopengine'),
56 'tab' => Controls_Manager::TAB_LAYOUT,
57 ]
58 );
59
60 $this->add_control(
61 'shopengine_archive_product_title_header_size',
62 [
63 'label' => esc_html__('Archive Product Title', 'shopengine'),
64 'type' => Controls_Manager::SELECT,
65 'description' => esc_html__("The H1 tag is important for SEO, accessibility and usability, so ideally, you should have one on each page of your site. A H1 tag should describe what the content of the given page is all about", 'shopengine'),
66 'options' => [
67 'h1' => 'H1',
68 'h2' => 'H2',
69 'h3' => 'H3',
70 'h4' => 'H4',
71 'h5' => 'H5',
72 'h6' => 'H6',
73 'div' => 'Div',
74 'span' => 'Span',
75 'p' => 'P',
76 ],
77 'default' => 'h1',
78 'prefix_class' => 'shopengine_archive_product_title_',
79 'selectors' => [
80 '{{WRAPPER}} .archive-product-title' => 'margin: 0; padding: 0;',
81 ],
82 ]
83 );
84
85 $this->add_control(
86 'shopengine_show_sale_flash',
87 [
88 'label' => esc_html__('Flash Sale Badge', 'shopengine'),
89 'type' => Controls_Manager::SWITCHER,
90 'label_on' => esc_html__('Show', 'shopengine'),
91 'label_off' => esc_html__('Hide', 'shopengine'),
92 'return_value' => 'yes',
93 'default' => 'yes',
94 'selectors' => [
95 '{{WRAPPER}} .shopengine-archive-products .product .onsale' => 'display: block;',
96 ],
97 ]
98 );
99
100 $this->add_control(
101 'shopengine_is_cats',
102 [
103 'label' => esc_html__('Show Categories', 'shopengine'),
104 'type' => Controls_Manager::SWITCHER,
105 'label_on' => esc_html__('Show', 'shopengine'),
106 'label_off' => esc_html__('Hide', 'shopengine'),
107 'return_value' => 'yes',
108 'default' => 'yes',
109 ]
110 );
111
112 $this->add_control(
113 'shopengine_is_details',
114 [
115 'label' => esc_html__('Show Description', 'shopengine'),
116 'type' => Controls_Manager::SWITCHER,
117 'label_on' => esc_html__('Show', 'shopengine'),
118 'label_off' => esc_html__('Hide', 'shopengine'),
119 'return_value' => 'yes',
120 'default' => 'no',
121 ]
122 );
123
124 $this->add_control(
125 'shopengine_archive_product_show_rating',
126 [
127 'label' => esc_html__('Rating', 'shopengine'),
128 'type' => Controls_Manager::SWITCHER,
129 'label_on' => esc_html__('Show', 'shopengine'),
130 'label_off' => esc_html__('Hide', 'shopengine'),
131 'return_value' => 'yes',
132 'default' => 'yes',
133 'selectors' => [
134 '{{WRAPPER}} .shopengine-archive-products :is(.shopengine-product-rating-review-count, .star-rating) ' => 'display: inline-flex;',
135 ],
136 ]
137 );
138
139 $this->add_control(
140 'shopengine_show_regular_price',
141 [
142 'label' => esc_html__('Show Regular Price', 'shopengine'),
143 'type' => Controls_Manager::SWITCHER,
144 'label_on' => esc_html__('Show', 'shopengine'),
145 'label_off' => esc_html__('Hide', 'shopengine'),
146 'return_value' => 'yes',
147 'default' => 'yes',
148 'selectors' => [
149 '{{WRAPPER}} .shopengine-archive-products .product .price del' => 'display: block;',
150 ],
151 ]
152 );
153
154 $this->add_control(
155 'shopengine_group_btns',
156 [
157 'label' => esc_html__('Button Group', 'shopengine'),
158 'type' => Controls_Manager::SWITCHER,
159 'label_on' => esc_html__('Show', 'shopengine'),
160 'label_off' => esc_html__('Hide', 'shopengine'),
161 ]
162 );
163
164 $this->add_control(
165 'shopengine_is_hover_details',
166 [
167 'label' => esc_html__('Footer on Hover Style', 'shopengine'),
168 'type' => Controls_Manager::SWITCHER,
169 'label_on' => esc_html__('Show', 'shopengine'),
170 'label_off' => esc_html__('Hide', 'shopengine'),
171 'return_value' => 'yes',
172 'default' => 'no',
173 ]
174 );
175
176 $this->add_control(
177 'shopengine_is_tooltip',
178 [
179 'label' => esc_html__('Add Tooltip', 'shopengine'),
180 'type' => Controls_Manager::SWITCHER,
181 'label_on' => esc_html__('Show', 'shopengine'),
182 'label_off' => esc_html__('Hide', 'shopengine'),
183 'return_value' => 'yes',
184 'default' => 'no',
185 ]
186 );
187
188 if(class_exists('\ShopEngine_Pro\Widgets\Free_Widget_Pro_Feature\Archive_Products\Archive_Products')) {
189 \ShopEngine_Pro\Widgets\Free_Widget_Pro_Feature\Archive_Products\Archive_Products::content($this);
190 }
191
192 $this->end_controls_section(); // end ./ Content Panel
193
194 /*
195 ===============================
196 pagination settings
197 ===============================
198 */
199
200 $this->start_controls_section(
201 'shopengine_pagination_settings',
202 [
203 'label' => esc_html__('Pagination', 'shopengine'),
204 'tab' => Controls_Manager::TAB_LAYOUT,
205 ]
206 );
207
208 $this->add_control(
209 'shopengine_pagination_style',
210 [
211 'label' => esc_html__('Pagination Style', 'shopengine'),
212 'type' => Controls_Manager::SELECT,
213 'default' => 'numeric',
214 'options' => [
215 'numeric' => esc_html__('Numeric', 'shopengine'),
216 'default' => esc_html__('Default', 'shopengine'),
217 'load-more' => esc_html__('Load More', 'shopengine'),
218 'load-more-on-scroll' => esc_html__('Load More On Scroll', 'shopengine'),
219 ],
220 ]
221 );
222
223
224 $this->add_control(
225 'shopengine_pagination_prev_icon',
226 [
227 'label' => esc_html__('Previous Icon', 'shopengine'),
228 'type' => Controls_Manager::ICONS,
229 'default' => [
230 'value' => 'eicon-chevron-left',
231 'library' => 'eicons',
232 ],
233 'condition' => [
234 'shopengine_pagination_style' => 'numeric',
235 ],
236 ]
237 );
238
239 $this->add_control(
240 'shopengine_pagination_next_icon',
241 [
242 'label' => esc_html__('Next Icon', 'shopengine'),
243 'type' => Controls_Manager::ICONS,
244 'default' => [
245 'value' => 'eicon-chevron-right',
246 'library' => 'eicons',
247 ],
248 'condition' => [
249 'shopengine_pagination_style' => 'numeric',
250 ],
251 ]
252 );
253
254 $this->add_control(
255 'shopengine_pagination_prev_text',
256 [
257 'label' => esc_html__('Previous button', 'shopengine'),
258 'type' => Controls_Manager::TEXT,
259 'default' => esc_html__('Previous', 'shopengine'),
260 'placeholder' => esc_html__('Enter previous button text', 'shopengine'),
261 'condition' => [
262 'shopengine_pagination_style' => 'default',
263 ],
264 ]
265 );
266
267 $this->add_control(
268 'shopengine_pagination_next_text',
269 [
270 'label' => esc_html__('Next button', 'shopengine'),
271 'type' => Controls_Manager::TEXT,
272 'default' => esc_html__('Next', 'shopengine'),
273 'placeholder' => esc_html__('Enter Next button text', 'shopengine'),
274 'condition' => [
275 'shopengine_pagination_style' => 'default',
276 ],
277 ]
278 );
279
280 $this->add_control(
281 'shopengine_pagination_loadmore_text',
282 [
283 'label' => esc_html__('Load more button text', 'shopengine'),
284 'type' => Controls_Manager::TEXT,
285 'default' => esc_html__('Load More', 'shopengine'),
286 'placeholder' => esc_html__('Enter load more button text', 'shopengine'),
287 'label_block' => true,
288 'conditions' => [
289 'relation' => 'or',
290 'terms' => [
291 [
292 'name' => 'shopengine_pagination_style',
293 'operator' => '==',
294 'value' => 'load-more',
295 ],
296 [
297 'name' => 'shopengine_pagination_style',
298 'operator' => '==',
299 'value' => 'load-more-on-scroll',
300 ],
301 ],
302 ],
303 ]
304 );
305
306 $this->end_controls_section(); // end ./ Content Panel
307
308 /*
309 ===============================
310 Custom Ordering settings
311 ===============================
312 */
313
314 $this->start_controls_section(
315 'shopengine_custom_ordering_settings',
316 [
317 'label' => esc_html__('Custom Ordering', 'shopengine'),
318 'tab' => Controls_Manager::TAB_LAYOUT,
319 ]
320 );
321
322 $this->add_control(
323 'shopengine_add_to_cart_data_ordering_enable',
324 [
325 'label' => esc_html__('Enable Ordering?', 'shopengine'),
326 'type' => Controls_Manager::SWITCHER,
327 'label_on' => esc_html__('Yes', 'shopengine'),
328 'label_off' => esc_html__('No', 'shopengine'),
329 'default' => "yes",
330 'return_value' => "yes",
331 'selectors' => [
332 '{{WRAPPER}} .shopengine-archive-products.shopengine-hover-disable .products .product' => 'display: flex; flex-direction: row; flex-wrap: wrap; align-items: center !important;',
333 '{{WRAPPER}} .shopengine-archive-products.shopengine-hover-disable .products .product a.woocommerce-LoopProduct-link' => 'width: 100%; order: -99;',
334 '{{WRAPPER}} .shopengine-archive-products .shopengine-product-description-btn-group' => 'display: flex; flex-direction: row; flex-wrap: wrap; align-items: center !important;',
335 ],
336 ]
337 );
338
339 $default = [
340 [
341 'list_title' => esc_html__('Quick View', 'shopengine'),
342 'list_key' => 'quick-view',
343 ],
344 [
345 'list_title' => esc_html__('Wishlist', 'shopengine'),
346 'list_key' => 'wishlist',
347 ],
348 [
349 'list_title' => esc_html__('Add to Cart', 'shopengine'),
350 'list_key' => 'add-to-cart',
351 ],
352 [
353 'list_title' => esc_html__('Comparison', 'shopengine'),
354 'list_key' => 'comparison',
355 ],
356 [
357 'list_title' => esc_html__('Direct Checkout (PRO)', 'shopengine'),
358 'list_key' => 'direct-checkout',
359 ],
360 ];
361
362 $repeater = new Repeater();
363 $this->add_control(
364 'shopengine_custom_ordering_list',
365 [
366 'label' => esc_html__('Ordering List', 'shopengine'),
367 'type' => Controls_Manager::REPEATER,
368 'fields' => $repeater->get_controls(),
369 'default' => $default,
370 'title_field' => '{{{ list_title }}}',
371 'item_actions' => [
372 'add' => false,
373 'duplicate' => false,
374 'remove' => false,
375 'sort' => true,
376 ],
377 'condition' => [
378 'shopengine_add_to_cart_data_ordering_enable' => 'yes',
379 ]
380 ]
381 );
382 $this->end_controls_section(); // end ./ Content Panel
383
384
385 /*
386 ---------------------------------
387 Container controls
388 ---------------------------------
389 */
390 $this->start_controls_section(
391 'shopengine_section_container_styles',
392 [
393 'label' => esc_html__('Product Container', 'shopengine'),
394 'tab' => Controls_Manager::TAB_STYLE,
395 ]
396 );
397
398 $this->add_responsive_control(
399 'shopengine_container_text_align',
400 [
401 'label' => esc_html__('Alignment', 'shopengine'),
402 'type' => Controls_Manager::CHOOSE,
403 'options' => [
404 'left' => [
405 'title' => esc_html__('Left', 'shopengine'),
406 'icon' => 'eicon-text-align-left',
407 ],
408 'center' => [
409 'title' => esc_html__('Center', 'shopengine'),
410 'icon' => 'eicon-text-align-center',
411 ],
412 'right' => [
413 'title' => esc_html__('Right', 'shopengine'),
414 'icon' => 'eicon-text-align-right',
415 ],
416 ],
417 'default' => 'left',
418 'selectors_dictionary' => [
419 'left' => '-webkit-box-pack: start; -ms-flex-pack: start; justify-content: flex-start;text-align:left;',
420 'center' => '-webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;text-align:center;',
421 'right' => '-webkit-box-pack: end; -ms-flex-pack: end; justify-content: flex-end;text-align:right;',
422 ],
423 'selectors' => [
424 '{{WRAPPER}} .shopengine-archive-products:not(.shopengine-archive-products--view-list) .product > a' => '{{VALUE}}',
425 '{{WRAPPER}} .shopengine-archive-products:not(.shopengine-archive-products--view-list) .shopengine-product-description-btn-group' => '{{VALUE}}',
426 '{{WRAPPER}} .shopengine-archive-products.shopengine-hover-disable .products .product' => '{{VALUE}}',
427 '.rtl {{WRAPPER}}.elementor-align-left a.woocommerce-LoopProduct-link' => 'text-align:right;',
428 '.rtl {{WRAPPER}}.elementor-align-right a.woocommerce-LoopProduct-link' => 'text-align:left;',
429 ],
430 'prefix_class' => 'elementor%s-align-',
431 'separator' => 'after',
432 ]
433 );
434
435 $this->add_control(
436 'shopengine_background',
437 [
438 'label' => esc_html__('Background Color', 'shopengine'),
439 'type' => Controls_Manager::COLOR,
440 'alpha' => false,
441 'selectors' => [
442 '{{WRAPPER}} .shopengine-archive-products .archive-product-container' => 'background-color: {{VALUE}};',
443 '{{WRAPPER}} .shopengine-archive-products .archive-product-container .shopengine-product-description-footer' => 'background-color: {{VALUE}};',
444 ],
445 ]
446 );
447
448 $this->add_group_control(
449 Group_Control_Border::get_type(),
450 [
451 'name' => 'shopengine__border',
452 'selector' => '{{WRAPPER}} .shopengine-archive-products:not(.shopengine-archive-products--view-list) .archive-product-container',
453 'fields_options' => [
454 'color' => [
455 'label' => esc_html__('Border Color', 'shopengine'),
456 'responsive' => true,
457 ],
458 'width' => [
459 'selectors' => [
460 '{{WRAPPER}} .shopengine-archive-products:not(.shopengine-archive-products--view-list) .archive-product-container' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}',
461 '.rtl {{WRAPPER}} .shopengine-archive-products:not(.shopengine-archive-products--view-list) .archive-product-container' => 'border-width: {{TOP}}{{UNIT}} {{LEFT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{RIGHT}}{{UNIT}}',
462 ]
463 ]
464 ],
465 ]
466 );
467
468 $this->add_responsive_control(
469 'shopengine_margin',
470 [
471 'label' => esc_html__('Product Gap', 'shopengine'),
472 'type' => Controls_Manager::SLIDER,
473 'range' => [
474 'px' => [
475 'min' => 0,
476 'max' => 200,
477 ],
478 ],
479 'default' => [
480 'size' => 20,
481 ],
482
483 'selectors' => [
484 '{{WRAPPER}} .shopengine-archive-products.shopengine-grid ul.products' => 'grid-gap: {{SIZE}}{{UNIT}} !important;',
485 ],
486 ]
487 );
488
489 $this->add_group_control(
490 Group_Control_Box_Shadow::get_type(),
491 [
492 'name' => 'shopengine_container_shadow_on_hover',
493 'label' => esc_html__('Box Shadow on hover', 'shopengine'),
494 'selector' => '{{WRAPPER}} .shopengine-archive-products:not(.shopengine-archive-products--view-list) .archive-product-container:hover',
495 'fields_options' => [
496 'box_shadow' => [
497 'default' => [
498 'horizontal' => 5,
499 'vertical' => 30,
500 'blur' => 35,
501 'spread' => 0,
502 'color' => 'rgba(0,0,0,0.16)',
503 ],
504 ],
505
506 ],
507 ]
508 );
509
510 $this->add_responsive_control(
511 'shopengine_archive_products_container_row_spacing',
512 [
513 'label' => esc_html__('Row Spacing (px)', 'shopengine'),
514 'type' => Controls_Manager::SLIDER,
515 'size_units' => ['px'],
516 'default' => [
517 'size' => 50,
518 ],
519 'selectors' => [
520 '{{WRAPPER}} .shopengine-archive-products .products .archive-product-container' => 'margin-bottom: {{SIZE}}px;',
521 ],
522 'separator' => 'before',
523 ]
524 );
525
526 $this->add_responsive_control(
527 'shopengine_padding',
528 [
529 'label' => esc_html__('Padding', 'shopengine'),
530 'type' => Controls_Manager::DIMENSIONS,
531 'size_units' => ['px'],
532 'selectors' => [
533 '{{WRAPPER}} .shopengine-archive-products:not(.shopengine-archive-products--view-list) .archive-product-container' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
534 '.rtl {{WRAPPER}} .shopengine-archive-products:not(.shopengine-archive-products--view-list) .archive-product-container' => 'padding: {{TOP}}{{UNIT}} {{LEFT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{RIGHT}}{{UNIT}} !important;',
535 ],
536 ]
537 );
538
539 $this->end_controls_section();
540
541 /*
542 =============================
543 Product Image section
544 =============================
545 */
546 $this->start_controls_section(
547 'shopengine_section_style_img',
548 [
549 'label' => esc_html__('Product Image', 'shopengine'),
550 'tab' => Controls_Manager::TAB_STYLE,
551 ]
552 );
553 $this->add_control(
554 'shopengine_image_bg_color',
555 [
556 'label' => esc_html__('Background Color', 'shopengine'),
557 'type' => Controls_Manager::COLOR,
558 'alpha' => false,
559 'selectors' => [
560 '{{WRAPPER}} .shopengine-archive-products .product .attachment-woocommerce_thumbnail' => 'background-color: {{VALUE}};',
561 ],
562 ]
563 );
564
565 $this->add_control(
566 'shopengine_image_height_switch',
567 [
568 'label' => esc_html__('Use image height', 'shopengine'),
569 'type' => Controls_Manager::SWITCHER,
570 'label_on' => esc_html__('Show', 'shopengine'),
571 'label_off' => esc_html__('Hide', 'shopengine'),
572 'return_value' => 'yes',
573 'default' => '',
574 ]
575 );
576
577 $this->add_responsive_control(
578 'shopengine_image_height',
579 [
580 'label' => esc_html__('Height', 'shopengine'),
581 'type' => Controls_Manager::SLIDER,
582 'size_units' => ['px'],
583 'range' => [
584 'px' => [
585 'min' => 0,
586 'max' => 600,
587 'step' => 5,
588 ],
589 ],
590 'default' => [
591 'size' => 255,
592 ],
593 'selectors' => [
594 '{{WRAPPER}} .shopengine-archive-products .product .attachment-woocommerce_thumbnail' => 'height: {{SIZE}}{{UNIT}};',
595 ],
596 'condition' => ['shopengine_image_height_switch' => 'yes'],
597 ]
598 );
599
600 $this->add_responsive_control(
601 'shopengine_image_padding',
602 [
603 'label' => esc_html__('Padding', 'shopengine'),
604 'type' => Controls_Manager::DIMENSIONS,
605 'size_units' => ['px'],
606 'selectors' => [
607 '{{WRAPPER}} .shopengine-archive-products .product .attachment-woocommerce_thumbnail' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
608 '.rtl {{WRAPPER}} .shopengine-archive-products .product .attachment-woocommerce_thumbnail' => 'padding: {{TOP}}{{UNIT}} {{LEFT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{RIGHT}}{{UNIT}};',
609 ],
610 'separator' => 'before',
611 ]
612 );
613 $this->end_controls_section();
614
615 /*
616 =============================
617 Product Category style
618 =============================
619 */
620 $this->start_controls_section(
621 'shopengine_section_style_cats',
622 [
623 'label' => esc_html__('Product Categories', 'shopengine'),
624 'tab' => Controls_Manager::TAB_STYLE,
625 'condition' => [
626 'shopengine_is_cats' => 'yes',
627 ],
628 ]
629 );
630 $this->add_control(
631 'shopengine_cats_max',
632 [
633 'label' => esc_html__('Max Categories', 'shopengine'),
634 'type' => Controls_Manager::NUMBER,
635 'separator' => 'after',
636 'default' => 1,
637 ]
638 );
639
640 $this->add_control(
641 'shopengine_cats_color',
642 [
643 'label' => esc_html__('Color', 'shopengine'),
644 'type' => Controls_Manager::COLOR,
645 'alpha' => false,
646 'default' => '#858585',
647 'selectors' => [
648 '{{WRAPPER}} .shopengine-archive-products .product-categories' => 'color: {{VALUE}};',
649 ],
650 ]
651 );
652
653 $this->add_group_control(
654 Group_Control_Typography::get_type(),
655 [
656 'name' => 'shopengine_cats_font',
657 'label' => esc_html__('Typography', 'shopengine'),
658 'selector' => '{{WRAPPER}} .shopengine-archive-products .product-categories > li',
659 'exclude' => ['font_family', 'letter_spacing', 'text_decoration', 'font_style'],
660 'fields_options' => [
661 'typography' => [
662 'default' => 'custom',
663 ],
664 'font_weight' => [
665 'default' => '400',
666 ],
667 'font_size' => [
668 'label' => esc_html__('Font Size (px)', 'shopengine'),
669 'default' => [
670 'size' => '13',
671 'unit' => 'px',
672 ],
673 'size_units' => ['px'],
674 ],
675 'line_height' => [
676 'label' => esc_html__('Line-height (px)', 'shopengine'),
677 'default' => [
678 'size' => '14',
679 'unit' => 'px',
680 ],
681 'responsive' => false,
682 'size_units' => ['px'],
683 ],
684 ],
685 ]
686 );
687
688
689 $this->add_control(
690 'shopengine_cats_spacing',
691 [
692 'label' => esc_html__('Padding', 'shopengine'),
693 'type' => Controls_Manager::DIMENSIONS,
694 'size_units' => ['px'],
695 'default' => [
696 'top' => '15',
697 'right' => '0',
698 'bottom' => '5',
699 'left' => '0',
700 'isLinked' => false,
701 'unit' => 'px',
702 ],
703 'selectors' => [
704 '{{WRAPPER}} .shopengine-archive-products .product-categories' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
705 '.rtl {{WRAPPER}} .shopengine-archive-products .product-categories' => 'padding: {{TOP}}{{UNIT}} {{LEFT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{RIGHT}}{{UNIT}};',
706 ],
707 'separator' => 'before',
708 ]
709 );
710 $this->end_controls_section();
711
712 /*
713 =============================
714 product title start
715 =============================
716 */
717
718 $this->start_controls_section(
719 'shopengine_section_style_title',
720 [
721 'label' => esc_html__('Product Title', 'shopengine'),
722 'tab' => Controls_Manager::TAB_STYLE,
723 ]
724 );
725
726 $this->add_control(
727 'shopengine_title_color',
728 [
729 'label' => esc_html__('Color', 'shopengine'),
730 'type' => Controls_Manager::COLOR,
731 'default' => '#101010',
732 'alpha' => false,
733 'selectors' => [
734 '{{WRAPPER}} .shopengine-archive-products:not(.shopengine-archive-products--view-list) .product .woocommerce-loop-product__title' => 'color: {{VALUE}};',
735 ],
736 ]
737 );
738
739 $this->add_control(
740 'shopengine_title_hover_color',
741 [
742 'label' => esc_html__('Hover Color', 'shopengine'),
743 'type' => Controls_Manager::COLOR,
744 'alpha' => false,
745 'selectors' => [
746 '{{WRAPPER}} .shopengine-archive-products:not(.shopengine-archive-products--view-list) .product a:hover .woocommerce-loop-product__title' => 'color: {{VALUE}};',
747 ],
748 ]
749 );
750
751 $this->add_group_control(
752 Group_Control_Typography::get_type(),
753 [
754 'name' => 'shopengine_title_color_typography',
755 'label' => esc_html__('Typography', 'shopengine'),
756 'selector' => '{{WRAPPER}} .shopengine-archive-products:not(.shopengine-archive-products--view-list) ul.products li.product .woocommerce-loop-product__title',
757 'exclude' => ['font_family', 'letter_spacing', 'text_decoration', 'font_style'],
758 'fields_options' => [
759 'typography' => [
760 'default' => 'custom',
761 ],
762 'font_weight' => [
763 'default' => '500',
764 ],
765 'font_size' => [
766 'label' => esc_html__('Font Size (px)', 'shopengine'),
767 'default' => [
768 'size' => '16',
769 'unit' => 'px',
770 ],
771 'size_units' => ['px'],
772 ],
773 'text_transform' => [
774 'default' => 'capitalize',
775 ],
776 'line_height' => [
777 'label' => esc_html__('Line Height (px)', 'shopengine'),
778 'default' => [
779 'size' => '18',
780 'unit' => 'px',
781 ],
782 'responsive' => false,
783 'size_units' => ['px'] // enable only px
784 ],
785 ],
786 ]
787 );
788
789
790 $this->add_responsive_control(
791 'shopengine_title_padding',
792 [
793 'label' => esc_html__('Padding', 'shopengine'),
794 'type' => Controls_Manager::DIMENSIONS,
795 'size_units' => ['px'],
796 'selectors' => [
797 '{{WRAPPER}} .shopengine-archive-products:not(.shopengine-archive-products--view-list) .product .woocommerce-loop-product__title' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
798 '.rtl {{WRAPPER}} .shopengine-archive-products:not(.shopengine-archive-products--view-list) .product .woocommerce-loop-product__title' => 'padding: {{TOP}}{{UNIT}} {{LEFT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{RIGHT}}{{UNIT}};',
799 ],
800 'separator' => 'before',
801 ]
802 );
803 $this->end_controls_section();
804
805 /*
806 =============================
807 product price start
808 =============================
809 */
810 $this->start_controls_section(
811 'shopengine_section_style_price',
812 [
813 'label' => esc_html__('Product Price', 'shopengine'),
814 'tab' => Controls_Manager::TAB_STYLE,
815 ]
816 );
817 $this->add_control(
818 'shopengine_sell_price_color',
819 [
820 'label' => esc_html__('Color', 'shopengine'),
821 'type' => Controls_Manager::COLOR,
822 'default' => '#101010',
823 'alpha' => false,
824 'selectors' => [
825 '{{WRAPPER}} .shopengine-archive-products .product .price' => 'color: {{VALUE}};',
826 ],
827 ]
828 );
829
830 $this->add_group_control(
831 Group_Control_Typography::get_type(),
832 [
833 'name' => 'shopengine_product_price_typography',
834 'label' => esc_html__('Typography', 'shopengine'),
835 'selector' => '{{WRAPPER}} .shopengine-archive-products .product .price .amount',
836 'exclude' => ['font_family', 'text_transform', 'font_style', 'text_decoration', 'letter_spacing'],
837 'fields_options' => [
838 'typography' => [
839 'default' => 'custom',
840 ],
841 'font_weight' => [
842 'default' => '700',
843 ],
844 'font_size' => [
845 'label' => esc_html__('Font Size (px)', 'shopengine'),
846 'default' => [
847 'size' => '18',
848 'unit' => 'px',
849 ],
850 'size_units' => ['px'],
851 ],
852 'line_height' => [
853 'label' => esc_html__('Line Height (px)', 'shopengine'),
854 'default' => [
855 'size' => '22',
856 'unit' => 'px',
857 ],
858 'responsive' => false,
859 'size_units' => ['px'],
860 ],
861 ],
862 ]
863 );
864
865 $this->add_control(
866 'shopengine_price_reg_head',
867 [
868 'label' => esc_html__('Regular Price', 'shopengine'),
869 'type' => Controls_Manager::HEADING,
870 'separator' => 'before',
871 'condition' => [
872 'shopengine_show_regular_price' => 'yes',
873 ],
874 ]
875 );
876
877 $this->add_control(
878 'shopengine_price_reg_pos',
879 [
880 'label' => esc_html__('Position', 'shopengine'),
881 'type' => Controls_Manager::SELECT,
882 'options' => [
883 'before' => esc_html__('Before', 'shopengine'),
884 'after' => esc_html__('After', 'shopengine'),
885 ],
886 'default' => 'before',
887 'prefix_class' => 'shopengine-price-pos-',
888 'condition' => [
889 'shopengine_show_regular_price' => 'yes',
890 ],
891 ]
892 );
893
894 $this->add_responsive_control(
895 'shopengine_price_reg_size',
896 [
897 'label' => esc_html__('Font Size (px)', 'shopengine'),
898 'type' => Controls_Manager::SLIDER,
899 'size_units' => ['px'],
900 'selectors' => [
901 '{{WRAPPER}} .shopengine-archive-products .price > del bdi' => 'font-size: {{SIZE}}{{UNIT}};',
902 ],
903 'condition' => [
904 'shopengine_show_regular_price' => 'yes',
905 ],
906 ]
907 );
908
909 $this->add_responsive_control(
910 'shopengine_price_padding',
911 [
912 'label' => esc_html__('Padding', 'shopengine'),
913 'type' => Controls_Manager::DIMENSIONS,
914 'size_units' => ['px'],
915 'selectors' => [
916 '{{WRAPPER}} .shopengine-archive-products .product .price' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
917 '.rtl {{WRAPPER}} .shopengine-archive-products .product .price' => 'padding: {{TOP}}{{UNIT}} {{LEFT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{RIGHT}}{{UNIT}};',
918 ],
919 'separator' => 'before',
920 ]
921 );
922
923 $this->end_controls_section();
924
925 /*
926 =====================================
927 Product Description
928 =====================================
929 */
930
931 $this->start_controls_section(
932 'shopengine_product_description',
933 [
934 'label' => esc_html__('Product Description', 'shopengine'),
935 'tab' => Controls_Manager::TAB_STYLE,
936 'condition' => [
937 'shopengine_is_details' => 'yes',
938 ],
939 ]
940 );
941
942 $this->add_control(
943 'shopengine_archive_description_color',
944 [
945 'label' => esc_html__('Color', 'shopengine'),
946 'type' => Controls_Manager::COLOR,
947 'alpha' => false,
948 'selectors' => [
949 '{{WRAPPER}} .shopengine-archive-products .product .shopengine-product-excerpt' => 'color: {{VALUE}};',
950 ],
951 ]
952 );
953
954 $this->add_group_control(
955 Group_Control_Typography::get_type(),
956 [
957 'name' => 'shopengine_archive_description_typography',
958 'label' => esc_html__('Typography', 'shopengine'),
959 'selector' => '{{WRAPPER}} .shopengine-archive-products .product .shopengine-product-excerpt',
960 'exclude' => ['font_family', 'letter_spacing', 'text_decoration', 'font_style', 'line_height'],
961 'fields_options' => [
962 'font_size' => [
963 'label' => esc_html__('Font Size (px)', 'shopengine'),
964 'size_units' => ['px'],
965 ],
966 ],
967 ]
968 );
969
970 $this->add_group_control(
971 Group_Control_Border::get_type(),
972 [
973 'name' => 'shopengine_archive_description_border',
974 'selector' => '{{WRAPPER}} .shopengine-archive-products .product .shopengine-product-excerpt',
975 'fields_options' => [
976 'border' => [
977 'default' => 'solid',
978 ],
979 'width' => [
980 'label' => esc_html__('Border Width', 'shopengine'),
981 'default' => [
982 'top' => '1',
983 'right' => '0',
984 'bottom' => '0',
985 'left' => '0',
986 'isLinked' => false,
987 ],
988 'selectors' => [
989 '{{WRAPPER}} .shopengine-archive-products .product .shopengine-product-excerpt' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
990 '.rtl {{WRAPPER}} .shopengine-archive-products .product .shopengine-product-excerpt' => 'border-width: {{TOP}}{{UNIT}} {{LEFT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{RIGHT}}{{UNIT}};',
991 ]
992 ],
993 'color' => [
994 'label' => esc_html__('Border Color', 'shopengine'),
995 'default' => '#f2f2f2',
996 ],
997 ],
998 ]
999 );
1000
1001 $this->add_responsive_control(
1002 'shopengine_archive_description_padding',
1003 [
1004 'label' => esc_html__('Padding', 'shopengine'),
1005 'type' => Controls_Manager::DIMENSIONS,
1006 'size_units' => ['px'],
1007 'selectors' => [
1008 '{{WRAPPER}} .shopengine-archive-products .product .shopengine-product-excerpt' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1009 '.rtl {{WRAPPER}} .shopengine-archive-products .product .shopengine-product-excerpt' => 'padding: {{TOP}}{{UNIT}} {{LEFT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{RIGHT}}{{UNIT}};',
1010 ],
1011 'separator' => 'before',
1012 ]
1013 );
1014
1015 $this->end_controls_section();
1016
1017 /*
1018 =====================================
1019 Product Footer
1020 =====================================
1021 */
1022
1023 $this->start_controls_section(
1024 'shopengine_product_footer',
1025 [
1026 'label' => esc_html__('Product Footer', 'shopengine'),
1027 'tab' => Controls_Manager::TAB_STYLE,
1028 'condition' => [
1029 'shopengine_is_hover_details' => 'yes',
1030 ],
1031 ]
1032 );
1033
1034 $this->add_responsive_control(
1035 'shopengine_archive_footer_padding',
1036 [
1037 'label' => esc_html__('Padding', 'shopengine'),
1038 'type' => Controls_Manager::DIMENSIONS,
1039 'size_units' => ['px'],
1040 'selectors' => [
1041 '{{WRAPPER}} .shopengine-archive-products .product .shopengine-product-description-footer' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1042 '.rtl {{WRAPPER}} .shopengine-archive-products .product .shopengine-product-description-footer' => 'padding: {{TOP}}{{UNIT}} {{LEFT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{RIGHT}}{{UNIT}};',
1043 ],
1044 ]
1045 );
1046
1047 $this->end_controls_section();
1048
1049 /*
1050 =====================================
1051 Product Wrapper
1052 =====================================
1053 */
1054
1055 $this->start_controls_section(
1056 'shopengine_list_view_product_wrapper',
1057 [
1058 'label' => esc_html__('Product List View Wrapper', 'shopengine'),
1059 'tab' => Controls_Manager::TAB_STYLE,
1060 ]
1061 );
1062
1063 $this->start_controls_tabs(
1064 'list_view_tabs'
1065 );
1066
1067 $this->start_controls_tab(
1068 'style_normal_tab',
1069 [
1070 'label' => esc_html__( 'Normal', 'shopengine' ),
1071 ]
1072 );
1073
1074 $this->add_group_control(
1075 Group_Control_Border::get_type(),
1076 [
1077 'name' => 'shopengine_list_view_product_border',
1078 'selector' => '{{WRAPPER}} .shopengine-archive-products--view-list .archive-product-container',
1079 'fields_options' => [
1080 'border' => [
1081 ],
1082 'width' => [
1083 'label' => esc_html__('Border Width', 'shopengine'),
1084 'default' => [
1085 'top' => '0',
1086 'right' => '0',
1087 'bottom' => '0',
1088 'left' => '0',
1089 ],
1090 'selectors' => [
1091 '{{WRAPPER}} .shopengine-archive-products--view-list .archive-product-container' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1092 '.rtl {{WRAPPER}} .shopengine-archive-products--view-list .archive-product-container' => 'border-width: {{TOP}}{{UNIT}} {{LEFT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{RIGHT}}{{UNIT}};',
1093 ],
1094 ],
1095 'color' => [
1096 'label' => esc_html__('Border Color', 'shopengine'),
1097 ],
1098 ],
1099 ]
1100 );
1101
1102 $this->add_control(
1103 'shopengine_list_view_product_radius',
1104 [
1105 'label' => esc_html__('Border Radius', 'shopengine'),
1106 'type' => Controls_Manager::DIMENSIONS,
1107 'size_units' => ['px'],
1108 'selectors' => [
1109 '{{WRAPPER}} .shopengine-archive-products--view-list .archive-product-container' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}; overflow: hidden;',
1110 '.rtl {{WRAPPER}} .shopengine-archive-products--view-list .archive-product-container' => 'border-radius: {{TOP}}{{UNIT}} {{LEFT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{RIGHT}}{{UNIT}}; overflow: hidden;',
1111 '{{WRAPPER}} .shopengine-archive-products.shopengine-archive-products--view-list .shopengine-archive-products__left-image img' => 'display: block',
1112 ],
1113 ]
1114 );
1115
1116 $this->add_control(
1117 'shopengine_list_view_product_bg_color',
1118 [
1119 'label' => esc_html__('Background', 'shopengine'),
1120 'type' => Controls_Manager::COLOR,
1121 'alpha' => false,
1122 'selectors' => [
1123 '{{WRAPPER}} .shopengine-archive-products--view-list .archive-product-container' => 'background: {{VALUE}};',
1124 ],
1125 ]
1126 );
1127
1128 $this->add_group_control(
1129 Group_Control_Box_Shadow::get_type(),
1130 [
1131 'name' => 'shopengine_list_view_product_box_shadow',
1132 'label' => esc_html__('Box Shadow', 'shopengine'),
1133 'selector' => '{{WRAPPER}} .shopengine-archive-products--view-list .archive-product-container',
1134 ]
1135 );
1136
1137 $this->end_controls_tab();
1138
1139
1140 $this->start_controls_tab(
1141 'style_Hover_tab',
1142 [
1143 'label' => esc_html__( 'Hover', 'shopengine' ),
1144 ]
1145 );
1146
1147 $this->add_group_control(
1148 Group_Control_Border::get_type(),
1149 [
1150 'name' => 'shopengine_list_view_product_border_hover',
1151 'selector' => '{{WRAPPER}} .shopengine-archive-products--view-list .archive-product-container:hover',
1152 'fields_options' => [
1153 'border' => [
1154 ],
1155 'width' => [
1156 'label' => esc_html__('Border Width', 'shopengine'),
1157 'default' => [
1158 'top' => '0',
1159 'right' => '0',
1160 'bottom' => '0',
1161 'left' => '0',
1162 ],
1163 ],
1164 'color' => [
1165 'label' => esc_html__('Border Color', 'shopengine'),
1166 ],
1167 ],
1168 ]
1169 );
1170
1171 $this->add_control(
1172 'shopengine_list_view_product_radius_hover',
1173 [
1174 'label' => esc_html__('Border Radius', 'shopengine'),
1175 'type' => Controls_Manager::DIMENSIONS,
1176 'size_units' => ['px'],
1177 'selectors' => [
1178 '{{WRAPPER}} .shopengine-archive-products--view-list .archive-product-container:hover' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1179 '.rtl {{WRAPPER}} .shopengine-archive-products--view-list .archive-product-container:hover' => 'border-radius: {{TOP}}{{UNIT}} {{LEFT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{RIGHT}}{{UNIT}};',
1180 '{{WRAPPER}} .shopengine-archive-products.shopengine-archive-products--view-list .shopengine-archive-products__left-image img' => 'display: block',
1181 ],
1182 ]
1183 );
1184
1185 $this->add_control(
1186 'shopengine_list_view_product_bg_color_hover',
1187 [
1188 'label' => esc_html__('Background', 'shopengine'),
1189 'type' => Controls_Manager::COLOR,
1190 'alpha' => false,
1191 'selectors' => [
1192 '{{WRAPPER}} .shopengine-archive-products--view-list .archive-product-container:hover' => 'background: {{VALUE}};',
1193 ],
1194 ]
1195 );
1196
1197 $this->add_group_control(
1198 Group_Control_Box_Shadow::get_type(),
1199 [
1200 'name' => 'shopengine_list_view_product_box_shadow_hover',
1201 'label' => esc_html__('Box Shadow', 'shopengine'),
1202 'selector' => '{{WRAPPER}} .shopengine-archive-products--view-list .archive-product-container:hover',
1203 ]
1204 );
1205
1206 $this->end_controls_tab();
1207
1208 $this->end_controls_tabs();
1209
1210 $this->end_controls_section();
1211
1212 /*
1213 ----------------------------
1214 Off tag
1215 ----------------------------
1216 */
1217
1218 $this->start_controls_section(
1219 'shopengine_off_tag',
1220 [
1221 'label' => esc_html__('Off Tag', 'shopengine'),
1222 'tab' => Controls_Manager::TAB_STYLE,
1223 'condition' => [
1224 'shopengine_show_off_tag' => 'yes',
1225 ],
1226 ]
1227 );
1228
1229 $this->add_control(
1230 'product_price_discount_badge_color',
1231 [
1232 'label' => esc_html__('Color', 'shopengine'),
1233 'type' => Controls_Manager::COLOR,
1234 'default' => '#FFFFFF',
1235 'alpha' => false,
1236 'selectors' => [
1237 '{{WRAPPER}} .shopengine-discount-badge' => 'color: {{VALUE}};',
1238 ],
1239 ]
1240 );
1241
1242 $this->add_control(
1243 'product_price_discount_badge_bg_color',
1244 [
1245 'label' => esc_html__('Background', 'shopengine'),
1246 'type' => Controls_Manager::COLOR,
1247 'default' => '#F54F29',
1248 'alpha' => false,
1249 'selectors' => [
1250 '{{WRAPPER}} .shopengine-discount-badge' => 'background: {{VALUE}};',
1251 ],
1252 ]
1253 );
1254
1255 $this->add_responsive_control(
1256 'product_price_discount_badge_padding',
1257 [
1258 'label' => esc_html__('Badge Padding', 'shopengine'),
1259 'type' => Controls_Manager::DIMENSIONS,
1260 'size_units' => ['px'],
1261 'default' => [
1262 'top' => '0',
1263 'right' => '10',
1264 'bottom' => '0',
1265 'left' => '10',
1266 'unit' => 'px',
1267 'isLinked' => false,
1268 ],
1269 'selectors' => [
1270 '{{WRAPPER}} .shopengine-discount-badge' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1271 '.rtl {{WRAPPER}} .shopengine-discount-badge' => 'padding: {{TOP}}{{UNIT}} {{LEFT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{RIGHT}}{{UNIT}};',
1272 ],
1273 ]
1274 );
1275
1276 $this->add_responsive_control(
1277 'product_price_discount_badge_margin',
1278 [
1279 'label' => esc_html__('Badge Margin', 'shopengine'),
1280 'type' => Controls_Manager::DIMENSIONS,
1281 'size_units' => ['px'],
1282 'default' => [
1283 'top' => '0',
1284 'right' => '0',
1285 'bottom' => '0',
1286 'left' => '5',
1287 'unit' => 'px',
1288 'isLinked' => false,
1289 ],
1290 'selectors' => [
1291 '{{WRAPPER}} .shopengine-discount-badge' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1292 '.rtl {{WRAPPER}} .shopengine-discount-badge' => 'margin: {{TOP}}{{UNIT}} {{LEFT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{RIGHT}}{{UNIT}};',
1293 ],
1294 ]
1295 );
1296
1297 $this->end_controls_section();
1298
1299 // end off tag
1300 /*
1301 ==============================
1302 Button settings
1303 ==============================
1304 */
1305
1306 $this->start_controls_section(
1307 'shopengine_section_button',
1308 [
1309 'label' => esc_html__('Add To Cart Button', 'shopengine'),
1310 'tab' => Controls_Manager::TAB_STYLE,
1311 ]
1312 );
1313
1314 $this->add_responsive_control(
1315 'shopengine_archvie_btn_padding',
1316 [
1317 'label' => esc_html__('Padding', 'shopengine'),
1318 'type' => Controls_Manager::DIMENSIONS,
1319 'size_units' => ['px'],
1320 'default' => [
1321 'top' => '9',
1322 'right' => '21',
1323 'bottom' => '10',
1324 'left' => '21',
1325 'unit' => 'px',
1326 'isLinked' => false,
1327 ],
1328 'selectors' => [
1329 '{{WRAPPER}} .shopengine-archive-products .product a.button:not(.shopengine-quickview-trigger)' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
1330 '.rtl {{WRAPPER}} .shopengine-archive-products .product a.button:not(.shopengine-quickview-trigger)' => 'padding: {{TOP}}{{UNIT}} {{LEFT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{RIGHT}}{{UNIT}} !important;',
1331 ],
1332 ]
1333 );
1334
1335 $this->add_responsive_control(
1336 'shopengine_archvie_btn_margin',
1337 [
1338 'label' => esc_html__('Margin', 'shopengine'),
1339 'type' => Controls_Manager::DIMENSIONS,
1340 'size_units' => ['px'],
1341 'default' => [
1342 'top' => '0',
1343 'right' => '0',
1344 'bottom' => '0',
1345 'left' => '0',
1346 'unit' => 'px',
1347 'isLinked' => true,
1348 ],
1349 'selectors' => [
1350 '{{WRAPPER}} .shopengine-archive-products .product a.button:not(.shopengine-quickview-trigger)' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
1351 '.rtl {{WRAPPER}} .shopengine-archive-products .product a.button:not(.shopengine-quickview-trigger)' => 'margin: {{TOP}}{{UNIT}} {{LEFT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{RIGHT}}{{UNIT}} !important;',
1352 ],
1353 ]
1354 );
1355
1356 $this->add_control(
1357 'shopengine_archvie_btn_radius',
1358 [
1359 'label' => esc_html__('Border Radius', 'shopengine'),
1360 'type' => Controls_Manager::DIMENSIONS,
1361 'size_units' => ['px'],
1362 'selectors' => [
1363 '{{WRAPPER}} .shopengine-archive-products .product a.button:not(.shopengine-quickview-trigger)' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
1364 '.rtl {{WRAPPER}} .shopengine-archive-products .product a.button:not(.shopengine-quickview-trigger)' => 'border-radius: {{TOP}}{{UNIT}} {{LEFT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{RIGHT}}{{UNIT}} !important;',
1365 ],
1366 ]
1367 );
1368
1369 $this->add_group_control(
1370 Group_Control_Typography::get_type(),
1371 [
1372 'name' => 'shopengine_archvie_btn_typography',
1373 'label' => esc_html__('Button Typography', 'shopengine'),
1374 'selector' => '{{WRAPPER}} .shopengine-archive-products .product a.button:not(.shopengine-quickview-trigger)',
1375 'exclude' => ['font_family', 'letter_spacing', 'text_decoration', 'font_style', 'line_height'],
1376 'fields_options' => [
1377 'font_size' => [
1378 'label' => esc_html__('Font Size (px)', 'shopengine'),
1379 'size_units' => ['px'],
1380 ],
1381 ],
1382 ]
1383 );
1384
1385 $this->add_group_control(
1386 Group_Control_Box_Shadow::get_type(),
1387 [
1388 'name' => 'shopengine_archvie_btn_box_shadow',
1389 'label' => esc_html__('Box Shadow', 'shopengine'),
1390 'selector' => '{{WRAPPER}} .shopengine-archive-products .product .button[data-quantity]',
1391 ]
1392 );
1393
1394
1395 $this->start_controls_tabs('shopengine_archvie_btn_tabs');
1396
1397 $this->start_controls_tab(
1398 'shopengine_archvie_btn_tab_normal',
1399 [
1400 'label' => esc_html__('Normal', 'shopengine'),
1401 ]
1402 );
1403
1404 $this->add_control(
1405 'shopengine_archvie_btn_normal_clr',
1406 [
1407 'label' => esc_html__('Color', 'shopengine'),
1408 'type' => Controls_Manager::COLOR,
1409 'default' => '#f1f1f1',
1410 'alpha' => false,
1411 'selectors' => [
1412 '{{WRAPPER}} .shopengine-archive-products .product a.button:not(.shopengine-quickview-trigger)' => 'text-align:left;color: {{VALUE}} !important;',
1413 ],
1414 ]
1415 );
1416
1417 $this->add_control(
1418 'shopengine_archvie_btn_normal_bg',
1419 [
1420 'label' => esc_html__('Background', 'shopengine'),
1421 'type' => Controls_Manager::COLOR,
1422 'default' => '#505255',
1423 'alpha' => false,
1424 'selectors' => [
1425 '{{WRAPPER}} .shopengine-archive-products .product a.button:not(.shopengine-quickview-trigger)' => 'background: {{VALUE}} !important;',
1426 ],
1427 ]
1428 );
1429
1430 $this->end_controls_tab();
1431
1432 $this->start_controls_tab(
1433 'shopengine_archvie_btn_tabs_hover',
1434 [
1435 'label' => esc_html__('Hover', 'shopengine'),
1436 ]
1437 );
1438
1439 $this->add_control(
1440 'shopengine_archvie_btn_hover_clr',
1441 [
1442 'label' => esc_html__('Color', 'shopengine'),
1443 'type' => Controls_Manager::COLOR,
1444 'alpha' => false,
1445 'default' => '#f1f1f1',
1446 'selectors' => [
1447 '{{WRAPPER}} .shopengine-archive-products .product a.button:not(.shopengine-quickview-trigger):hover' => 'color: {{VALUE}} !important;',
1448 ],
1449 ]
1450 );
1451
1452 $this->add_control(
1453 'shopengine_archvie_btn_hover_bg',
1454 [
1455 'label' => esc_html__('Background', 'shopengine'),
1456 'type' => Controls_Manager::COLOR,
1457 'default' => '#101010',
1458 'alpha' => false,
1459 'selectors' => [
1460 '{{WRAPPER}} .shopengine-archive-products .product a.button:not(.shopengine-quickview-trigger):hover' => 'background: {{VALUE}} !important;',
1461 ],
1462 ]
1463 );
1464
1465
1466 $this->end_controls_tab();
1467 $this->end_controls_tabs();
1468
1469 $this->add_control(
1470 'shopengine_archvie_btn_gap',
1471 [
1472 'label' => esc_html__('Button Gap', 'shopengine'),
1473 'type' => Controls_Manager::SLIDER,
1474 'range' => [
1475 'px' => [
1476 'min' => 0,
1477 'max' => 30,
1478 'step' => 1,
1479 ],
1480 ],
1481 'size_units' => ['px'],
1482 'selectors' => [
1483 '{{WRAPPER}} .shopengine-archive-products.shopengine-hover-disable .products .product' => 'column-gap: {{SIZE}}{{UNIT}};',
1484 ],
1485 ]
1486 );
1487
1488 $this->end_controls_section(); // end ./ Button settings
1489
1490 /*
1491 ==============================
1492 product rating
1493 ==============================
1494 */
1495 $this->start_controls_section(
1496 'shopengine_section_rating',
1497 [
1498 'label' => esc_html__('Rating', 'shopengine'),
1499 'tab' => Controls_Manager::TAB_STYLE,
1500 'condition' => [
1501 'shopengine_archive_product_show_rating' => 'yes',
1502 ],
1503 ]
1504 );
1505
1506 $this->add_control(
1507 'shopengine_product_start_color',
1508 [
1509 'label' => esc_html__('Color', 'shopengine'),
1510 'type' => Controls_Manager::COLOR,
1511 'default' => '#FEC42D',
1512 'alpha' => false,
1513 'selectors' => [
1514 '{{WRAPPER}} .shopengine-archive-products .product .star-rating' => 'color: {{VALUE}};',
1515 ],
1516 ]
1517 );
1518
1519 $this->add_control(
1520 'shopengine_product_start_size',
1521 [
1522 'label' => esc_html__('Font Size (px)', 'shopengine'),
1523 'type' => Controls_Manager::SLIDER,
1524 'range' => [
1525 'px' => [
1526 'min' => 0,
1527 'max' => 50,
1528 'step' => 1,
1529 ],
1530 ],
1531 'default' => [
1532 'unit' => 'px',
1533 'size' => 11,
1534 ],
1535 'selectors' => [
1536 '{{WRAPPER}} .shopengine-archive-products .product .star-rating, {{WRAPPER}} .shopengine-product-rating-review-count' => 'font-size: {{SIZE}}{{UNIT}};',
1537 ],
1538 ]
1539 );
1540
1541 $this->add_responsive_control(
1542 'shopengine_product_rating_gap',
1543 [
1544 'label' => esc_html__('Star Gap (px)', 'shopengine'),
1545 'type' => Controls_Manager::SLIDER,
1546 'size_units' => ['px'],
1547 'selectors' => [
1548 '{{WRAPPER}} .shopengine-archive-products .star-rating' => 'letter-spacing: {{SIZE}}{{UNIT}}; width: calc(5.4em + (4 * {{SIZE}}{{UNIT}}));',
1549 '.rtl {{WRAPPER}} .shopengine-archive-products .star-rating' => 'letter-spacing: {{SIZE}}{{UNIT}}; width: calc(5.4em + ({{SIZE}} * {{SIZE}}{{UNIT}}));',
1550 ],
1551 ]
1552 );
1553
1554 $this->add_responsive_control(
1555 'shopengine_product_star_padding',
1556 [
1557 'label' => esc_html__('Margin', 'shopengine'),
1558 'type' => Controls_Manager::DIMENSIONS,
1559 'size_units' => ['px'],
1560 'selectors' => [
1561 '{{WRAPPER}} .shopengine-archive-products .product .star-rating' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1562 '.rtl {{WRAPPER}} .shopengine-archive-products .product .star-rating' => 'margin: {{TOP}}{{UNIT}} {{LEFT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{RIGHT}}{{UNIT}};',
1563 ],
1564 ]
1565 );
1566
1567
1568 $this->end_controls_section(); // end ./ product rating
1569
1570
1571 /*
1572 ==============================
1573 Sale Fash
1574 ==============================
1575 */
1576 $this->start_controls_section(
1577 'shopengine_section_sale_flash',
1578 [
1579 'label' => esc_html__('Flash Sale', 'shopengine'),
1580 'tab' => Controls_Manager::TAB_STYLE,
1581 'condition' => [
1582 'shopengine_show_sale_flash' => 'yes',
1583 ],
1584 ]
1585 );
1586
1587 $this->add_control(
1588 'shopengine_sale_flash_color',
1589 [
1590 'label' => esc_html__('Color', 'shopengine'),
1591 'type' => Controls_Manager::COLOR,
1592 'default' => '#FFFFFF',
1593 'alpha' => false,
1594 'selectors' => [
1595 '{{WRAPPER}} .shopengine-archive-products .onsale' => 'color: {{VALUE}};',
1596 ],
1597 ]
1598 );
1599
1600 $this->add_control(
1601 'shopengine_sale_flash_bg_color',
1602 [
1603 'label' => esc_html__('Background Color', 'shopengine'),
1604 'type' => Controls_Manager::COLOR,
1605 'alpha' => false,
1606 'default' => '#4285F4',
1607 'selectors' => [
1608 '{{WRAPPER}} .shopengine-archive-products .onsale' => 'background-color: {{VALUE}};',
1609 ],
1610 ]
1611 );
1612
1613 $this->add_group_control(
1614 Group_Control_Typography::get_type(),
1615 [
1616 'name' => 'shopengine_sale_flash_typography',
1617 'label' => esc_html__('Typography', 'shopengine'),
1618 'selector' => '{{WRAPPER}} .shopengine-archive-products .onsale',
1619 'exclude' => ['font_family', 'font_style', 'letter_spacing', 'line_height', 'text_decoration'],
1620 'fields_options' => [
1621 'typography' => [
1622 'default' => 'custom',
1623 ],
1624 'font_weight' => [
1625 'default' => '500',
1626 ],
1627 'font_size' => [
1628 'label' => esc_html__('Font Size (px)', 'shopengine'),
1629 'default' => [
1630 'size' => '14',
1631 'unit' => 'px',
1632 ],
1633 'size_units' => ['px'],
1634 ],
1635 'text_transform' => [
1636 'default' => 'capitalize',
1637 ],
1638 ],
1639 ]
1640 );
1641
1642
1643 $this->add_control(
1644 'shopengine_use_fixed_size',
1645 [
1646 'label' => esc_html__('Use padding', 'shopengine'),
1647 'type' => Controls_Manager::SWITCHER,
1648 'label_on' => esc_html__('Show', 'shopengine'),
1649 'label_off' => esc_html__('Hide', 'shopengine'),
1650 'return_value' => 'yes',
1651 'default' => '',
1652 ]
1653 );
1654
1655 $this->add_control(
1656 'shopengine_sale_flash_radius',
1657 [
1658 'label' => esc_html__('Border Radius', 'shopengine'),
1659 'type' => Controls_Manager::DIMENSIONS,
1660 'size_units' => ['%', 'px'],
1661 'default' => [
1662 'top' => '50',
1663 'right' => '50',
1664 'bottom' => '50',
1665 'left' => '50',
1666 'unit' => '%',
1667 'isLinked' => true,
1668 ],
1669 'selectors' => [
1670 '{{WRAPPER}} .shopengine-archive-products .onsale' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1671 '.rtl {{WRAPPER}} .shopengine-archive-products .onsale' => 'border-radius: {{TOP}}{{UNIT}} {{LEFT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{RIGHT}}{{UNIT}};',
1672 ],
1673 ]
1674 );
1675
1676 $this->add_control(
1677 'shopengine_sale_flash_paddng',
1678 [
1679 'label' => esc_html__('Padding', 'shopengine'),
1680 'type' => Controls_Manager::DIMENSIONS,
1681 'size_units' => ['px'],
1682 'condition' => ['shopengine_use_fixed_size' => 'yes'],
1683 'selectors' => [
1684 '{{WRAPPER}} .shopengine-archive-products .onsale' => 'line-height:initial; min-height:auto; min-width:auto; padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1685 '.rtl {{WRAPPER}} .shopengine-archive-products .onsale' => 'line-height:initial; min-height:auto; min-width:auto; padding: {{TOP}}{{UNIT}} {{LEFT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{RIGHT}}{{UNIT}};',
1686 ],
1687 ]
1688 );
1689
1690 $this->add_control(
1691 'shopengine_sale_flash_sizee',
1692 [
1693 'label' => esc_html__('Size', 'shopengine'),
1694 'type' => Controls_Manager::SLIDER,
1695 'size_units' => ['px'],
1696 'condition' => ['shopengine_use_fixed_size' => ''],
1697 'range' => [
1698 'px' => [
1699 'min' => 0,
1700 'max' => 300,
1701 'step' => 1,
1702 ],
1703 ],
1704 'default' => [
1705 'unit' => 'px',
1706 'size' => 50,
1707 ],
1708 'selectors' => [
1709 '{{WRAPPER}} .shopengine-archive-products .onsale' => 'min-width:auto; min-height:auto;padding:0; text-align:center; line-height: {{SIZE}}{{UNIT}}; width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}};',
1710 ],
1711 ]
1712 );
1713
1714 // Position
1715 $this->add_control(
1716 'shopengine_sale_flash_pos',
1717 [
1718 'label' => esc_html__('Position', 'shopengine'),
1719 'type' => Controls_Manager::CHOOSE,
1720 'options' => [
1721 'left' => [
1722 'title' => esc_html__('Left', 'shopengine'),
1723 'icon' => 'eicon-chevron-left',
1724 ],
1725 'right' => [
1726 'title' => esc_html__('Right', 'shopengine'),
1727 'icon' => 'eicon-chevron-right',
1728 ],
1729 ],
1730 'default' => 'left',
1731 'toggle' => false,
1732 'separator' => 'before',
1733 ]
1734 );
1735
1736 $this->add_responsive_control(
1737 'shopengine_sale_flash_position_horizontial',
1738 [
1739 'label' => esc_html__('Horizontal', 'shopengine'),
1740 'type' => Controls_Manager::SLIDER,
1741 'size_units' => ['px', '%'],
1742 'range' => [
1743 'px' => [
1744 'max' => 400,
1745 ],
1746 ],
1747 'default' => [
1748 'unit' => 'px',
1749 'size' => 20,
1750 ],
1751 'selectors' => [
1752 '{{WRAPPER}} .shopengine-archive-products .onsale' => '{{shopengine_sale_flash_pos.VALUE}}: {{SIZE}}{{UNIT}};',
1753 ],
1754 ]
1755 );
1756
1757 $this->add_responsive_control(
1758 'shopengine_sale_flash_position_vertical',
1759 [
1760 'label' => esc_html__('Vertical', 'shopengine'),
1761 'type' => Controls_Manager::SLIDER,
1762 'size_units' => ['px', '%'],
1763 'range' => [
1764 'px' => [
1765 'max' => 400,
1766 ],
1767 ],
1768 'default' => [
1769 'unit' => 'px',
1770 'size' => 20,
1771 ],
1772 'selectors' => [
1773 '{{WRAPPER}} .shopengine-archive-products .onsale' => 'top: {{SIZE}}{{UNIT}};',
1774 ],
1775 ]
1776 );
1777
1778 $this->end_controls_section(); // end ./ Flash Sale
1779
1780 /*
1781 ----------------------------
1782 Button group
1783 ----------------------------
1784 */
1785
1786
1787 $this->start_controls_section(
1788 'shopengine_section_button_group',
1789 [
1790 'label' => esc_html__('Button group', 'shopengine'),
1791 'tab' => Controls_Manager::TAB_STYLE,
1792 'condition' => [
1793 'shopengine_group_btns' => 'yes',
1794 ],
1795 ]
1796 );
1797
1798 $this->add_control(
1799 'shopengine_group_btns_over_image',
1800 [
1801 'label' => esc_html__('Show Full Image On Mobile', 'shopengine'),
1802 'type' => Controls_Manager::SWITCHER,
1803 'label_on' => esc_html__('Show', 'shopengine'),
1804 'label_off' => esc_html__('Hide', 'shopengine'),
1805 'return_value' => 'yes',
1806 'default' => 'no',
1807 'prefix_class' => 'shopengine-disable-group-btn-over-image-',
1808 ]
1809 );
1810
1811 $this->add_control(
1812 'shopengine_button_group_btn_bg_clr',
1813 [
1814 'label' => esc_html__('Button Group Background color', 'shopengine'),
1815 'type' => Controls_Manager::COLOR,
1816 'default' => '#FFFFFF',
1817 'selectors' => [
1818 '{{WRAPPER}} .shopengine-archive-products ul li .loop-product--btns .loop-product--btns-inner :is(a, button, .button)' => 'background: {{VALUE}} !important;',
1819 '{{WRAPPER}} .shopengine-archive-products ul li .loop-product--btns .loop-product--btns-inner :is(a, button, .button):hover' => 'background: {{VALUE}} !important;',
1820 '{{WRAPPER}} .shopengine-archive-products ul li .loop-product--btns .loop-product--btns-inner' => 'background-color: {{VALUE}} !important;',
1821 ],
1822 ]
1823 );
1824
1825 $this->add_control(
1826 'shopengine_button_group_btn_clr',
1827 [
1828 'label' => esc_html__('Color', 'shopengine'),
1829 'type' => Controls_Manager::COLOR,
1830 'default' => '#101010',
1831 'selectors' => [
1832 '{{WRAPPER}} .shopengine-archive-products ul li .loop-product--btns .loop-product--btns-inner a:not(.shopengine-wishlist) :is(i, span, svg, path, a::before)' => 'fill: {{VALUE}} !important; color: {{VALUE}} !important;',
1833 '{{WRAPPER}} .shopengine-archive-products ul li .loop-product--btns .loop-product--btns-inner .shopengine-wishlist path' => 'color: {{VALUE}} !important;',
1834 '{{WRAPPER}} .shopengine-archive-products ul li .loop-product--btns .loop-product--btns-inner a.button:not(.shopengine-quickview-trigger)::before' => 'fill: {{VALUE}} !important; color: {{VALUE}} !important;',
1835 '{{WRAPPER}} .shopengine-archive-products ul li .loop-product--btns .loop-product--btns-inner a i' => 'fill: {{VALUE}} !important; color: {{VALUE}} !important;',
1836 ],
1837 ]
1838 );
1839
1840 $this->add_control(
1841 'shopengine_button_group_btn_hover_active_clr',
1842 [
1843 'label' => esc_html__('Hover and Active Color', 'shopengine'),
1844 'type' => Controls_Manager::COLOR,
1845 'default' => '#F03D3F',
1846 'selectors' => [
1847 '{{WRAPPER}} .shopengine-archive-products ul li .loop-product--btns .loop-product--btns-inner a:not(.shopengine-wishlist):hover :is(i, span, svg, path, a::before)' => 'fill: {{VALUE}} !important; color: {{VALUE}} !important;',
1848 '{{WRAPPER}} .shopengine-archive-products ul li .loop-product--btns .loop-product--btns-inner .shopengine-wishlist:hover path' => 'color: {{VALUE}} !important;',
1849 '{{WRAPPER}} .shopengine-archive-products ul li .loop-product--btns .loop-product--btns-inner a.button:hover:not(.shopengine-quickview-trigger)::before' => 'fill: {{VALUE}} !important; color: {{VALUE}} !important;',
1850
1851 '{{WRAPPER}} .shopengine-archive-products ul li .loop-product--btns .loop-product--btns-inner a.active:not(.shopengine-wishlist) :is(i, span, svg, path, a::before)' => 'fill: {{VALUE}} !important; color: {{VALUE}} !important;',
1852 '{{WRAPPER}} .shopengine-archive-products ul li .loop-product--btns .loop-product--btns-inner .shopengine-wishlist.active path' => 'fill:{{VALUE}} !important; color: {{VALUE}} !important;',
1853 '{{WRAPPER}} .shopengine-archive-products ul li .loop-product--btns .loop-product--btns-inner a.button.active:not(.shopengine-quickview-trigger)::before' => 'fill: {{VALUE}} !important; color: {{VALUE}} !important;',
1854 '{{WRAPPER}} .shopengine-archive-products ul li .loop-product--btns .loop-product--btns-inner :is(a:not(.wc-forward), button, .button):hover' => 'color: {{VALUE}} !important;',
1855 ],
1856 ]
1857 );
1858
1859
1860 $this->add_control(
1861 'shopengine_button_group_sbtn_bg_clr',
1862 [
1863 'label' => esc_html__('Button Background color', 'shopengine'),
1864 'type' => Controls_Manager::COLOR,
1865 'default' => '#FFFFFF',
1866 'selectors' => [
1867 '{{WRAPPER}} .shopengine-archive-products ul li .loop-product--btns .loop-product--btns-inner :is(a:not(.wc-forward), button, .button)' => 'background: {{VALUE}} !important;',
1868 ],
1869 ]
1870 );
1871 $this->add_control(
1872 'shopengine_button_group_sbtn_hbg_clr',
1873 [
1874 'label' => esc_html__('Button Hover Background', 'shopengine'),
1875 'type' => Controls_Manager::COLOR,
1876 'default' => '#FFFFFF',
1877 'selectors' => [
1878 '{{WRAPPER}} .shopengine-archive-products ul li .loop-product--btns .loop-product--btns-inner :is(a:not(.wc-forward), button, .button):hover' => 'background: {{VALUE}} !important;',
1879 ],
1880 ]
1881 );
1882
1883 $this->add_control(
1884 'shopengine_button_group_btn_icon_size',
1885 [
1886 'label' => esc_html__('Icon size', 'shopengine'),
1887 'type' => Controls_Manager::SLIDER,
1888 'size_units' => ['px'],
1889 'range' => [
1890 'px' => [
1891 'min' => 0,
1892 'max' => 100,
1893 'step' => 1,
1894 ],
1895 ],
1896 'default' => [
1897 'unit' => 'px',
1898 'size' => 18,
1899 ],
1900 'selectors' => [
1901 '{{WRAPPER}} .shopengine-archive-products ul li .loop-product--btns .loop-product--btns-inner :is(svg)' => 'width: {{SIZE}}{{UNIT}} !important;',
1902 '{{WRAPPER}} .shopengine-widget .shopengine-archive-products .loop-product--btns :is(a, i)::before' => 'font-size: {{SIZE}}{{UNIT}} !important;',
1903 ],
1904 ]
1905 );
1906
1907 $this->add_control(
1908 'shopengine_button_group_btn_padding',
1909 [
1910 'label' => esc_html__('Padding', 'shopengine'),
1911 'type' => Controls_Manager::DIMENSIONS,
1912 'size_units' => ['px'],
1913 'default' => [
1914 'top' => '15',
1915 'right' => '0',
1916 'bottom' => '15',
1917 'left' => '0',
1918 'unit' => 'px',
1919 'isLinked' => false,
1920 ],
1921 'selectors' => [
1922 '{{WRAPPER}} .shopengine-archive-products ul li .loop-product--btns .loop-product--btns-inner :is(a:not(.wc-forward), button, .button)' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
1923 '.rtl {{WRAPPER}} .shopengine-archive-products ul li .loop-product--btns .loop-product--btns-inner :is(a:not(.wc-forward), button, .button)' => 'padding: {{TOP}}{{UNIT}} {{LEFT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{RIGHT}}{{UNIT}} !important;',
1924 ],
1925 ]
1926 );
1927
1928
1929 $this->add_control(
1930 'shopengine_button_group_gap',
1931 [
1932 'label' => esc_html__('Column Gap', 'shopengine'),
1933 'type' => Controls_Manager::SLIDER,
1934 'size_units' => ['px'],
1935 'range' => [
1936 'px' => [
1937 'min' => 0,
1938 'max' => 100,
1939 'step' => 1,
1940 ],
1941 ],
1942 'default' => [
1943 'unit' => 'px',
1944 'size' => 10,
1945 ],
1946 'selectors' => [
1947 '{{WRAPPER}} .shopengine-archive-products ul li .loop-product--btns .loop-product--btns-inner' => 'column-gap: {{SIZE}}{{UNIT}} !important;',
1948 ],
1949 ]
1950 );
1951
1952 $this->end_controls_section();
1953 // end button group
1954 /*
1955 ----------------------------
1956 Button Tooltip
1957 ----------------------------
1958 */
1959
1960 $this->start_controls_section(
1961 'shopengine_section_button_tooltip',
1962 [
1963 'label' => esc_html__('Button Tooltip', 'shopengine'),
1964 'tab' => Controls_Manager::TAB_STYLE,
1965 ]
1966 );
1967
1968 $this->add_control(
1969 'shopengine_tooltip_horizontal_position',
1970 [
1971 'label' => esc_html__('Horizontal Position', 'shopengine'),
1972 'type' => \Elementor\Controls_Manager::SLIDER,
1973 'size_units' => ['px', '%'],
1974 'range' => [
1975 'px' => [
1976 'min' => -100,
1977 'max' => 100,
1978 'step' => 1,
1979 ],
1980 '%' => [
1981 'min' => -100,
1982 'max' => 100,
1983 'step' => 1,
1984 ],
1985 ],
1986 'selectors' => [
1987 '{{WRAPPER}} .shopengine-widget .shopengine-archive-mode-grid .tooltiptext' => 'bottom: {{SIZE}}{{UNIT}};',
1988 ],
1989 ]
1990 );
1991
1992 $this->add_control(
1993 'shopengine_tooltip_vertical_position',
1994 [
1995 'label' => esc_html__('Vertical Position', 'shopengine'),
1996 'type' => \Elementor\Controls_Manager::SLIDER,
1997 'size_units' => ['px', '%'],
1998 'range' => [
1999 'px' => [
2000 'min' => -100,
2001 'max' => 100,
2002 'step' => 1,
2003 ],
2004 '%' => [
2005 'min' => -100,
2006 'max' => 100,
2007 'step' => 1,
2008 ],
2009 ],
2010 'selectors' => [
2011 '{{WRAPPER}} .shopengine-widget .shopengine-archive-mode-grid .tooltiptext' => 'left: {{SIZE}}{{UNIT}};',
2012 '.rtl {{WRAPPER}} .shopengine-widget .shopengine-archive-mode-grid .tooltiptext' => 'right: {{SIZE}}{{UNIT}};',
2013 ],
2014 ]
2015 );
2016
2017 $this->add_control(
2018 'shopengine_tooltip_text_color',
2019 [
2020 'label' => esc_html__('Text Color', 'shopengine'),
2021 'type' => \Elementor\Controls_Manager::COLOR,
2022 'default' => '',
2023 'selectors' => [
2024 '{{WRAPPER}} .shopengine-widget .shopengine-archive-mode-grid .tooltiptext' => 'color: {{VALUE}}!important',
2025 ],
2026 ]
2027 );
2028
2029 $this->add_control(
2030 'shopengine_tooltip_background_color',
2031 [
2032 'label' => esc_html__('Background Color', 'shopengine'),
2033 'type' => \Elementor\Controls_Manager::COLOR,
2034 'default' => '',
2035 'selectors' => [
2036 '{{WRAPPER}} .shopengine-widget .shopengine-archive-mode-grid .tooltiptext' => 'background-color: {{VALUE}}',
2037 '{{WRAPPER}} .shopengine-widget .shopengine-archive-mode-grid .tooltiptext::after' => 'border-color: {{VALUE}} transparent transparent transparent',
2038 ],
2039 ]
2040 );
2041 $this->add_group_control(
2042 \Elementor\Group_Control_Typography::get_type(),
2043 [
2044 'name' => 'shopengine_tooltip_text_typography',
2045 'selector' => '{{WRAPPER}} .shopengine-widget .shopengine-archive-mode-grid .tooltiptext',
2046 'exclude' => ['font_family', 'letter_spacing', 'text_decoration', 'font_style','word_spacing'],
2047 'fields_options' => [
2048 'typography' => [
2049 'default' => 'custom',
2050 ],
2051 'font_weight' => [
2052 'default' => '',
2053 ],
2054 'font_size' => [
2055 'label' => esc_html__('Font Size (px)', 'shopengine'),
2056 'size_units' => ['px'],
2057 ],
2058 'line_height' => [
2059 'label' => esc_html__('Line-height (px)', 'shopengine'),
2060 'responsive' => false,
2061 'size_units' => ['px'],
2062 ],
2063 ],
2064 ]
2065
2066 );
2067
2068 $this->end_controls_section();
2069
2070 /**
2071 * Section: Pagination
2072 */
2073 $this->start_controls_section(
2074 'shopengine_section_style_pagination',
2075 [
2076 'label' => esc_html__('Pagination', 'shopengine'),
2077 'tab' => Controls_Manager::TAB_STYLE,
2078 ]
2079 );
2080 $this->add_responsive_control(
2081 'shopengine_pagi_align',
2082 [
2083 'label' => esc_html__('Alignment', 'shopengine'),
2084 'type' => Controls_Manager::CHOOSE,
2085 'options' => [
2086 'left' => [
2087 'title' => esc_html__('Left', 'shopengine'),
2088 'icon' => 'eicon-text-align-left',
2089 ],
2090 'center' => [
2091 'title' => esc_html__('Center', 'shopengine'),
2092 'icon' => 'eicon-text-align-center',
2093 ],
2094 'right' => [
2095 'title' => esc_html__('Right', 'shopengine'),
2096 'icon' => 'eicon-text-align-right',
2097 ],
2098 ],
2099 'selectors_dictionary' => [
2100 'left' => '-webkit-box-pack: start; -ms-flex-pack: start; justify-content: flex-start;',
2101 'center' => '-webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;',
2102 'right' => '-webkit-box-pack: end; -ms-flex-pack: end; justify-content: flex-end;',
2103 ],
2104 'selectors' => [
2105 '{{WRAPPER}} .shopengine-archive-products .woocommerce-pagination > ul' => '{{VALUE}}',
2106 ],
2107 ]
2108 );
2109
2110 $this->add_group_control(
2111 Group_Control_Typography::get_type(),
2112 [
2113 'name' => 'shopengine_pagi_font',
2114 'label' => esc_html__('Typography', 'shopengine'),
2115 'exclude' => ['font_family', 'line_height', 'text_transform', 'text_decoration', 'text_transform', 'letter_spacing'],
2116 'selector' => '{{WRAPPER}} .shopengine-archive-products .woocommerce-pagination',
2117 'fields_options' => [
2118 'font_size' => [
2119 'label' => esc_html__('Font Size (px)', 'shopengine'),
2120 'default' => [
2121 'size' => '16',
2122 'unit' => 'px',
2123 ],
2124 'size_units' => ['px'],
2125 ],
2126 ],
2127 ]
2128 );
2129
2130 $this->add_responsive_control(
2131 'shopengine_pagi_top_space',
2132 [
2133 'label' => esc_html__('Top Spacing (px)', 'shopengine'),
2134 'type' => Controls_Manager::SLIDER,
2135 'size_units' => ['px'],
2136 'selectors' => [
2137 '{{WRAPPER}} .shopengine-archive-products .woocommerce-pagination' => 'padding-top: {{SIZE}}{{UNIT}};',
2138 ],
2139 ]
2140 );
2141
2142 $this->start_controls_tabs('shopengine_pagi_tabs');
2143 $this->start_controls_tab(
2144 'shopengine_pagi_tab_normal',
2145 [
2146 'label' => esc_html__('Normal', 'shopengine'),
2147 ]
2148 );
2149 $this->add_control(
2150 'shopengine_pagi_n_color',
2151 [
2152 'label' => esc_html__('Text Color', 'shopengine'),
2153 'type' => Controls_Manager::COLOR,
2154 'alpha' => false,
2155 'selectors' => [
2156 '{{WRAPPER}} .shopengine-archive-products .woocommerce-pagination' => 'color: {{VALUE}};',
2157 ],
2158 ]
2159 );
2160
2161 $this->add_control(
2162 'shopengine_pagi_n_bgcolor',
2163 [
2164 'label' => esc_html__('Background Color', 'shopengine'),
2165 'type' => Controls_Manager::COLOR,
2166 'alpha' => false,
2167 'selectors' => [
2168 '{{WRAPPER}} .shopengine-archive-products .woocommerce-pagination > ul > li > .page-numbers:not(.dots)' => 'background: {{VALUE}};',
2169 ],
2170 ]
2171 );
2172
2173 $this->add_group_control(
2174 Group_Control_Border::get_type(),
2175 [
2176 'name' => 'shopengine_pagi_n_bd',
2177 'label' => esc_html__('Border', 'shopengine'),
2178 'selector' => '{{WRAPPER}} .shopengine-archive-products .woocommerce-pagination > ul > li > .page-numbers:not(.dots)',
2179 'fields_options' => [
2180 'width' => [
2181 'selectors' => [
2182 '{{WRAPPER}} .shopengine-archive-products .woocommerce-pagination > ul > li > .page-numbers:not(.dots)' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}',
2183 '.rtl {{WRAPPER}} .shopengine-archive-products .woocommerce-pagination > ul > li > .page-numbers:not(.dots)' => 'border-width: {{TOP}}{{UNIT}} {{LEFT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{RIGHT}}{{UNIT}}',
2184 ]
2185 ]
2186 ],
2187 ]
2188 );
2189 $this->add_responsive_control(
2190 'shopengine_pagi_radius',
2191 [
2192 'label' => esc_html__('Border Radius', 'shopengine'),
2193 'type' => Controls_Manager::SLIDER,
2194 'size_units' => ['px', '%'],
2195 'selectors' => [
2196 '{{WRAPPER}} .shopengine-archive-products .woocommerce-pagination > ul > li > .page-numbers' => 'border-radius: {{SIZE}}{{UNIT}};',
2197 ],
2198 'separator' => 'before',
2199 ]
2200 );
2201 $this->end_controls_tab();
2202
2203 $this->start_controls_tab(
2204 'shopengine_pagi_tab_active',
2205 [
2206 'label' => esc_html__('Hover', 'shopengine'),
2207 ]
2208 );
2209 $this->add_control(
2210 'shopengine_pagi_h_color',
2211 [
2212 'label' => esc_html__('Text Color', 'shopengine'),
2213 'type' => Controls_Manager::COLOR,
2214 'alpha' => false,
2215 'selectors' => [
2216 '{{WRAPPER}} .shopengine-archive-products .woocommerce-pagination > ul > li > .page-numbers:hover:not(.current)' => 'color: {{VALUE}};'
2217 ],
2218 ]
2219 );
2220
2221 $this->add_control(
2222 'shopengine_pagi_h_bgcolor',
2223 [
2224 'label' => esc_html__('Background Color', 'shopengine'),
2225 'type' => Controls_Manager::COLOR,
2226 'alpha' => false,
2227 'selectors' => [
2228 '{{WRAPPER}} .shopengine-archive-products .woocommerce-pagination > ul > li > .page-numbers:not(.dots):hover:not(.current)' => 'background: {{VALUE}};'
2229 ],
2230 ]
2231 );
2232
2233 $this->add_control(
2234 'shopengine_pagi_h_bdc',
2235 [
2236 'label' => esc_html__('Border Color', 'shopengine'),
2237 'type' => Controls_Manager::COLOR,
2238 'alpha' => false,
2239 'selectors' => [
2240 '{{WRAPPER}} .shopengine-archive-products .woocommerce-pagination > ul > li > .page-numbers.current' => 'border-color: {{VALUE}};',
2241 '{{WRAPPER}} .shopengine-archive-products .woocommerce-pagination > ul > li > .page-numbers:hover' => 'border-color: {{VALUE}};',
2242 ],
2243 ]
2244 );
2245 $this->end_controls_tab();
2246
2247 $this->start_controls_tab(
2248 'shopengine_pagi_tab_hover',
2249 [
2250 'label' => esc_html__('Active', 'shopengine'),
2251 ]
2252 );
2253 /**
2254 * style: Active button
2255 */
2256 $this->add_control(
2257 'shopengine_pagi_ab_color',
2258 [
2259 'label' => esc_html__('Text Color', 'shopengine'),
2260 'type' => Controls_Manager::COLOR,
2261 'alpha' => false,
2262 'selectors' => [
2263 '{{WRAPPER}} .shopengine-archive-products .woocommerce-pagination > ul > li > .page-numbers.current' => 'color: {{VALUE}};',
2264 ],
2265
2266 ]
2267 );
2268 $this->add_control(
2269 'shopengine_pagi_bh_bgcolor',
2270 [
2271 'label' => esc_html__('Background Color', 'shopengine'),
2272 'type' => Controls_Manager::COLOR,
2273 'alpha' => false,
2274 'selectors' => [
2275 '{{WRAPPER}} .shopengine-archive-products .woocommerce-pagination > ul > li > .page-numbers.current' => 'background: {{VALUE}};',
2276 ],
2277 ]
2278 );
2279
2280 $this->add_control(
2281 'shopengine_pagi_ab_bdc',
2282 [
2283 'label' => esc_html__('Border Color', 'shopengine'),
2284 'type' => Controls_Manager::COLOR,
2285 'alpha' => false,
2286 'selectors' => [
2287 '{{WRAPPER}} .shopengine-archive-products .woocommerce-pagination > ul > li > .page-numbers.current' => 'border-color: {{VALUE}};',
2288 '{{WRAPPER}} .shopengine-archive-products .woocommerce-pagination > ul > li > .page-numbers.current:hover' => 'border-color: {{VALUE}};',
2289 ],
2290 ]
2291 );
2292
2293 $this->add_responsive_control(
2294 'shopengine_pagi_ab_radius',
2295 [
2296 'label' => esc_html__('Border Radius', 'shopengine'),
2297 'type' => Controls_Manager::SLIDER,
2298 'size_units' => ['px', '%'],
2299 'selectors' => [
2300 '{{WRAPPER}} .shopengine-archive-products .woocommerce-pagination > ul > li > .page-numbers.current' => 'border-radius: {{SIZE}}{{UNIT}};',
2301 ],
2302 'separator' => 'before',
2303 ]
2304 );
2305
2306 $this->end_controls_tab();
2307
2308 $this->end_controls_tabs();
2309
2310 $this->add_responsive_control(
2311 'shopengine_pagi_mg',
2312 [
2313 'label' => esc_html__('Margin (px)', 'shopengine'),
2314 'type' => Controls_Manager::DIMENSIONS,
2315 'size_units' => ['px'],
2316 'default' => [
2317 'top' => '10',
2318 'right' => '10',
2319 'bottom' => '0',
2320 'left' => '0',
2321 'isLinked' => false,
2322 ],
2323 'selectors' => [
2324 '{{WRAPPER}} .shopengine-archive-products .woocommerce-pagination > ul > li > .page-numbers' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
2325 '.rtl {{WRAPPER}} .shopengine-archive-products .woocommerce-pagination > ul > li > .page-numbers' => 'margin: {{TOP}}{{UNIT}} {{LEFT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{RIGHT}}{{UNIT}};',
2326 ],
2327 'separator' => 'before',
2328 ]
2329 );
2330
2331 $this->add_responsive_control(
2332 'shopengine_pagi_pd',
2333 [
2334 'label' => esc_html__('Padding (px)', 'shopengine'),
2335 'type' => Controls_Manager::DIMENSIONS,
2336 'size_units' => ['px'],
2337 'selectors' => [
2338 '{{WRAPPER}} .shopengine-archive-products .woocommerce-pagination > ul > li > .page-numbers' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}; min-width: 0;',
2339 '.rtl {{WRAPPER}} .shopengine-archive-products .woocommerce-pagination > ul > li > .page-numbers' => 'padding: {{TOP}}{{UNIT}} {{LEFT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{RIGHT}}{{UNIT}}; min-width: 0;',
2340 ],
2341 ]
2342 );
2343
2344 $this->end_controls_section();
2345
2346
2347 /**
2348 * Section: Global Font
2349 */
2350 $this->start_controls_section(
2351 'shopengine_section_style_global',
2352 [
2353 'label' => esc_html__('Global Font', 'shopengine'),
2354 'tab' => Controls_Manager::TAB_STYLE,
2355 ]
2356 );
2357 $this->add_control(
2358 'shopengine_archive_products_font_family',
2359 [
2360 'label' => esc_html__('Font Family', 'shopengine'),
2361 'description' => esc_html__('This font family is set for this specific widget.', 'shopengine'),
2362 'type' => Controls_Manager::FONT,
2363 'selectors' => [
2364 '{{WRAPPER}} .shopengine-archive-products .product-categories > li,
2365 {{WRAPPER}} .shopengine-archive-products .product .woocommerce-loop-product__title,
2366 {{WRAPPER}} .shopengine-archive-products .product .price .amount,
2367 {{WRAPPER}} .shopengine-archive-products .product a.button:not(.shopengine-quickview-trigger),
2368 {{WRAPPER}} .shopengine-archive-products .onsale,
2369 {{WRAPPER}} .shopengine-archive-products .woocommerce-pagination,
2370 {{WRAPPER}} .shopengine-archive-products .product .shopengine-product-excerpt' => 'font-family: {{VALUE}};',
2371 ],
2372 ]
2373 );
2374 $this->end_controls_section();
2375 }
2376
2377 /**
2378 * Product Action Buttons
2379 */
2380 public function show_product_action_btns()
2381 {
2382
2383 $data_attr = apply_filters('shopengine/group_btns/optional_tooltip_data_attr', '');
2384
2385 woocommerce_template_loop_product_link_close();
2386 ?>
2387 <div class="loop-product--btns" <?php echo esc_attr($data_attr) ?>>
2388 <div class="loop-product--btns-inner">
2389 <?php woocommerce_template_loop_add_to_cart(); ?>
2390 </div>
2391 </div>
2392 <?php
2393 woocommerce_template_loop_product_link_open();
2394 }
2395
2396 /**
2397 * Empty Product Rating
2398 */
2399 public function show_empty_product_rating($html, $ratings, $count)
2400 {
2401 if ('0' === $ratings) :
2402 $html = '<div class="star-rating"></div>';
2403 endif;
2404
2405 global $product;
2406
2407 $review_count = $product->get_review_count();
2408
2409 return $html . '<span class="shopengine-product-rating-review-count">(' . $review_count . ')</span>';
2410 }
2411
2412 /**
2413 * Product Categories
2414 */
2415 public function show_product_cats()
2416 {
2417 $settings = $this->get_settings_for_display();
2418 $terms = get_the_terms(get_the_ID(), 'product_cat');
2419
2420 if (empty($terms)) {
2421 return false;
2422 }
2423
2424 $terms_count = count($terms);
2425
2426 if ($terms_count > 0) {
2427 echo '<ul class="product-categories">';
2428 foreach ($terms as $key => $term) {
2429 if ($settings['shopengine_cats_max'] === $key) {
2430 break;
2431 }
2432
2433 echo '<li><span>' . esc_html($term->name) . '</span></li>';
2434 }
2435 echo '</ul>';
2436 }
2437 }
2438
2439 private function generate_order_item_css($order_items)
2440 {
2441 $styles = '';
2442 $parent_class = '.elementor-element-' . $this->get_id();
2443
2444 foreach ($order_items as $key => $item) {
2445 $order_number = $key + 1;
2446 switch ($item['list_key']) {
2447 case 'add-to-cart':
2448 $styles .= $parent_class . ' .shopengine-archive-products a.add_to_cart_button {order: ' . $order_number . ';}';
2449 $styles .= $parent_class . ' .shopengine-archive-products a.product_type_variable {order: ' . $order_number . ';}';
2450 $styles .= $parent_class . ' .shopengine-archive-products a.product_type_grouped {order: ' . $order_number . ';}';
2451 $styles .= $parent_class . ' .shopengine-archive-products a.product_type_external {order: ' . $order_number . ';}';
2452 break;
2453
2454 case 'wishlist':
2455 $styles .= $parent_class . ' .shopengine-archive-products .shopengine-wishlist {order: ' . $order_number . ';}';
2456 break;
2457
2458 case 'comparison':
2459 $styles .= $parent_class . ' .shopengine-archive-products .shopengine-comparison {order: ' . $order_number . ';}';
2460 break;
2461
2462 case 'quick-view':
2463 $styles .= $parent_class . ' .shopengine-archive-products .shopengine-quickview-trigger {order: ' . $order_number . ';}';
2464 break;
2465
2466 case 'direct-checkout':
2467 $styles .= $parent_class . ' .shopengine-archive-products a.shopengine_direct_checkout {order: ' . $order_number . ';}';
2468 break;
2469 }
2470 }
2471 echo '<style>';
2472 shopengine_content_render($styles);
2473 echo '</style>';
2474 }
2475
2476 protected function screen()
2477 {
2478
2479 $settings = $this->get_settings_for_display();
2480 extract($settings);
2481
2482 if (!empty($shopengine_custom_ordering_list)) {
2483 $this->generate_order_item_css($shopengine_custom_ordering_list);
2484 }
2485
2486 $post_type = get_post_type();
2487
2488 if (WC()->session && function_exists('wc_print_notices')) {
2489 wc_print_notices();
2490 }
2491
2492 /**
2493 * If ground button disabled and the buttons on hover enabled
2494 */
2495 if( $shopengine_group_btns == false && $shopengine_is_hover_details == 'yes' ){
2496 remove_action('woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10);
2497 }
2498
2499
2500 /**
2501 * Show Action Buttons
2502 */
2503 if ($shopengine_group_btns === 'yes') {
2504 remove_action('woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10);
2505
2506 add_filter('woocommerce_before_shop_loop_item_title', [$this, 'show_product_action_btns']);
2507 }
2508
2509
2510 /**
2511 * Show Categories
2512 */
2513 if ($shopengine_is_cats === 'yes') {
2514 add_filter('woocommerce_before_shop_loop_item_title', [$this, 'show_product_cats']);
2515 }
2516
2517 /**
2518 * Show Empty Rating
2519 */
2520 add_filter('woocommerce_product_get_rating_html', [$this, 'show_empty_product_rating'], 99, 3);
2521
2522 $tpl = Products::instance()->get_widget_template($this->get_name());
2523
2524 // Pass settings to the template
2525 $settings_to_pass = compact('shopengine_group_btns', 'shopengine_is_hover_details', 'shopengine_is_cats', 'shopengine_pagination_style', 'shopengine_is_details', 'shopengine_archive_product_title_header_size');
2526
2527 include $tpl;
2528
2529
2530 /**
2531 * Reset Filters to Default.
2532 */
2533 if ($shopengine_group_btns === 'yes') {
2534 remove_filter('woocommerce_before_shop_loop_item_title', [$this, 'show_product_action_btns']);
2535
2536 add_action('woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10);
2537 }
2538
2539 if ($shopengine_is_cats === 'yes') {
2540 remove_filter('woocommerce_before_shop_loop_item_title', [$this, 'show_product_cats']);
2541 }
2542
2543 remove_filter('woocommerce_product_get_rating_html', [$this, 'show_empty_product_rating'], 99);
2544 }
2545 }
2546