PluginProbe ʕ •ᴥ•ʔ
ShopEngine Elementor WooCommerce Builder Addon – All in One WooCommerce Solution / 4.8.7
ShopEngine Elementor WooCommerce Builder Addon – All in One WooCommerce Solution v4.8.7
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 / empty-cart-message / empty-cart-message.php
shopengine / widgets / empty-cart-message Last commit date
screens 4 years ago empty-cart-message-config.php 2 years ago empty-cart-message.php 4 years ago
empty-cart-message.php
138 lines
1 <?php
2
3 namespace Elementor;
4
5 defined('ABSPATH') || exit;
6
7 use ShopEngine\Widgets\Products;
8
9 class ShopEngine_Empty_Cart_Message extends \ShopEngine\Base\Widget
10 {
11
12 public function config() {
13 return new ShopEngine_Empty_Cart_Message_Config();
14 }
15
16 protected function register_controls() {
17
18 $this->start_controls_section(
19 'shopengine_section_empty_cart_message_style',
20 [
21 'label' => esc_html__('Style', 'shopengine'),
22 'tab' => Controls_Manager::TAB_STYLE,
23 ]
24 );
25
26 $this->add_control(
27 'shopengine_empty_cart_message_color',
28 [
29 'label' => esc_html__('Color', 'shopengine'),
30 'type' => Controls_Manager::COLOR,
31 'alpha' => false,
32 'default' => '#3a3a3a',
33 'selectors' => [
34 '{{WRAPPER}} .shopengine-empty-cart-message .cart-empty, {{WRAPPER}} .shopengine-empty-cart-message .cart-empty::before' => 'color: {{VALUE}};',
35 ],
36 ]
37 );
38
39 $this->add_control(
40 'shopengine_empty_cart_message_bg_color',
41 [
42 'label' => esc_html__('Background', 'shopengine'),
43 'type' => Controls_Manager::COLOR,
44 'alpha' => false,
45 'default' => '#f5f5f5',
46 'selectors' => [
47 '{{WRAPPER}} .shopengine-empty-cart-message .cart-empty' => 'min-height:auto;border-radius:0; background: {{VALUE}};',
48 ],
49 ]
50 );
51
52 $this->add_group_control(
53 Group_Control_Typography::get_type(),
54 [
55 'name' => 'shopengine_empty_cart_message_typography',
56 'label' => esc_html__('Typography', 'shopengine'),
57 'selector' => '{{WRAPPER}} .shopengine-empty-cart-message .cart-empty',
58 'exclude' => ['font_style', 'text_decoration'],
59 'fields_options' => [
60 'typography' => [
61 'default' => 'custom',
62 ],
63 'font_weight' => [
64 'default' => '500',
65 ],
66 'font_size' => [
67 'size_units' => ['px'],
68 'default' => [
69 'size' => '16',
70 'unit' => 'px',
71 ],
72 ],
73
74 'line_height' => [
75 'size_units' => ['px'],
76 'default' => [
77 'size' => '22',
78 'unit' => 'px',
79 ],
80 ]
81 ],
82 ]
83 );
84
85 $this->add_responsive_control(
86 'shopengine_title_alignment',
87 [
88 'label' => esc_html__('Alignment', 'shopengine'),
89 'type' => Controls_Manager::CHOOSE,
90 'options' => [
91 'left' => [
92 'description' => esc_html__('Left', 'shopengine'),
93 'icon' => 'eicon-text-align-left',
94 ],
95 'center' => [
96 'description' => esc_html__('Center', 'shopengine'),
97 'icon' => 'eicon-text-align-center',
98 ],
99 'right' => [
100 'description' => esc_html__('Right', 'shopengine'),
101 'icon' => 'eicon-text-align-right',
102 ],
103 ],
104 'selectors' => [
105 '{{WRAPPER}} .shopengine-empty-cart-message .cart-empty' => 'text-align: {{VALUE}} !important;',
106 ]
107 ]
108 );
109
110 $this->add_control(
111 'shopengine_empty_cart_padding',
112 [
113 'label' => esc_html__('Padding (px)', 'shopengine'),
114 'type' => Controls_Manager::DIMENSIONS,
115 'size_units' => ['px'],
116 'default' => [
117 'top' => '10',
118 'right' => '20',
119 'bottom' => '10',
120 'left' => '20',
121 'isLinked' => false,
122 ],
123 'selectors' => [
124 '{{WRAPPER}} .shopengine-empty-cart-message .cart-empty' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
125 ],
126 ]
127 );
128
129 $this->end_controls_section();
130 }
131
132 protected function screen() {
133 $tpl = Products::instance()->get_widget_template($this->get_name());
134
135 include $tpl;
136 }
137 }
138