PluginProbe ʕ •ᴥ•ʔ
ShopEngine Elementor WooCommerce Builder Addon – All in One WooCommerce Solution / 1.0.0
ShopEngine Elementor WooCommerce Builder Addon – All in One WooCommerce Solution v1.0.0
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 / account-orders / account-orders.php
shopengine / widgets / account-orders Last commit date
screens 5 years ago account-orders-config.php 5 years ago account-orders.php 5 years ago
account-orders.php
876 lines
1 <?php
2
3 namespace Elementor;
4
5 use ShopEngine\Widgets\Products;
6
7 defined('ABSPATH') || exit;
8
9
10 class ShopEngine_Account_Orders extends \ShopEngine\Base\Widget
11 {
12
13 public function config() {
14 return new ShopEngine_Account_Orders_Config();
15 }
16
17 protected function register_controls() {
18
19
20 /*
21 ---------------------------------
22 Header Section
23 ------------------------------------
24 */
25
26 $this->start_controls_section(
27 'shopengine_section_orders_header',
28 [
29 'label' => esc_html__('Table Heading', 'shopengine'),
30 'tab' => Controls_Manager::TAB_STYLE
31 ]
32 );
33
34 $this->add_control(
35 'shopengine_orders_header_color',
36 [
37 'label' => esc_html__('Text Color', 'shopengine'),
38 'type' => Controls_Manager::COLOR,
39 'alpha' => false,
40 'default' => '#3A3A3A',
41 'selectors' => [
42 '{{WRAPPER}} .shopengine-account-orders .woocommerce-orders-table .woocommerce-orders-table__header' => 'color: {{VALUE}}',
43 '{{WRAPPER}} .shopengine-account-orders .woocommerce-order-details thead' => 'color: {{VALUE}}',
44 ],
45 ]
46 );
47
48 $this->add_control(
49 'shopengine_orders_header_background',
50 [
51 'label' => esc_html__('Background', 'shopengine'),
52 'type' => Controls_Manager::COLOR,
53 'alpha' => false,
54 'default' => '#F5F5F5',
55 'selectors' => [
56 '{{WRAPPER}} .shopengine-account-orders .woocommerce-orders-table thead' => 'background: {{VALUE}}',
57 '{{WRAPPER}} .shopengine-account-orders .woocommerce-order-details thead' => 'background: {{VALUE}}',
58 ],
59 ]
60 );
61
62 $this->add_group_control(
63 Group_Control_Typography::get_type(),
64 [
65 'name' => 'shopengine_orders_header_text_typography',
66 'label' => esc_html__('Typography', 'shopengine'),
67 'selector' => '{{WRAPPER}} .shopengine-account-orders .woocommerce-orders-table .woocommerce-orders-table__header, {{WRAPPER}} .shopengine-account-orders .woocommerce-order-details thead',
68 'exclude' => ['letter_spacing', 'text_decoration'],
69
70 'fields_options' => [
71 'typography' => [
72 'default' => 'custom',
73 ],
74 'font_weight' => [
75 'default' => '600',
76 ],
77 'font_size' => [
78 'label' => esc_html__('Font Size (px)', 'shopengine'),
79 'default' => [
80 'size' => '16',
81 'unit' => 'px'
82 ],
83 'size_units' => ['px']
84 ],
85 'line_height' => [
86 'label' => esc_html__('Line-Height (px)', 'shopengine'),
87 'default' => [
88 'size' => '55',
89 'unit' => 'px'
90 ],
91 'size_units' => ['px']
92 ],
93 ],
94 ]
95 );
96
97
98 $this->end_controls_section(); // end ./ header section
99
100 /*
101 ---------------------------------
102 body section style
103 ------------------------------------
104 */
105
106 $this->start_controls_section(
107 'shopengine_section_orders_body',
108 [
109 'label' => esc_html__('Table Body', 'shopengine'),
110 'tab' => Controls_Manager::TAB_STYLE
111 ]
112 );
113
114 $this->add_control(
115 'shopengine_orders_body_color',
116 [
117 'label' => esc_html__('Text Color', 'shopengine'),
118 'type' => Controls_Manager::COLOR,
119 'default' => '#3A3A3A',
120 'alpha' => false,
121 'selectors' => [
122 '{{WRAPPER}} .shopengine-account-orders .woocommerce-orders-table .woocommerce-orders-table__cell' => 'color: {{VALUE}}',
123 '{{WRAPPER}} .shopengine-account-orders .woocommerce-orders-table .woocommerce-orders-table__cell .amount' => 'color: {{VALUE}}',
124 '{{WRAPPER}} .shopengine-account-orders .woocommerce-order-details tbody' => 'color: {{VALUE}}',
125 '{{WRAPPER}} .shopengine-account-orders .woocommerce-order-details tfoot' => 'color: {{VALUE}}',
126 ],
127 ]
128 );
129
130 $this->add_control(
131 'shopengine_orders_body_link_color',
132 [
133 'label' => esc_html__('Link Color', 'shopengine'),
134 'type' => Controls_Manager::COLOR,
135 'default' => '#4169E1',
136 'alpha' => false,
137 'selectors' => [
138 '{{WRAPPER}} .shopengine-account-orders .woocommerce-orders-table .woocommerce-orders-table__cell-order-number a' => 'color: {{VALUE}}',
139 '{{WRAPPER}} .shopengine-account-orders .woocommerce-order-details tbody a' => 'color: {{VALUE}}',
140 ],
141 ]
142 );
143
144 $this->add_control(
145 'shopengine_orders_body_link_hover_color',
146 [
147 'label' => esc_html__('Link Hover Color', 'shopengine'),
148 'type' => Controls_Manager::COLOR,
149 'default' => '#3A3A3A',
150 'alpha' => false,
151 'selectors' => [
152 '{{WRAPPER}} .shopengine-account-orders .woocommerce-orders-table .woocommerce-orders-table__cell-order-number a:hover' => 'color: {{VALUE}}',
153 '{{WRAPPER}} {{WRAPPER}} .shopengine-account-orders .woocommerce-order-details tbody a:hover' => 'color: {{VALUE}}',
154 ]
155 ]
156 );
157
158 $this->add_group_control(
159 Group_Control_Typography::get_type(),
160 [
161 'name' => 'shopengine_orders_body_text_typography',
162 'label' => esc_html__('Text Typography', 'shopengine'),
163 'selector' => '{{WRAPPER}} .shopengine-account-orders .woocommerce-orders-table > tbody .woocommerce-orders-table__row td, {{WRAPPER}} .shopengine-account-orders .woocommerce-order-details tbody, {{WRAPPER}} .shopengine-account-orders .woocommerce-order-details tfoot',
164 'exclude' => ['letter_spacing', 'text_decoration'],
165
166 'fields_options' => [
167 'typography' => [
168 'default' => 'custom',
169 ],
170 'font_weight' => [
171 'default' => '400',
172 ],
173 'font_size' => [
174 'label' => esc_html__('Font Size (px)', 'shopengine'),
175 'default' => [
176 'size' => '16',
177 'unit' => 'px'
178 ],
179 'size_units' => ['px']
180 ],
181 'line_height' => [
182 'label' => esc_html__('Line-Height (px)', 'shopengine'),
183 'default' => [
184 'size' => '55',
185 'unit' => 'px'
186 ],
187 'tablet_default' => [
188 'size' => '34',
189 'unit' => 'px'
190 ],
191 'mobile_default' => [
192 'size' => '30',
193 'unit' => 'px'
194 ],
195 'size_units' => ['px']
196 ],
197 ],
198 ]
199 );
200
201 $this->add_control(
202 'shopengine_orders_body_row_heading',
203 [
204 'label' => esc_html__('Row Border and Responsive Stripe', 'shopengine'),
205 'type' => Controls_Manager::HEADING,
206 'separator' => 'before',
207 ]
208 );
209
210 $this->add_control(
211 'shopengine_orders_body_row_heading_note',
212 [
213 'type' => Controls_Manager::RAW_HTML,
214 'raw' => esc_html__('Responsive stripe background Control appears on tablet and mobile devices', 'shopengine'),
215 'content_classes' => 'elementor-descriptor'
216 ]
217 );
218
219 $this->add_group_control(
220 Group_Control_Border::get_type(),
221 [
222 'name' => 'shopengine_orders_body_row_border',
223 'label' => esc_html__('Border', 'shopengine'),
224 'selector' => '{{WRAPPER}} .shopengine-account-orders .woocommerce-orders-table .woocommerce-orders-table__row, {{WRAPPER}} .shopengine-account-orders .woocommerce-order-details tbody tr, {{WRAPPER}} .shopengine-account-orders .woocommerce-order-details tfoot tr',
225 'fields_options' => [
226 'border_type' => [
227 'default' => 'yes'
228 ],
229 'border' => [
230 'default' => 'solid',
231 'devices' => ['desktop'],
232 'responsive' => true,
233 ],
234
235 'width' => [
236 'label' => esc_html__('Border Width', 'shopengine'),
237 'allowed_dimensions' => ['bottom'],
238 'default' => [
239 'bottom' => '1',
240 'unit' => 'px',
241 ],
242 'devices' => ['desktop'],
243 'responsive' => true,
244 ],
245
246 'color' => [
247 'label' => esc_html__('Border Row Color', 'shopengine'),
248 'alpha' => false,
249 'default' => '#F2F2F2',
250 'devices' => ['desktop'],
251 'responsive' => true,
252 ],
253 ],
254
255 ]
256 );
257
258 $this->add_responsive_control(
259 'shopengine_responsive_striped_bg',
260 [
261 'label' => esc_html__('Responsive Striped Background', 'shopengine'),
262 'type' => Controls_Manager::COLOR,
263 'default' => '#fff',
264 'tablet_default' => '#fafafa',
265 'mobile_default' => '#fafafa',
266 'alpha' => false,
267 'devices' => ['mobile', 'tablet'],
268 'selectors' => [
269 '{{WRAPPER}} .shopengine-account-orders table.shop_table_responsive tr:nth-child(2n)' => 'background: {{VALUE}}',
270 ]
271 ]
272 );
273
274 $this->add_control(
275 'shopengine_orders_body_cell_padding_divider',
276 [
277 'type' => Controls_Manager::DIVIDER,
278 ]
279 );
280
281 $this->add_responsive_control(
282 'shopengine_orders_body_cell_padding',
283 [
284 'label' => esc_html__('Cell Padding', 'shopengine'),
285 'type' => Controls_Manager::DIMENSIONS,
286 'size_units' => ['px'],
287 'selectors' => [
288 '{{WRAPPER}} .shopengine-account-orders table :is(tbody, tfoot, thead) :is(th, td)' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
289 ],
290 ]
291 );
292
293 $this->end_controls_section(); // end ./ body section style
294
295 /*
296 ---------------------------------
297 Address Details Section
298 ------------------------------------
299 */
300 $this->start_controls_section(
301 'shopengine_section_order_address_details',
302 [
303 'label' => esc_html__('Address Details', 'shopengine'),
304 'tab' => Controls_Manager::TAB_STYLE,
305 ]
306 );
307
308 $this->add_control(
309 'shopengine_account_order_title_color',
310 [
311 'label' => esc_html__('Title Color', 'shopengine'),
312 'type' => Controls_Manager::COLOR,
313 'default' => '#3A3A3A',
314 'selectors' => [
315 '{{WRAPPER}} .shopengine-account-orders .woocommerce-customer-details h2' => 'color: {{VALUE}};',
316 ],
317 ]
318 );
319
320 $this->add_control(
321 'shopengine_account_order_address_color',
322 [
323 'label' => esc_html__('Address Text Color', 'shopengine'),
324 'type' => Controls_Manager::COLOR,
325 'default' => '#979797',
326 'selectors' => [
327 '{{WRAPPER}} .shopengine-account-orders .woocommerce-customer-details address' => 'color: {{VALUE}};',
328 ],
329 ]
330 );
331
332 $this->add_responsive_control(
333 'shopengine_account_order_address_align',
334 [
335 'label' => esc_html__('Align', 'shopengine'),
336 'type' => Controls_Manager::CHOOSE,
337 'options' => [
338 'left' => [
339 'title' => esc_html__('Left', 'shopengine'),
340 'icon' => 'fa fa-align-left',
341 ],
342 'center' => [
343 'title' => esc_html__('Center', 'shopengine'),
344 'icon' => 'fa fa-align-center',
345 ],
346 'right' => [
347 'title' => esc_html__('Right', 'shopengine'),
348 'icon' => 'fa fa-align-right',
349 ]
350 ],
351 'selectors' => [
352 '{{WRAPPER}} .shopengine-account-orders .woocommerce-customer-details' => 'text-align: {{VALUE}}',
353 '{{WRAPPER}} .shopengine-account-orders .woocommerce-customer-details address' => 'text-align: {{VALUE}}',
354 ],
355 ]
356 );
357
358 $this->add_control(
359 'shopengine_account_order_address_hide_icon',
360 [
361 'label' => esc_html__('Hide Icon', 'shopengine'),
362 'type' => Controls_Manager::SWITCHER,
363 'label_on' => esc_html__('Yes', 'shopengine'),
364 'label_off' => esc_html__('No', 'shopengine'),
365 'default' => false,
366 'return_value' => true,
367 'selectors' => [
368 '{{WRAPPER}} .shopengine-account-orders .woocommerce-customer-details address p::before' => 'display: none;',
369 '{{WRAPPER}} .shopengine-account-orders .woocommerce-customer-details address p' => 'padding-left: 0;',
370 ],
371 ]
372 );
373
374 $this->add_responsive_control(
375 'shopengine_account_order_address_content_padding',
376 [
377 'label' => esc_html__('Content Padding', 'shopengine'),
378 'type' => Controls_Manager::DIMENSIONS,
379 'size_units' => ['px'],
380 'default' => [
381 'isLinked' => false,
382 ],
383 'selectors' => [
384 '{{WRAPPER}} .shopengine-account-orders .woocommerce-customer-details address' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
385 ],
386 'separator' => 'before',
387 ]
388 );
389
390 $this->end_controls_section();
391
392 /*
393 ---------------------------------
394 Action button
395 ------------------------------------
396 */
397
398 $this->start_controls_section(
399 'shopengine_orders_button_action_section',
400 [
401 'label' => esc_html__('Action Buttons', 'shopengine'),
402 'tab' => Controls_Manager::TAB_STYLE
403 ]
404 );
405
406 $this->add_responsive_control(
407 'shopengine_orders_action_button_padding',
408 [
409 'label' => esc_html__('Padding', 'shopengine'),
410 'type' => Controls_Manager::DIMENSIONS,
411 'size_units' => ['px'],
412 'default' => [
413 'top' => '9',
414 'right' => '21',
415 'bottom' => '10',
416 'left' => '21',
417 'unit' => 'px',
418 'isLinked' => false,
419 ],
420 'selectors' => [
421 '{{WRAPPER}} .shopengine-account-orders .woocommerce-orders-table .button' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
422 '{{WRAPPER}} .shopengine-account-orders .woocommerce-pagination .button' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
423 '{{WRAPPER}} .shopengine-account-orders .woocommerce-order-details .button' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
424 ]
425 ]
426 );
427
428 $this->add_control(
429 'shopengine_orders_button_action_border_radius',
430 [
431 'label' => esc_html__('Border Radius', 'shopengine'),
432 'type' => Controls_Manager::DIMENSIONS,
433 'size_units' => ['px'],
434 'default' => [
435 'top' => '3',
436 'right' => '3',
437 'bottom' => '3',
438 'left' => '3',
439 'unit' => 'px',
440 'isLinked' => true,
441 ],
442 'selectors' => [
443 '{{WRAPPER}} .shopengine-account-orders .woocommerce-orders-table .button' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
444 '{{WRAPPER}} .shopengine-account-orders .woocommerce-pagination .button' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
445 '{{WRAPPER}} .shopengine-account-orders .woocommerce-order-details .button' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
446 ],
447 'separator' => 'before',
448 ]
449 );
450
451 $this->add_group_control(
452 Group_Control_Typography::get_type(),
453 [
454 'name' => 'shopengine_orders_button_view_typography',
455 'label' => esc_html__('Button Typography', 'shopengine'),
456 'selector' => '{{WRAPPER}} .shopengine-account-orders .woocommerce-orders-table .button, {{WRAPPER}} .shopengine-account-orders .woocommerce-pagination .button, {{WRAPPER}} .shopengine-account-orders .woocommerce-order-details .button',
457 'exclude' => ['letter_spacing', 'text_decoration', 'font_style', 'line_height'],
458
459 'fields_options' => [
460 'typography' => [
461 'default' => 'custom',
462 ],
463 'font_weight' => [
464 'default' => '500',
465 ],
466 'font_size' => [
467 'label' => esc_html__('Font Size (px)', 'shopengine'),
468 'default' => [
469 'size' => '15',
470 'unit' => 'px'
471 ],
472 'responsive' => false,
473 'size_units' => ['px']
474 ],
475 ],
476 ]
477 );
478
479 $this->add_group_control(
480 Group_Control_Box_Shadow::get_type(),
481 [
482 'name' => 'shopengine_orders_button_view_box_shadow',
483 'label' => esc_html__('Box Shadow', 'shopengine'),
484 'selector' => '{{WRAPPER}} .shopengine-account-orders .woocommerce-orders-table tbody .woocommerce-orders-table__cell .button, {{WRAPPER}} .shopengine-account-orders .woocommerce-order-details .button',
485 ]
486 );
487
488 /**
489 * View button specific controls
490 */
491 $this->add_control(
492 'shopengine_orders_body_button_view_heading',
493 [
494 'label' => esc_html__('View Button', 'shopengine'),
495 'type' => Controls_Manager::HEADING,
496 'separator' => 'before'
497 ]
498 );
499
500 $this->start_controls_tabs('shopengine_orders_button_view_style_tab');
501
502 $this->start_controls_tab(
503 'shopengine_orders_button_view_tabnormal',
504 [
505 'label' => esc_html__('Normal', 'shopengine'),
506 ]
507 );
508
509 $this->add_control(
510 'shopengine_orders_button_view_color_normal',
511 [
512 'label' => esc_html__('Color', 'shopengine'),
513 'type' => Controls_Manager::COLOR,
514 'default' => '#3A3A3A',
515 'alpha' => false,
516 'selectors' => [
517 '{{WRAPPER}} .shopengine-account-orders .woocommerce-orders-table .woocommerce-orders-table__cell .button.view' => 'color: {{VALUE}} !important;',
518 '{{WRAPPER}} .shopengine-account-orders .woocommerce-order-details .button' => 'color: {{VALUE}} !important;'
519 ],
520 ]
521 );
522
523 $this->add_control(
524 'shopengine_orders_button_view_background_normal',
525 [
526 'label' => esc_html__('Background', 'shopengine'),
527 'type' => Controls_Manager::COLOR,
528 'default' => '#f1f1f1',
529 'alpha' => false,
530 'selectors' => [
531 '{{WRAPPER}} .shopengine-account-orders .woocommerce-orders-table tbody .woocommerce-orders-table__cell .button.view' => 'background-color: {{VALUE}} !important; width:initial;',
532 '{{WRAPPER}} .shopengine-account-orders .woocommerce-order-details .button' => 'background-color: {{VALUE}} !important; width:initial;',
533 ],
534 ]
535 );
536
537 $this->end_controls_tab();
538
539 $this->start_controls_tab(
540 'shopengine_orders_button_view_tabhover',
541 [
542 'label' => esc_html__('Hover', 'shopengine'),
543 ]
544 );
545
546 $this->add_control(
547 'shopengine_orders_button_view_color_hover',
548 [
549 'label' => esc_html__('Color', 'shopengine'),
550 'type' => Controls_Manager::COLOR,
551 'alpha' => false,
552 'default' => '#ffffff',
553 'selectors' => [
554 '{{WRAPPER}} .shopengine-account-orders .woocommerce-orders-table .woocommerce-orders-table__cell .button.view:hover' => 'color: {{VALUE}} !important',
555 '{{WRAPPER}} .shopengine-account-orders .woocommerce-order-details .button:hover' => 'color: {{VALUE}} !important',
556 ],
557 ]
558 );
559
560 $this->add_control(
561 'shopengine_orders_button_view_background_hover',
562 [
563 'label' => esc_html__('Background', 'shopengine'),
564 'type' => Controls_Manager::COLOR,
565 'default' => '#3a3a3a',
566 'alpha' => false,
567 'selectors' => [
568 '{{WRAPPER}} .shopengine-account-orders .woocommerce-orders-table .woocommerce-orders-table__cell .button.view:hover' => 'background-color: {{VALUE}} !important;',
569 '{{WRAPPER}} .shopengine-account-orders .woocommerce-order-details .button:hover' => 'background-color: {{VALUE}} !important;z',
570 ],
571 ]
572 );
573
574
575 $this->end_controls_tab();
576
577 $this->end_controls_tabs();
578
579 /**
580 * Cancel button controls
581 */
582 $this->add_control(
583 'shopengine_orders_body_button_cancel_heading',
584 [
585 'label' => esc_html__('Cancel Button', 'shopengine'),
586 'type' => Controls_Manager::HEADING,
587 'separator' => 'before'
588 ]
589 );
590
591 $this->start_controls_tabs('shopengine_orders_button_cancel_style_tab');
592
593 $this->start_controls_tab(
594 'shopengine_orders_button_cancel_tabnormal',
595 [
596 'label' => esc_html__('Normal', 'shopengine'),
597 ]
598 );
599
600 $this->add_control(
601 'shopengine_orders_button_cancel_color_normal',
602 [
603 'label' => esc_html__('Color', 'shopengine'),
604 'type' => Controls_Manager::COLOR,
605 'default' => '#3A3A3A',
606 'alpha' => false,
607 'selectors' => [
608 '{{WRAPPER}} .shopengine-account-orders .woocommerce-orders-table .woocommerce-orders-table__cell .button.cancel' => 'color: {{VALUE}}'
609 ],
610 ]
611 );
612
613 $this->add_control(
614 'shopengine_orders_button_cancel_background_normal',
615 [
616 'label' => esc_html__('Background', 'shopengine'),
617 'type' => Controls_Manager::COLOR,
618 'default' => '#EFEFEF',
619 'alpha' => false,
620 'selectors' => [
621 '{{WRAPPER}} .shopengine-account-orders .woocommerce-orders-table tbody .woocommerce-orders-table__cell .button.cancel' => 'background: {{VALUE}}'
622 ],
623 ]
624 );
625
626 $this->end_controls_tab();
627
628 $this->start_controls_tab(
629 'shopengine_orders_button_cancel_tabhover',
630 [
631 'label' => esc_html__('Hover', 'shopengine'),
632 ]
633 );
634
635 $this->add_control(
636 'shopengine_orders_button_cancel_color_hover',
637 [
638 'label' => esc_html__('Color', 'shopengine'),
639 'type' => Controls_Manager::COLOR,
640 'default' => '#ffffff',
641 'selectors' => [
642 '{{WRAPPER}} .shopengine-account-orders .woocommerce-orders-table .woocommerce-orders-table__cell .button.cancel:hover' => 'color: {{VALUE}}'
643 ],
644 ]
645 );
646
647 $this->add_control(
648 'shopengine_orders_button_cancel_background_hover',
649 [
650 'label' => esc_html__('Background', 'shopengine'),
651 'type' => Controls_Manager::COLOR,
652 'default' => '#3a3a3a',
653 'alpha' => false,
654 'selectors' => [
655 '{{WRAPPER}} .shopengine-account-orders .woocommerce-orders-table .woocommerce-orders-table__cell .button.cancel:hover' => 'background: {{VALUE}}'
656 ],
657 ]
658 );
659
660
661 $this->end_controls_tab();
662 $this->end_controls_tabs();
663 $this->end_controls_section(); // end ./ action button
664
665 /*
666 ---------------------------------
667 Pagination Section
668 ------------------------------------
669 */
670
671 $this->start_controls_section(
672 'shopengine_orders_button_pagination_section',
673 [
674 'label' => esc_html__('Pagination Button', 'shopengine'),
675 'tab' => Controls_Manager::TAB_STYLE
676 ]
677 );
678
679 $this->add_responsive_control(
680 'shopengine_orders_pagination_padding',
681 [
682 'label' => esc_html__('Padding', 'shopengine'),
683 'type' => Controls_Manager::DIMENSIONS,
684 'size_units' => ['px'],
685 'default' => [
686 'top' => '9',
687 'right' => '21',
688 'bottom' => '10',
689 'left' => '21',
690 'unit' => 'px',
691 'isLinked' => false,
692 ],
693 'selectors' => [
694 '{{WRAPPER}} .shopengine-account-orders .woocommerce-pagination .button' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
695 ]
696 ]
697 );
698
699 $this->add_control(
700 'shopengine_orders_pagination_border_radius',
701 [
702 'label' => esc_html__('Border Radius', 'shopengine'),
703 'type' => Controls_Manager::DIMENSIONS,
704 'size_units' => ['px'],
705 'default' => [
706 'top' => '3',
707 'right' => '3',
708 'bottom' => '3',
709 'left' => '3',
710 'unit' => 'px',
711 'isLinked' => true,
712 ],
713 'selectors' => [
714 '{{WRAPPER}} .shopengine-account-orders .woocommerce-pagination .button' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
715 ]
716 ]
717 );
718
719 $this->add_group_control(
720 Group_Control_Typography::get_type(),
721 [
722 'name' => 'shopengine_orders_pagination_typography',
723 'label' => esc_html__('Button Typography', 'shopengine'),
724 'selector' => '{{WRAPPER}} .shopengine-account-orders .woocommerce-pagination .button',
725 'exclude' => ['letter_spacing', 'text_decoration', 'font_style', 'line_height'],
726
727 'fields_options' => [
728 'typography' => [
729 'default' => 'custom',
730 ],
731 'font_weight' => [
732 'default' => '500',
733 ],
734 'font_size' => [
735 'label' => esc_html__('Font Size (px)', 'shopengine'),
736 'default' => [
737 'size' => '15',
738 'unit' => 'px'
739 ],
740 'responsive' => false,
741 'size_units' => ['px']
742 ],
743 ],
744 ]
745 );
746
747 $this->add_group_control(
748 Group_Control_Box_Shadow::get_type(),
749 [
750 'name' => 'shopengine_orders_pagination_box_shadow',
751 'label' => esc_html__('Box Shadow', 'shopengine'),
752 'selector' => '{{WRAPPER}} .shopengine-account-orders .woocommerce-pagination .button',
753 ]
754 );
755
756 /**
757 * Pagination button controls
758 */
759 $this->add_control(
760 'shopengine_orders_body_pagination_buttons_heading',
761 [
762 'label' => esc_html__('Pagination Buttons', 'shopengine'),
763 'type' => Controls_Manager::HEADING,
764 'separator' => 'before'
765 ]
766 );
767
768 $this->add_control(
769 'shopengine_orders_body_pagination_buttons_heading_note',
770 [
771 'type' => Controls_Manager::RAW_HTML,
772 'raw' => esc_html__('The pagination buttons control will modify next and previous buttons', 'shopengine'),
773 'content_classes' => 'elementor-descriptor'
774 ]
775 );
776
777 $this->start_controls_tabs('shopengine_orders_body_pagination_buttons_tabs');
778
779 $this->start_controls_tab(
780 'shopengine_orders_body_pagination_tab_normal_tab',
781 [
782 'label' => esc_html__('Normal', 'shopengine'),
783 ]
784 );
785
786 $this->add_control(
787 'shopengine_orders_body_pagination_tab_normal_clr',
788 [
789 'label' => esc_html__('Color', 'shopengine'),
790 'type' => Controls_Manager::COLOR,
791 'default' => '#3A3A3A',
792 'alpha' => false,
793 'selectors' => [
794 '{{WRAPPER}} .shopengine-account-orders .woocommerce-pagination .button' => 'color: {{VALUE}}'
795 ],
796 ]
797 );
798
799 $this->add_control(
800 'shopengine_orders_body_pagination_tab_normal_bg',
801 [
802 'label' => esc_html__('Background', 'shopengine'),
803 'type' => Controls_Manager::COLOR,
804 'default' => '#EFEFEF',
805 'alpha' => false,
806 'selectors' => [
807 '{{WRAPPER}} .shopengine-account-orders .woocommerce-pagination .button' => 'background: {{VALUE}}'
808 ],
809 ]
810 );
811
812 $this->end_controls_tab();
813
814 $this->start_controls_tab(
815 'shopengine_orders_body_pagination_tab_hover',
816 [
817 'label' => esc_html__('Hover', 'shopengine'),
818 ]
819 );
820
821 $this->add_control(
822 'shopengine_orders_body_pagination_tab_hover_clr',
823 [
824 'label' => esc_html__('Color', 'shopengine'),
825 'type' => Controls_Manager::COLOR,
826 'default' => '#ffffff',
827 'selectors' => [
828 '{{WRAPPER}} .shopengine-account-orders .woocommerce-pagination .button:hover' => 'color: {{VALUE}}'
829 ],
830 ]
831 );
832
833 $this->add_control(
834 'shopengine_orders_body_pagination_tab_hover_bg',
835 [
836 'label' => esc_html__('Background', 'shopengine'),
837 'type' => Controls_Manager::COLOR,
838 'default' => '#3a3a3a',
839 'alpha' => false,
840 'selectors' => [
841 '{{WRAPPER}} .shopengine-account-orders .woocommerce-pagination .button:hover' => 'background: {{VALUE}}'
842 ],
843 ]
844 );
845
846
847 $this->end_controls_tab();
848
849 $this->end_controls_tabs();
850
851 $this->end_controls_section();
852 }
853
854 /**
855 * Render widget output on the frontend.
856 *
857 * Written in PHP and used to generate the final HTML.
858 *
859 * @since 1.0.0
860 * @access protected
861 */
862 protected function screen() {
863
864 if(!is_user_logged_in()) {
865
866 echo esc_html__('You need first to be logged in', 'shopengine');
867
868 return;
869 }
870
871 $tpl = Products::instance()->get_widget_template($this->get_name());
872
873 include $tpl;
874 }
875 }
876