PluginProbe
Product Labels, Quick View, Buy Now, Pre-Orders, Frequently Bought Together & More for WooCommerce – Merchant / 2.3.0
Product Labels, Quick View, Buy Now, Pre-Orders, Frequently Bought Together & More for WooCommerce – Merchant v2.3.0
2.3.2 2.3.1 2.3.0 2.2.8 2.2.7 trunk 1.10.0 1.10.1 1.10.2 1.10.3 1.10.4 1.10.5 1.11.0 1.11.1 1.11.2 1.6 1.7 1.8 1.8.1 1.8.2 1.8.3 1.9.0 1.9.1 1.9.10 1.9.11 All 60 releases
merchant / inc / modules / real-time-search / admin / options.php

options.php in Product Labels, Quick View, Buy Now, Pre-Orders, Frequently Bought Together & More for WooCommerce – Merchant 2.3.0, at inc/modules/real-time-search/admin/options.php

133 lines 3.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Merchant - Real Time Search
4 */
5
6 if ( ! defined( 'ABSPATH' ) ) {
7 exit; // Exit if accessed directly
8 }
9
10 /**
11 * Settings
12 */
13
14 return array(
15 array(
16 'title' => esc_html__( 'Settings', 'merchant' ),
17 'module' => 'real-time-search',
18 'fields' => array(
19
20 array(
21 'id' => 'results_amounth_per_search',
22 'type' => 'range',
23 'title' => esc_html__( 'Results amount per search', 'merchant' ),
24 'desc' => esc_html__( 'Control the maximum amount of products to show in the search results.', 'merchant' ),
25 'min' => 1,
26 'max' => 100,
27 'step' => 1,
28 'default' => 5,
29 ),
30
31 array(
32 'id' => 'results_description',
33 'type' => 'select',
34 'title' => esc_html__( 'Results description', 'merchant' ),
35 'options' => array(
36 'product-post-content' => esc_html__( 'Product description', 'merchant' ),
37 'product-short-description' => esc_html__( 'Product short description', 'merchant' ),
38 ),
39 'default' => 'product-short-description',
40 ),
41
42 array(
43 'id' => 'results_description_length',
44 'type' => 'range',
45 'title' => esc_html__( 'Results description length', 'merchant' ),
46 'desc' => esc_html__( 'The number of words to show in the description of the results.', 'merchant' ),
47 'min' => 1,
48 'max' => 100,
49 'step' => 1,
50 'default' => 10,
51 ),
52
53 array(
54 'id' => 'results_order_by',
55 'type' => 'select',
56 'title' => esc_html__( 'Results order by', 'merchant' ),
57 'options' => array(
58 'none' => esc_html__( 'None', 'merchant' ),
59 'title' => esc_html__( 'Product name', 'merchant' ),
60 'date' => esc_html__( 'Published date', 'merchant' ),
61 'modified' => esc_html__( 'Modified date', 'merchant' ),
62 'rand' => esc_html__( 'Random', 'merchant' ),
63 'price' => esc_html__( 'Product price', 'merchant' ),
64 ),
65 'default' => 'title',
66 ),
67
68 array(
69 'id' => 'results_order',
70 'type' => 'select',
71 'title' => esc_html__( 'Results order', 'merchant' ),
72 'options' => array(
73 'asc' => esc_html__( 'Ascendant', 'merchant' ),
74 'desc' => esc_html__( 'Descendant', 'merchant' ),
75 ),
76 'default' => 'asc',
77 ),
78
79 array(
80 'id' => 'results_box_width',
81 'type' => 'range',
82 'title' => esc_html__( 'Results box width', 'merchant' ),
83 'min' => 1,
84 'max' => 1000,
85 'step' => 1,
86 'default' => 500,
87 'unit' => 'px',
88 ),
89
90 array(
91 'id' => 'display_categories',
92 'type' => 'checkbox',
93 'label' => esc_html__( 'Display categories', 'merchant' ),
94 'desc' => esc_html__( 'Display product categories in the results if the searched term matches with category name.', 'merchant' ),
95 'default' => false,
96 ),
97
98 array(
99 'id' => 'enable_search_by_sku',
100 'type' => 'checkbox',
101 'label' => esc_html__( 'Enable search by SKU', 'merchant' ),
102 'desc' => esc_html__( 'Return search results based on either product name or SKU.', 'merchant' ),
103 'default' => false,
104 ),
105
106 ),
107 ),
108 array(
109 'module' => Merchant_Real_Time_Search::MODULE_ID,
110 'title' => esc_html__( 'Use shortcode', 'merchant' ),
111 'fields' => array(
112 array(
113 'id' => 'use_shortcode',
114 'type' => 'switcher',
115 'title' => esc_html__( 'Use shortcode', 'merchant' ),
116 'default' => 0,
117 ),
118 array(
119 'type' => 'info',
120 'id' => 'shortcode_info',
121 'content' => esc_html__( 'If you are using a page builder or a theme that supports shortcodes, then you can output the module using the shortcode above. This might be useful if, for example, you find that you want to control the position of the module output more precisely than with the module settings.', 'merchant' ),
122 ),
123 array(
124 'id' => 'shortcode_text',
125 'type' => 'text_readonly',
126 'title' => esc_html__( 'Shortcode text', 'merchant' ),
127 'default' => '[merchant_module_' . str_replace( '-', '_', Merchant_Real_Time_Search::MODULE_ID ) . ']',
128 'condition' => array( 'use_shortcode', '==', '1' ),
129 ),
130 ),
131 ),
132 );
133