PluginProbe
Tiered Pricing Table for WooCommerce / 2.2.2
Tiered Pricing Table for WooCommerce v2.2.2
7.1.7 7.1.5 7.1.4 7.1.1 6.5.0 6.4.0 6.1.0 trunk 1.0 1.1 2.0 2.0.1 2.0.2 2.1 2.1.1 2.1.2 2.2.0 2.2.1 2.2.2 2.2.3 2.3.0 2.3.1 2.3.2 2.3.3 2.3.4 All 90 releases
← All changes | src/Settings/Settings.php +78 -27 2.12.2.2 View file →
@@ -47,9 +47,9 @@
47 47 public function initSettings() {
48 48 $this->settings = array(
49 49 [
50 50 'title' => __( 'Tiered price table settings', 'tier-pricing-table' ),
51 - 'desc' => __( 'This controls how tiered pricing table will be displayed at product page',
51 + 'desc' => __( 'This controls how tiered pricing table will be displayed in your store',
52 52 'tier-pricing-table' ),
53 53 'id' => self::SETTINGS_PREFIX . 'options',
54 54 'type' => 'title',
55 55 ],
@@ -111,8 +111,10 @@
111 111 'type' => 'select',
112 112 'options' => [
113 113 'woocommerce_before_add_to_cart_button' => __( 'Above buy button', 'tier-pricing-table' ),
114 114 'woocommerce_after_add_to_cart_button' => __( 'Below buy button', 'tier-pricing-table' ),
115 + 'woocommerce_before_add_to_cart_form' => __( 'Above add to cart form', 'tier-pricing-table' ),
116 + 'woocommerce_after_add_to_cart_form' => __( 'Below add to cart form', 'tier-pricing-table' ),
115 117 'woocommerce_single_product_summary' => __( 'Above product title', 'tier-pricing-table' ),
116 118 'woocommerce_before_single_product_summary' => __( 'Before product summary', 'tier-pricing-table' ),
117 119 'woocommerce_after_single_product_summary' => __( 'After product summary', 'tier-pricing-table' ),
118 120 ],
@@ -132,9 +134,10 @@
132 134 'title' => __( 'Quantity text', 'tier-pricing-table' ),
133 135 'id' => self::SETTINGS_PREFIX . 'head_quantity_text',
134 136 'type' => 'text',
135 137 'default' => __( 'Quantity', 'tier-pricing-table' ),
136 - 'desc' => __( 'Name of quantity column. Leave Price text and Quantity text blank to do not show table head', 'tier-pricing-table' ),
138 + 'desc' => __( 'Name of quantity column. Leave Price text and Quantity text blank to do not show table head',
139 + 'tier-pricing-table' ),
137 140 'desc_tip' => true,
138 141 ],
139 142 [
140 143 'title' => __( 'Price text', 'tier-pricing-table' ),
@@ -140,9 +143,10 @@
140 143 'title' => __( 'Price text', 'tier-pricing-table' ),
141 144 'id' => self::SETTINGS_PREFIX . 'head_price_text',
142 145 'type' => 'text',
143 146 'default' => __( 'Price', 'tier-pricing-table' ),
144 - 'desc' => __( 'Name of price column. Leave Price text and Quantity text blank to do not show table head', 'tier-pricing-table' ),
147 + 'desc' => __( 'Name of price column. Leave Price text and Quantity text blank to do not show table head',
148 + 'tier-pricing-table' ),
145 149 'desc_tip' => true,
146 150 ],
147 151 [
148 152 'title' => __( 'CSS class', 'tier-pricing-table' ),
@@ -148,9 +152,9 @@
148 152 'title' => __( 'CSS class', 'tier-pricing-table' ),
149 153 'id' => self::SETTINGS_PREFIX . 'table_css_class',
150 154 'type' => 'text',
151 155 'default' => '',
152 - 'desc' => __( 'You can add your own css styles for this class. The class will be added to the table',
156 + 'desc' => __( 'Add your own CSS styles for the class. The class would be added to the table.',
153 157 'tier-pricing-table' ),
154 158 'desc_tip' => true,
155 159 ],
156 160 [
@@ -156,8 +160,9 @@
156 160 [
157 161 'type' => 'sectionend',
158 162 'id' => self::SETTINGS_PREFIX . 'options'
159 163 ],
164 +
160 165 // Premium Here
161 166 [
162 167 'title' => __( 'Advanced settings', 'tier-pricing-table' ),
163 168 'id' => self::SETTINGS_PREFIX . 'premium_options',
@@ -164,9 +169,9 @@
164 169 'type' => 'title',
165 170 'custom_attributes' => [ 'data-tiered-pricing-premium-setting' => true ]
166 171 ],
167 172 [
168 - 'title' => __( 'Show tiered price in cart as discount', 'tier-pricing-table' ),
173 + 'title' => __( 'Show Tiered Price in Cart as the Discount', 'tier-pricing-table' ),
169 174 'id' => self::SETTINGS_PREFIX . 'show_discount_in_cart',
170 175 'desc' => __( 'Example:', 'tier-pricing-table' ) . ' <del>10$</del> 8$',
171 176 'type' => 'checkbox',
172 177 'default' => 'yes',
@@ -173,18 +178,41 @@
173 178 'desc_tip' => true,
174 179 'custom_attributes' => [ 'data-tiered-pricing-premium-setting' => 'yes' ]
175 180 ],
176 181 [
177 - 'title' => __( 'Use Tiered Price at Catalog', 'tier-pricing-table' ),
182 + 'title' => __( 'Enable price formatting on the catalog page, widgets, etc',
183 + 'tier-pricing-table' ),
178 184 'id' => self::SETTINGS_PREFIX . 'tiered_price_at_catalog',
179 185 'type' => 'checkbox',
180 186 'default' => 'yes',
181 - 'desc' => __( 'Enable\Disable showing tiered price at catalog', 'tier-pricing-table' ),
187 + 'desc' => __( 'Change price formatting on the whole site (show range or minimal price)',
188 + 'tier-pricing-table' ),
182 189 'desc_tip' => true,
183 190 'custom_attributes' => [ 'data-tiered-pricing-premium-setting' => true ]
184 191 ],
185 192 [
186 - 'title' => __( 'Display type as', 'tier-pricing-table' ),
193 + 'title' => __( 'Enable price formatting on product page ', 'tier-pricing-table' ),
194 + 'id' => self::SETTINGS_PREFIX . 'tiered_price_at_product_page',
195 + 'type' => 'checkbox',
196 + 'default' => 'no',
197 + 'desc' => __( 'Change price for product at product page (show range or minimal price)',
198 + 'tier-pricing-table' ),
199 + 'desc_tip' => true,
200 + 'custom_attributes' => [ 'data-tiered-pricing-premium-setting' => true ]
201 + ],
202 + [
203 + 'title' => __( 'Enable catalog, widget price formatting for variable products',
204 + 'tier-pricing-table' ),
205 + 'id' => self::SETTINGS_PREFIX . 'tiered_price_at_catalog_for_variable',
206 + 'type' => 'checkbox',
207 + 'default' => 'yes',
208 + 'desc' => __( 'Show tiered price at the catalog for variable products. Uses the lowest and the highest prices from all variations',
209 + 'tier-pricing-table' ),
210 + 'desc_tip' => true,
211 + 'custom_attributes' => [ 'data-tiered-pricing-premium-setting' => true ]
212 + ],
213 + [
214 + 'title' => __( 'Display Tiered Price as', 'tier-pricing-table' ),
187 215 'id' => self::SETTINGS_PREFIX . 'tiered_price_at_catalog_type',
188 216 'type' => 'select',
189 217 'options' => [
190 218 'range' => __( 'Range (from lowest to highest)', 'tier-pricing-table' ),
@@ -189,9 +217,9 @@
189 217 'options' => [
190 218 'range' => __( 'Range (from lowest to highest)', 'tier-pricing-table' ),
191 219 'lowest' => __( 'Lowest price', 'tier-pricing-table' ),
192 220 ],
193 - 'desc' => __( 'How to display price at catalog', 'tier-pricing-table' ),
221 + 'desc' => __( 'How to Display Tiered Price at The Catalog', 'tier-pricing-table' ),
194 222 'desc_tip' => true,
195 223 'custom_attributes' => [ 'data-tiered-pricing-premium-setting' => true ]
196 224 ],
197 225 [
@@ -198,9 +226,9 @@
198 226 'title' => __( 'Lowest price prefix', 'tier-pricing-table' ),
199 227 'id' => self::SETTINGS_PREFIX . 'lowest_prefix',
200 228 'type' => 'text',
201 229 'default' => __( 'From', 'tier-pricing-table' ),
202 - 'desc' => __( 'Prefix before lowest product price at catalog. Example: <b>From 10$</b>',
230 + 'desc' => __( 'Prefix Before Lowest Tiered Product Price at the Catalog. Example: <b>From 10$</b>',
203 231 'tier-pricing-table' ),
204 232 'desc_tip' => true,
205 233 'custom_attributes' => [ 'data-tiered-pricing-premium-setting' => true ]
206 234 ],
@@ -211,9 +239,9 @@
211 239 'default' => 'yes',
212 240 'custom_attributes' => [ 'data-tiered-pricing-premium-setting' => true ]
213 241 ],
214 242 [
215 - 'title' => __( 'Discount text', 'tier-pricing-table' ),
243 + 'title' => __( 'Discount column text', 'tier-pricing-table' ),
216 244 'id' => self::SETTINGS_PREFIX . 'head_discount_text',
217 245 'type' => 'text',
218 246 'default' => __( 'Discount (%)', 'tier-pricing-table' ),
219 247 'desc' => __( 'Name of discount column', 'tier-pricing-table' ),
@@ -220,8 +248,26 @@
220 248 'desc_tip' => true,
221 249 'custom_attributes' => [ 'data-tiered-pricing-premium-setting' => true ]
222 250 ],
223 251 [
252 + 'title' => __( 'Set tiered price on click', 'tier-pricing-table' ),
253 + 'id' => self::SETTINGS_PREFIX . 'clickable_table_rows',
254 + 'type' => 'checkbox',
255 + 'default' => 'no',
256 + 'desc' => __( 'Change product quantity on click at table pricing row',
257 + 'tier-pricing-table' ),
258 + 'custom_attributes' => [ 'data-tiered-pricing-premium-setting' => true ]
259 + ],
260 + [
261 + 'title' => __( 'Show total price', 'tier-pricing-table' ),
262 + 'id' => self::SETTINGS_PREFIX . 'show_total_price',
263 + 'type' => 'checkbox',
264 + 'default' => 'no',
265 + 'desc' => __( 'Calculate and show total price at product page',
266 + 'tier-pricing-table' ),
267 + 'custom_attributes' => [ 'data-tiered-pricing-premium-setting' => true ]
268 + ],
269 + [
224 270 'type' => 'sectionend',
225 271 'id' => self::SETTINGS_PREFIX . 'premium_options'
226 272 ],
227 273 );
@@ -268,27 +314,32 @@
268 314 * @return array
269 315 */
270 316 public function getAll() {
271 317 return [
272 - 'display' => $this->get( 'display', 'yes' ),
273 - 'position_hook' => $this->get( 'position_hook', 'woocommerce_after_add_to_cart_button' ),
274 - 'head_quantity_text' => $this->get( 'head_quantity_text',
318 + 'display' => $this->get( 'display', 'yes' ),
319 + 'position_hook' => $this->get( 'position_hook',
320 + 'woocommerce_after_add_to_cart_button' ),
321 + 'head_quantity_text' => $this->get( 'head_quantity_text',
275 322 __( 'Quantity', 'tier-pricing-table' ) ),
276 - 'head_price_text' => $this->get( 'head_price_text', __( 'Price', 'tier-pricing-table' ) ),
277 - 'display_type' => $this->get( 'display_type', 'table' ),
278 - 'selected_quantity_color' => $this->get( 'selected_quantity_color', '#cc99c2' ),
279 - 'table_title' => $this->get( 'table_title', '' ),
280 - 'table_css_class' => $this->get( 'table_css_class', '#fff' ),
281 - 'tooltip_size' => $this->get( 'tooltip_size', 15 ),
282 - 'tooltip_border' => $this->get( 'tooltip_border', 'yes' ),
323 + 'head_price_text' => $this->get( 'head_price_text',
324 + __( 'Price', 'tier-pricing-table' ) ),
325 + 'display_type' => $this->get( 'display_type', 'table' ),
326 + 'selected_quantity_color' => $this->get( 'selected_quantity_color', '#cc99c2' ),
327 + 'table_title' => $this->get( 'table_title', '' ),
328 + 'table_css_class' => $this->get( 'table_css_class', '#fff' ),
329 + 'tooltip_size' => $this->get( 'tooltip_size', 15 ),
330 + 'tooltip_border' => $this->get( 'tooltip_border', 'yes' ),
283 331
284 332 /* Premium */
285 - 'show_discount_in_cart' => $this->get( 'show_discount_in_cart', 'yes' ),
286 - 'tiered_price_at_catalog' => $this->get( 'tiered_price_at_catalog', 'yes' ),
287 - 'tiered_price_at_catalog_type' => $this->get( 'tiered_price_at_catalog_type', 'yes' ),
288 - 'lowest_prefix' => $this->get( 'lowest_prefix', 'yes' ),
289 - 'show_discount_column' => $this->get( 'show_discount_column', 'yes' ),
290 - 'head_discount_text' => $this->get( 'head_discount_text',
333 + 'show_discount_in_cart' => $this->get( 'show_discount_in_cart', 'yes' ),
334 + 'tiered_price_at_catalog' => $this->get( 'tiered_price_at_catalog', 'yes' ),
335 + 'tiered_price_at_catalog_for_variable' => $this->get( 'tiered_price_at_catalog_for_variable', 'yes' ),
336 + 'tiered_price_at_catalog_type' => $this->get( 'tiered_price_at_catalog_type', 'yes' ),
337 + 'lowest_prefix' => $this->get( 'lowest_prefix', 'yes' ),
338 + 'show_discount_column' => $this->get( 'show_discount_column', 'yes' ),
339 + 'clickable_table_rows' => $this->get( 'clickable_table_rows', 'no' ),
340 + 'show_total_price' => $this->get( 'show_total_price', 'no' ),
341 + 'head_discount_text' => $this->get( 'head_discount_text',
291 342 __( 'Discount (%)', 'tier-pricing-table' ) ),
292 343 ];
293 344 }
294 345