| @@ -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 what and where 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 | ], |
| @@ -71,8 +71,9 @@ | ||
| 71 | 71 | 'table' => __( 'Table', 'tier-pricing-table' ), |
| 72 | 72 | ], |
| 73 | 73 | 'desc' => __( 'Type of displaying', 'tier-pricing-table' ), |
| 74 | 74 | 'desc_tip' => true, |
| 75 | + 'default' => 'table', | |
| 75 | 76 | ], |
| 76 | 77 | [ |
| 77 | 78 | 'title' => __( 'Tooltip icon color', 'tier-pricing-table' ), |
| 78 | 79 | 'id' => self::SETTINGS_PREFIX . 'tooltip_color', |
| @@ -110,8 +111,10 @@ | ||
| 110 | 111 | 'type' => 'select', |
| 111 | 112 | 'options' => [ |
| 112 | 113 | 'woocommerce_before_add_to_cart_button' => __( 'Above buy button', 'tier-pricing-table' ), |
| 113 | 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' ), | |
| 114 | 117 | 'woocommerce_single_product_summary' => __( 'Above product title', 'tier-pricing-table' ), |
| 115 | 118 | 'woocommerce_before_single_product_summary' => __( 'Before product summary', 'tier-pricing-table' ), |
| 116 | 119 | 'woocommerce_after_single_product_summary' => __( 'After product summary', 'tier-pricing-table' ), |
| 117 | 120 | ], |
| @@ -131,9 +134,10 @@ | ||
| 131 | 134 | 'title' => __( 'Quantity text', 'tier-pricing-table' ), |
| 132 | 135 | 'id' => self::SETTINGS_PREFIX . 'head_quantity_text', |
| 133 | 136 | 'type' => 'text', |
| 134 | 137 | 'default' => __( 'Quantity', 'tier-pricing-table' ), |
| 135 | - 'desc' => __( 'Name of quantity column', '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' ), | |
| 136 | 140 | 'desc_tip' => true, |
| 137 | 141 | ], |
| 138 | 142 | [ |
| 139 | 143 | 'title' => __( 'Price text', 'tier-pricing-table' ), |
| @@ -139,9 +143,10 @@ | ||
| 139 | 143 | 'title' => __( 'Price text', 'tier-pricing-table' ), |
| 140 | 144 | 'id' => self::SETTINGS_PREFIX . 'head_price_text', |
| 141 | 145 | 'type' => 'text', |
| 142 | 146 | 'default' => __( 'Price', 'tier-pricing-table' ), |
| 143 | - 'desc' => __( 'Name of price column', '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' ), | |
| 144 | 149 | 'desc_tip' => true, |
| 145 | 150 | ], |
| 146 | 151 | [ |
| 147 | 152 | 'title' => __( 'CSS class', 'tier-pricing-table' ), |
| @@ -147,9 +152,9 @@ | ||
| 147 | 152 | 'title' => __( 'CSS class', 'tier-pricing-table' ), |
| 148 | 153 | 'id' => self::SETTINGS_PREFIX . 'table_css_class', |
| 149 | 154 | 'type' => 'text', |
| 150 | 155 | 'default' => '', |
| 151 | - '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.', | |
| 152 | 157 | 'tier-pricing-table' ), |
| 153 | 158 | 'desc_tip' => true, |
| 154 | 159 | ], |
| 155 | 160 | [ |
| @@ -155,8 +160,9 @@ | ||
| 155 | 160 | [ |
| 156 | 161 | 'type' => 'sectionend', |
| 157 | 162 | 'id' => self::SETTINGS_PREFIX . 'options' |
| 158 | 163 | ], |
| 164 | + | |
| 159 | 165 | // Premium Here |
| 160 | 166 | [ |
| 161 | 167 | 'title' => __( 'Advanced settings', 'tier-pricing-table' ), |
| 162 | 168 | 'id' => self::SETTINGS_PREFIX . 'premium_options', |
| @@ -163,9 +169,9 @@ | ||
| 163 | 169 | 'type' => 'title', |
| 164 | 170 | 'custom_attributes' => [ 'data-tiered-pricing-premium-setting' => true ] |
| 165 | 171 | ], |
| 166 | 172 | [ |
| 167 | - 'title' => __( 'Show tiered price in cart as discount', 'tier-pricing-table' ), | |
| 173 | + 'title' => __( 'Show Tiered Price in Cart as the Discount', 'tier-pricing-table' ), | |
| 168 | 174 | 'id' => self::SETTINGS_PREFIX . 'show_discount_in_cart', |
| 169 | 175 | 'desc' => __( 'Example:', 'tier-pricing-table' ) . ' <del>10$</del> 8$', |
| 170 | 176 | 'type' => 'checkbox', |
| 171 | 177 | 'default' => 'yes', |
| @@ -172,18 +178,41 @@ | ||
| 172 | 178 | 'desc_tip' => true, |
| 173 | 179 | 'custom_attributes' => [ 'data-tiered-pricing-premium-setting' => 'yes' ] |
| 174 | 180 | ], |
| 175 | 181 | [ |
| 176 | - 'title' => __( 'Use Tiered Price at Catalog', 'tier-pricing-table' ), | |
| 182 | + 'title' => __( 'Enable price formatting on the catalog page, widgets, etc', | |
| 183 | + 'tier-pricing-table' ), | |
| 177 | 184 | 'id' => self::SETTINGS_PREFIX . 'tiered_price_at_catalog', |
| 178 | 185 | 'type' => 'checkbox', |
| 179 | 186 | 'default' => 'yes', |
| 180 | - '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' ), | |
| 181 | 189 | 'desc_tip' => true, |
| 182 | 190 | 'custom_attributes' => [ 'data-tiered-pricing-premium-setting' => true ] |
| 183 | 191 | ], |
| 184 | 192 | [ |
| 185 | - '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' ), | |
| 186 | 215 | 'id' => self::SETTINGS_PREFIX . 'tiered_price_at_catalog_type', |
| 187 | 216 | 'type' => 'select', |
| 188 | 217 | 'options' => [ |
| 189 | 218 | 'range' => __( 'Range (from lowest to highest)', 'tier-pricing-table' ), |
| @@ -188,9 +217,9 @@ | ||
| 188 | 217 | 'options' => [ |
| 189 | 218 | 'range' => __( 'Range (from lowest to highest)', 'tier-pricing-table' ), |
| 190 | 219 | 'lowest' => __( 'Lowest price', 'tier-pricing-table' ), |
| 191 | 220 | ], |
| 192 | - 'desc' => __( 'How to display price at catalog', 'tier-pricing-table' ), | |
| 221 | + 'desc' => __( 'How to Display Tiered Price at The Catalog', 'tier-pricing-table' ), | |
| 193 | 222 | 'desc_tip' => true, |
| 194 | 223 | 'custom_attributes' => [ 'data-tiered-pricing-premium-setting' => true ] |
| 195 | 224 | ], |
| 196 | 225 | [ |
| @@ -197,9 +226,9 @@ | ||
| 197 | 226 | 'title' => __( 'Lowest price prefix', 'tier-pricing-table' ), |
| 198 | 227 | 'id' => self::SETTINGS_PREFIX . 'lowest_prefix', |
| 199 | 228 | 'type' => 'text', |
| 200 | 229 | 'default' => __( 'From', 'tier-pricing-table' ), |
| 201 | - '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>', | |
| 202 | 231 | 'tier-pricing-table' ), |
| 203 | 232 | 'desc_tip' => true, |
| 204 | 233 | 'custom_attributes' => [ 'data-tiered-pricing-premium-setting' => true ] |
| 205 | 234 | ], |
| @@ -210,9 +239,9 @@ | ||
| 210 | 239 | 'default' => 'yes', |
| 211 | 240 | 'custom_attributes' => [ 'data-tiered-pricing-premium-setting' => true ] |
| 212 | 241 | ], |
| 213 | 242 | [ |
| 214 | - 'title' => __( 'Discount text', 'tier-pricing-table' ), | |
| 243 | + 'title' => __( 'Discount column text', 'tier-pricing-table' ), | |
| 215 | 244 | 'id' => self::SETTINGS_PREFIX . 'head_discount_text', |
| 216 | 245 | 'type' => 'text', |
| 217 | 246 | 'default' => __( 'Discount (%)', 'tier-pricing-table' ), |
| 218 | 247 | 'desc' => __( 'Name of discount column', 'tier-pricing-table' ), |
| @@ -219,8 +248,26 @@ | ||
| 219 | 248 | 'desc_tip' => true, |
| 220 | 249 | 'custom_attributes' => [ 'data-tiered-pricing-premium-setting' => true ] |
| 221 | 250 | ], |
| 222 | 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 | + [ | |
| 223 | 270 | 'type' => 'sectionend', |
| 224 | 271 | 'id' => self::SETTINGS_PREFIX . 'premium_options' |
| 225 | 272 | ], |
| 226 | 273 | ); |
| @@ -267,27 +314,32 @@ | ||
| 267 | 314 | * @return array |
| 268 | 315 | */ |
| 269 | 316 | public function getAll() { |
| 270 | 317 | return [ |
| 271 | - 'display' => $this->get( 'display', 'yes' ), | |
| 272 | - 'position_hook' => $this->get( 'position_hook', 'woocommerce_after_add_to_cart_button' ), | |
| 273 | - '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', | |
| 274 | 322 | __( 'Quantity', 'tier-pricing-table' ) ), |
| 275 | - 'head_price_text' => $this->get( 'head_price_text', __( 'Price', 'tier-pricing-table' ) ), | |
| 276 | - 'display_type' => $this->get( 'display_type', 'table' ), | |
| 277 | - 'selected_quantity_color' => $this->get( 'selected_quantity_color', '#cc99c2' ), | |
| 278 | - 'table_title' => $this->get( 'table_title', '' ), | |
| 279 | - 'table_css_class' => $this->get( 'table_css_class', '#fff' ), | |
| 280 | - 'tooltip_size' => $this->get( 'tooltip_size', 15 ), | |
| 281 | - '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' ), | |
| 282 | 331 | |
| 283 | 332 | /* Premium */ |
| 284 | - 'show_discount_in_cart' => $this->get( 'show_discount_in_cart', 'yes' ), | |
| 285 | - 'tiered_price_at_catalog' => $this->get( 'tiered_price_at_catalog', 'yes' ), | |
| 286 | - 'tiered_price_at_catalog_type' => $this->get( 'tiered_price_at_catalog_type', 'yes' ), | |
| 287 | - 'lowest_prefix' => $this->get( 'lowest_prefix', 'yes' ), | |
| 288 | - 'show_discount_column' => $this->get( 'show_discount_column', 'yes' ), | |
| 289 | - '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', | |
| 290 | 342 | __( 'Discount (%)', 'tier-pricing-table' ) ), |
| 291 | 343 | ]; |
| 292 | 344 | } |
| 293 | 345 | |