PluginProbe
Product Labels, Quick View, Buy Now, Pre-Orders, Frequently Bought Together & More for WooCommerce – Merchant / 1.10.0
Product Labels, Quick View, Buy Now, Pre-Orders, Frequently Bought Together & More for WooCommerce – Merchant v1.10.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 / quick-view / admin / options.php

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

380 lines 10.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Quick View
4 *
5 * @package Merchant
6 */
7
8 if ( ! defined( 'ABSPATH' ) ) {
9 exit; // Exit if accessed directly
10 }
11
12 /**
13 * Settings.
14 *
15 */
16 Merchant_Admin_Options::create( array(
17 'title' => esc_html__( 'Settings', 'merchant' ),
18 'module' => 'quick-view',
19 'fields' => array(
20
21 array(
22 'id' => 'button_type',
23 'type' => 'select',
24 'title' => esc_html__( 'Button type', 'merchant' ),
25 'options' => array(
26 'text' => esc_html__( 'Text', 'merchant' ),
27 'icon' => esc_html__( 'Icon', 'merchant' ),
28 'icon-text' => esc_html__( 'Icon + text', 'merchant' ),
29 ),
30 'default' => 'text',
31 ),
32
33 array(
34 'id' => 'button_text',
35 'type' => 'text',
36 'title' => esc_html__( 'Button text', 'merchant' ),
37 'default' => esc_html__( 'Quick view', 'merchant' ),
38 'condition' => array( 'button_type', 'any', 'text|icon-text' ),
39 ),
40
41 array(
42 'id' => 'button_icon',
43 'type' => 'choices',
44 'title' => esc_html__( 'Select an icon', 'merchant' ),
45 'options' => array(
46 'eye' => '%s/eye.svg',
47 'cart' => '%s/cart.svg',
48 ),
49 'default' => 'eye',
50 'condition' => array( 'button_type', 'any', 'icon|icon-text' ),
51 ),
52
53 array(
54 'id' => 'button_position',
55 'type' => 'select',
56 'title' => esc_html__( 'Button position', 'merchant' ),
57 'options' => array(
58 'before' => esc_html__( 'Before - Add to cart', 'merchant' ),
59 'after' => esc_html__( 'After - Add to cart', 'merchant' ),
60 'overlay' => esc_html__( 'Overlay', 'merchant' ),
61 ),
62 'default' => 'overlay',
63 ),
64
65 array(
66 'id' => 'button-position-top',
67 'type' => 'range',
68 'title' => esc_html__( 'Button position top', 'merchant' ),
69 'min' => 1,
70 'max' => 100,
71 'step' => 1,
72 'default' => 50,
73 'unit' => '%',
74 'condition' => array( 'button_position', '==', 'overlay' ),
75 ),
76
77 array(
78 'id' => 'button-position-left',
79 'type' => 'range',
80 'title' => esc_html__( 'Button position left', 'merchant' ),
81 'min' => 1,
82 'max' => 100,
83 'step' => 1,
84 'default' => 50,
85 'unit' => '%',
86 'condition' => array( 'button_position', '==', 'overlay' ),
87 ),
88
89 array(
90 'id' => 'icon-color',
91 'type' => 'color',
92 'title' => esc_html__( 'Icon color', 'merchant' ),
93 'default' => '#ffffff',
94 'condition' => array( 'button_type', 'any', 'icon|icon-text' ),
95 ),
96
97 array(
98 'id' => 'icon-hover-color',
99 'type' => 'color',
100 'title' => esc_html__( 'Icon color hover', 'merchant' ),
101 'default' => '#ffffff',
102 'condition' => array( 'button_type', 'any', 'icon|icon-text' ),
103 ),
104
105 array(
106 'id' => 'text-color',
107 'type' => 'color',
108 'title' => esc_html__( 'Button text color', 'merchant' ),
109 'default' => '#ffffff',
110 'condition' => array( 'button_type', 'any', 'text|icon-text' ),
111 ),
112
113 array(
114 'id' => 'text-hover-color',
115 'type' => 'color',
116 'title' => esc_html__( 'Button text color hover', 'merchant' ),
117 'default' => '#ffffff',
118 'condition' => array( 'button_type', 'any', 'text|icon-text' ),
119 ),
120
121 array(
122 'id' => 'border-color',
123 'type' => 'color',
124 'title' => esc_html__( 'Button border color', 'merchant' ),
125 'default' => '#212121',
126 ),
127
128 array(
129 'id' => 'border-hover-color',
130 'type' => 'color',
131 'title' => esc_html__( 'Button border color hover', 'merchant' ),
132 'default' => '#414141',
133 ),
134
135 array(
136 'id' => 'background-color',
137 'type' => 'color',
138 'title' => esc_html__( 'Button background color', 'merchant' ),
139 'default' => '#212121',
140 ),
141
142 array(
143 'id' => 'background-hover-color',
144 'type' => 'color',
145 'title' => esc_html__( 'Button background color hover', 'merchant' ),
146 'default' => '#414141',
147 ),
148
149 ),
150 ) );
151
152
153 /**
154 * Modal.
155 *
156 */
157 Merchant_Admin_Options::create( array(
158 'title' => esc_html__( 'Modal', 'merchant' ),
159 'module' => 'quick-view',
160 'fields' => array(
161 array(
162 'id' => 'modal_width',
163 'type' => 'range',
164 'title' => esc_html__( 'Modal width', 'merchant' ),
165 'min' => 1,
166 'max' => 2000,
167 'step' => 1,
168 'default' => 1000,
169 'unit' => 'px',
170 ),
171
172 array(
173 'id' => 'modal_height',
174 'type' => 'range',
175 'title' => esc_html__( 'Modal height', 'merchant' ),
176 'min' => 1,
177 'max' => 2000,
178 'step' => 1,
179 'default' => 500,
180 'unit' => 'px',
181 ),
182
183 array(
184 'id' => 'place_product_image',
185 'type' => 'radio',
186 'title' => esc_html__( 'Place product image', 'merchant' ),
187 'options' => array(
188 'thumbs-at-left' => esc_html__( 'Thumbs at left', 'merchant' ),
189 'thumbs-at-right' => esc_html__( 'Thumbs at right', 'merchant' ),
190 'thumbs-at-bottom' => esc_html__( 'Thumbs at bottom', 'merchant' ),
191 ),
192 'default' => 'thumbs-at-left',
193 ),
194
195 array(
196 'id' => 'zoom_effect',
197 'type' => 'switcher',
198 'title' => esc_html__( 'Zoom effect on image', 'merchant' ),
199 'default' => 1,
200 ),
201
202 array(
203 'id' => 'place_product_description',
204 'type' => 'radio',
205 'title' => esc_html__( 'Place product description', 'merchant' ),
206 'options' => array(
207 'top' => esc_html__( 'Top', 'merchant' ),
208 'bottom' => esc_html__( 'Bottom', 'merchant' ),
209 ),
210 'default' => 'top',
211 ),
212
213 array(
214 'id' => 'description_style',
215 'type' => 'radio',
216 'title' => esc_html__( 'Description style', 'merchant' ),
217 'options' => array(
218 'full' => esc_html__( 'Full description', 'merchant' ),
219 'short' => esc_html__( 'Short description', 'merchant' ),
220 ),
221 'default' => 'full',
222 ),
223
224 array(
225 'id' => 'show_quantity',
226 'type' => 'switcher',
227 'title' => esc_html__( 'Show quantity selector', 'merchant' ),
228 'default' => 1,
229 ),
230
231 array(
232 'id' => 'show_buy_now_button',
233 'type' => 'switcher',
234 'title' => esc_html__( 'Show buy now button', 'merchant' ),
235 'default' => 0,
236 ),
237
238 array(
239 'id' => 'show_buy_now_button_instructions',
240 'type' => 'info_block',
241 'description' => esc_html__( 'You can display a Buy Now button by using Merchant’s Buy Now module.', 'merchant' ),
242 'button_text' => esc_html__( 'View Buy Now', 'merchant' ),
243 'button_link' => esc_url( admin_url( 'admin.php?page=merchant&module=buy-now' ) ),
244 'condition' => array( 'show_buy_now_button', '==', '1' ),
245 ),
246
247 array(
248 'id' => 'show_suggested_products',
249 'pro' => true, // Merchant Pro dependent
250 'type' => 'switcher',
251 'title' => esc_html__( 'Show suggested products', 'merchant' ),
252 'default' => 1,
253 ),
254 array(
255 'id' => 'suggested_products_module',
256 'pro' => true,
257 'type' => 'select',
258 'options' => array(
259 'bulk_discounts' => esc_html__( 'Bulk Discounts', 'merchant' ),
260 'buy_x_get_y' => esc_html__( 'Buy X Get Y', 'merchant' ),
261 'frequently_bought_together' => esc_html__( 'Frequently Bought Together', 'merchant' ),
262 ),
263 'default' => 'bulk_discounts',
264 'conditions' => array(
265 'terms' => array(
266 array(
267 'field' => 'show_suggested_products',
268 'operator' => '===',
269 'value' => true,
270 ),
271 ),
272 ),
273 ),
274 array(
275 'id' => 'suggested_products_instructions_bulk_discounts',
276 'pro' => true,
277 'type' => 'info_block',
278 'description' => esc_html__( 'You can display suggested products by enabling certain modules (Bulk Discounts, Buy X Get Y or Frequently Bought Together) from Merchant.', 'merchant' ),
279 'button_text' => esc_html__( 'View Bulk Discounts', 'merchant' ),
280 'button_link' => esc_url( admin_url( 'admin.php?page=merchant&module=volume-discounts' ) ),
281 'conditions' => array(
282 'relation' => 'AND',
283 'terms' => array(
284 array(
285 'field' => 'show_suggested_products',
286 'operator' => '===',
287 'value' => true,
288 ),
289 array(
290 'field' => 'suggested_products_module',
291 'operator' => '===',
292 'value' => 'bulk_discounts',
293 ),
294 ),
295 ),
296 ),
297 array(
298 'id' => 'suggested_products_instructions_frequently_bought_together',
299 'pro' => true,
300 'type' => 'info_block',
301 'description' => esc_html__( 'You can display suggested products by enabling certain modules (Bulk Discounts, Buy X Get Y or Frequently Bought Together) from Merchant.', 'merchant' ),
302 'button_text' => esc_html__( 'View Frequently Bought Together', 'merchant' ),
303 'button_link' => esc_url( admin_url( 'admin.php?page=merchant&module=frequently-bought-together' ) ),
304 'conditions' => array(
305 'relation' => 'AND',
306 'terms' => array(
307 array(
308 'field' => 'show_suggested_products',
309 'operator' => '===',
310 'value' => true,
311 ),
312 array(
313 'field' => 'suggested_products_module',
314 'operator' => '===',
315 'value' => 'frequently_bought_together',
316 ),
317 ),
318 ),
319 ),
320 array(
321 'id' => 'suggested_products_instructions_buy_x_get_y',
322 'pro' => true,
323 'type' => 'info_block',
324 'description' => esc_html__( 'You can display suggested products by enabling certain modules (Bulk Discounts, Buy X Get Y or Frequently Bought Together) from Merchant.', 'merchant' ),
325 'button_text' => esc_html__( 'View Buy X Get Y', 'merchant' ),
326 'button_link' => esc_url( admin_url( 'admin.php?page=merchant&module=buy-x-get-y' ) ),
327 'conditions' => array(
328 'relation' => 'AND',
329 'terms' => array(
330 array(
331 'field' => 'show_suggested_products',
332 'operator' => '===',
333 'value' => true,
334 ),
335 array(
336 'field' => 'suggested_products_module',
337 'operator' => '===',
338 'value' => 'buy_x_get_y',
339 ),
340 ),
341 ),
342 ),
343 array(
344 'id' => 'suggested_products_placement',
345 'pro' => true,
346 'type' => 'radio',
347 'title' => esc_html__( 'Suggested products placement', 'merchant' ),
348 'options' => array(
349 'before_add_to_cart' => esc_html__( 'Before Add to Cart', 'merchant' ),
350 'after_add_to_cart' => esc_html__( 'After Add to Cart', 'merchant' ),
351 ),
352 'default' => 'after_add_to_cart',
353 'conditions' => array(
354 'terms' => array(
355 array(
356 'field' => 'show_suggested_products',
357 'operator' => '===',
358 'value' => true,
359 ),
360 ),
361 ),
362 ),
363
364 array(
365 'id' => 'sale-price-color',
366 'type' => 'color',
367 'title' => esc_html__( 'Sale price color', 'merchant' ),
368 'default' => '#212121',
369 ),
370
371 array(
372 'id' => 'regular-price-color',
373 'type' => 'color',
374 'title' => esc_html__( 'Regular price color', 'merchant' ),
375 'default' => '#999999',
376 ),
377
378 ),
379 ) );
380