PluginProbe
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler / 1.6.6
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler v1.6.6
1.6.6 1.6.5 1.6.4 1.6.3 1.6.2 1.6.1 1.6.0 1.5.4 1.5.5 1.5.3 1.5.2 1.5.1 1.5.0 1.4.2 1.4.1 1.4.0 1.3.28 1.3.27 1.3.26 1.3.25 1.3.23 1.3.22 1.3.21 1.3.20 1.3.19 All 49 releases
← All changes | app/Modules/Templating/Bricks/Elements/PriceRange.php +17 -11 1.5.2 → 1.6.6 View file →
@@ -3,8 +3,9 @@
3 3 namespace FluentCart\App\Modules\Templating\Bricks\Elements;
4 4
5 5 use Bricks\Element;
6 6 use FluentCart\App\Modules\Data\ProductDataSetup;
7 +use FluentCart\App\Modules\Templating\AssetLoader;
7 8 use FluentCart\App\Services\Renderer\ProductRenderer;
8 9 use FluentCart\Framework\Support\Arr;
9 10 use FluentCart\App\Modules\Templating\Bricks\BricksLoader;
10 11
@@ -14,13 +15,18 @@
14 15 {
15 16
16 17 public $category = 'fluent-cart';
17 18 public $name = 'fct-price-range';
18 - public $icon = 'ti-money';
19 + public $icon = 'ti-money fluent-cart-element-icon';
19 20
21 + public function enqueue_scripts()
22 + {
23 + AssetLoader::loadSingleProductAssets();
24 + }
25 +
20 26 public function get_label()
21 27 {
22 - return esc_html__('Price Range (FluentCart)', 'fluent-cart');
28 + return esc_html__('Price Range', 'fluent-cart');
23 29 }
24 30
25 31 public function set_controls()
26 32 {
@@ -26,12 +32,12 @@
26 32 {
27 33 $this->controls['queryType'] = [
28 34 'tab' => 'content',
29 35 'type' => 'select',
30 - 'label' => esc_html__('Query Type', 'fluent-cart-bricks-blocks'),
36 + 'label' => esc_html__('Query Type', 'fluent-cart'),
31 37 'options' => [
32 - 'default' => esc_html__('Default', 'fluent-cart-bricks-blocks'),
33 - 'custom' => esc_html__('Custom', 'fluent-cart-bricks-blocks'),
38 + 'default' => esc_html__('Default', 'fluent-cart'),
39 + 'custom' => esc_html__('Custom', 'fluent-cart'),
34 40 ],
35 41 'default' => 'default',
36 42 'inline' => true,
37 43 ];
@@ -38,11 +44,11 @@
38 44
39 45 $this->controls['productId'] = [
40 46 'tab' => 'content',
41 47 'type' => 'select',
42 - 'label' => esc_html__('Product', 'fluent-cart-bricks-blocks'),
48 + 'label' => esc_html__('Product', 'fluent-cart'),
43 49 'options' => BricksLoader::getProductOptions(),
44 - 'placeholder' => esc_html__('Select a product', 'fluent-cart-bricks-blocks'),
50 + 'placeholder' => esc_html__('Select a product', 'fluent-cart'),
45 51 'searchable' => true,
46 52 'rerender' => true,
47 53 'required' => ['queryType', '=', 'custom'],
48 54 ];
@@ -49,16 +55,16 @@
49 55
50 56 $this->controls['manualProductId'] = [
51 57 'tab' => 'content',
52 58 'type' => 'text',
53 - 'label' => esc_html__('Manual Product ID', 'fluent-cart-bricks-blocks'),
54 - 'description' => esc_html__('Use this if the product is not available in dropdown.', 'fluent-cart-bricks-blocks'),
59 + 'label' => esc_html__('Manual Product ID', 'fluent-cart'),
60 + 'description' => esc_html__('Use this if the product is not available in dropdown.', 'fluent-cart'),
55 61 'required' => [['queryType', '=', 'custom'], ['productId', '=', '']],
56 62 ];
57 63
58 64 $this->controls['hideNoRange'] = [
59 65 'tab' => 'content',
60 - 'label' => esc_html__('Hide when max and mix is same', 'fluent-cart'),
66 + 'label' => esc_html__('Hide when max and min is same', 'fluent-cart'),
61 67 'type' => 'checkbox'
62 68 ];
63 69 $this->controls['priceRangeTypography'] = [
64 70 'tab' => 'content',
@@ -94,9 +100,9 @@
94 100 if (!$product) {
95 101 return $this->render_element_placeholder([
96 102 'title' => esc_html__(
97 103 'Select a product',
98 - 'fluent-cart-bricks-blocks'
104 + 'fluent-cart'
99 105 ),
100 106 ]);
101 107 }
102 108