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

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

159 lines 4.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * Spending Goal Options.
5 *
6 * @package Merchant
7 */
8
9 if ( ! defined( 'ABSPATH' ) ) {
10 exit; // Exit if accessed directly
11 }
12
13 // Settings
14 Merchant_Admin_Options::create( array(
15 'title' => esc_html__( 'Settings', 'merchant' ),
16 'module' => Merchant_Spending_Goal::MODULE_ID,
17 'fields' => array(
18
19 array(
20 'id' => 'spending_goal',
21 'type' => 'number',
22 'title' => esc_html__( 'Spending goal', 'merchant' ),
23 'default' => 150,
24 ),
25
26 array(
27 'id' => 'total_type',
28 'type' => 'select',
29 'title' => esc_html__( 'Based on', 'merchant' ),
30 'desc' => esc_html__( 'Choose the basis for the spending goal. “Cart Subtotal” excludes additional calculated discounts, whereas “Cart Total” includes them.', 'merchant' ),
31 'options' => array(
32 'subtotal' => esc_html__( 'Cart subtotal', 'merchant' ),
33 'total' => esc_html__( 'Cart total', 'merchant' ),
34 ),
35 'default' => 'subtotal',
36 ),
37
38 array(
39 'id' => 'discount_type',
40 'type' => 'select',
41 'title' => esc_html__( 'Discount type', 'merchant' ),
42 'options' => array(
43 'percent' => esc_html__( 'Percent', 'merchant' ),
44 'fixed' => esc_html__( 'Fixed amount', 'merchant' ),
45 ),
46 'default' => 'percent',
47 ),
48
49 array(
50 'id' => 'discount_amount',
51 'type' => 'number',
52 'title' => esc_html__( 'Discount amount', 'merchant' ),
53 'default' => 10,
54 ),
55
56 array(
57 'id' => 'discount_name',
58 'type' => 'text',
59 'title' => esc_html__( 'Discount name', 'merchant' ),
60 'default' => esc_html__( 'Spending goal', 'merchant' ),
61 'desc' => esc_html__( 'This will be the name of the applied discount on the cart page.', 'merchant' ),
62 ),
63
64 array(
65 'id' => 'enable_auto_slide_in',
66 'type' => 'switcher',
67 'title' => esc_html__( 'Enable Auto Slide In', 'merchant' ),
68 'desc' => esc_html__( 'This will make the widget slide in after a product is added to the cart.', 'merchant' ),
69 'default' => 1,
70 ),
71 ),
72 ) );
73
74 // Text Formatting Settings
75 Merchant_Admin_Options::create( array(
76 'title' => esc_html__( 'Text Formatting Settings', 'merchant' ),
77 'module' => Merchant_Spending_Goal::MODULE_ID,
78 'fields' => array(
79
80 array(
81 'id' => 'text_goal_zero',
82 'type' => 'text',
83 'title' => esc_html__( 'When the goal target is at 0%', 'merchant' ),
84 'default' => esc_html__( 'Spend {spending_goal} to get a {discount_amount} discount!', 'merchant' ),
85 'desc' => esc_html__( 'Default is: Spend {spending_goal} to get a {discount_amount} discount!', 'merchant' ),
86 ),
87
88 array(
89 'id' => 'text_goal_started',
90 'type' => 'text',
91 'title' => esc_html__( 'When the goal target is between 1-99%', 'merchant' ),
92 'default' => esc_html__( 'Spend {spending_goal} more to get a {discount_amount} discount', 'merchant' ),
93 'desc' => esc_html__( 'Default is: Spend {spending_goal} more to get a {discount_amount} discount', 'merchant' ),
94 ),
95
96 array(
97 'id' => 'text_goal_reached',
98 'type' => 'text',
99 'title' => esc_html__( 'When the goal target is at 100%', 'merchant' ),
100 'default' => esc_html__( 'Congratulations! You get a discount of {discount_amount} on this order!', 'merchant' ),
101 'desc' => esc_html__( 'Default: Congratulations! You get a discount of {discount_amount} on this order!', 'merchant' ),
102 ),
103 ),
104 ) );
105
106 // Style Settings
107 Merchant_Admin_Options::create( array(
108 'module' => Merchant_Spending_Goal::MODULE_ID,
109 'title' => esc_html__( 'Style', 'merchant' ),
110 'fields' => array(
111
112 array(
113 'id' => 'gradient_start',
114 'type' => 'color',
115 'title' => esc_html__( 'Gradient start', 'merchant' ),
116 'default' => '#5e5e5e',
117 ),
118
119 array(
120 'id' => 'gradient_end',
121 'type' => 'color',
122 'title' => esc_html__( 'Gradient end', 'merchant' ),
123 'default' => '#212121',
124 ),
125
126 array(
127 'id' => 'progress_bar',
128 'type' => 'color',
129 'title' => esc_html__( 'Progress bar color', 'merchant' ),
130 'default' => '#d83a3b',
131 ),
132
133 array(
134 'id' => 'content_width',
135 'type' => 'range',
136 'title' => esc_html__( 'Content width', 'merchant' ),
137 'min' => 0,
138 'max' => 600,
139 'step' => 1,
140 'unit' => 'px',
141 'default' => 300,
142 ),
143
144 array(
145 'id' => 'content_bg_color',
146 'type' => 'color',
147 'title' => esc_html__( 'Content background color', 'merchant' ),
148 'default' => '#f9f9f9',
149 ),
150
151 array(
152 'id' => 'content_text_color',
153 'type' => 'color',
154 'title' => esc_html__( 'Content text color', 'merchant' ),
155 'default' => '#3c434a',
156 ),
157 ),
158 ) );
159