Discount Rules for WooCommerce - Version 2.3.4

Version Description

  • 01/02/21 =
  • Feature - Quantity based promotion message.
  • Improvement - Accept additional tags in sale badge.
  • Improvement - Translation improvements.
  • Improvement - Variable product suffix on strikeout.
  • Improvement - Event: advanced_woo_discount_rules_coupon_discount_type_percentage
  • Improvement - Event: advanced_woo_discount_rules_apply_coupon_for_products_based_on_filters
  • Improvement - Event: advanced_woo_discount_rules_cart_item_key_for_buy_x_get_y_limited_discounts
  • Improvement - Event: advanced_woo_discount_rules_select_coupon_from_woocommerce
  • Improvement - Email tld condition improvement.
  • Fix - Coupon not applied when use settings (disable coupons discount rules will work).
  • Fix - Fatal error for child products when category based rule is set.
  • Fix - Buy X get Y auto add not added while variant is added in cart.
  • Fix - BOGO Cheapest strikeout issue.
  • Fix - Last order purchase condition issue
  • Fix - Fatal error on view plugin details in plugin page
Download this release

Release Info

Developer flycart
Plugin Icon 128x128 Discount Rules for WooCommerce
Version 2.3.4
Comparing to
See all releases

Code changes from version 2.3.3 to 2.3.4

Files changed (64) hide show
  1. common.php +19 -19
  2. readme.txt +25 -9
  3. v2/App/Compatibility/AeliaCurrencySwitcherByAelia.php +1 -1
  4. v2/App/Compatibility/CompositeProductsBySomewhereWarm.php +2 -2
  5. v2/App/Compatibility/CurrencySwitcherByRealmag777.php +1 -1
  6. v2/App/Compatibility/CurrencySwitcherByVillatheme.php +1 -1
  7. v2/App/Compatibility/CurrencySwitcherByWPWham.php +1 -1
  8. v2/App/Compatibility/ExtraProductOptionsProByThemeHigh.php +2 -2
  9. v2/App/Compatibility/ProductAddOnsByWooCommerce.php +1 -1
  10. v2/App/Compatibility/WholesalePricesByRymeraWebCo.php +1 -1
  11. v2/App/Conditions/CartLineItemsCount.php +2 -2
  12. v2/App/Conditions/CartSubTotal.php +8 -4
  13. v2/App/Controllers/Admin/Settings.php +76 -75
  14. v2/App/Controllers/Admin/Tabs/Compatible.php +1 -1
  15. v2/App/Controllers/Admin/Tabs/DiscountRules.php +1 -1
  16. v2/App/Controllers/Admin/Tabs/GeneralSettings.php +1 -1
  17. v2/App/Controllers/Admin/Tabs/Help.php +1 -1
  18. v2/App/Controllers/Admin/Tabs/ImportExport.php +1 -1
  19. v2/App/Controllers/Admin/Tabs/Reports/RuleAmount.php +2 -2
  20. v2/App/Controllers/Admin/Tabs/Reports/RuleAmountWithCartDiscount.php +1 -1
  21. v2/App/Controllers/Admin/Tabs/Reports/RuleNameDiscount.php +2 -2
  22. v2/App/Controllers/Admin/Tabs/Statistics.php +8 -8
  23. v2/App/Controllers/Admin/WDRAjax.php +2 -2
  24. v2/App/Controllers/Base.php +10 -10
  25. v2/App/Controllers/Configuration.php +3 -0
  26. v2/App/Controllers/DiscountCalculator.php +6 -1
  27. v2/App/Controllers/ManageDiscount.php +32 -22
  28. v2/App/Controllers/ShortCodeManager.php +1 -1
  29. v2/App/Helpers/Filter.php +1 -1
  30. v2/App/Helpers/Helper.php +27 -24
  31. v2/App/Helpers/Migration.php +84 -1
  32. v2/App/Helpers/ProOptions.php +74 -74
  33. v2/App/Helpers/Rule.php +12 -4
  34. v2/App/Helpers/Validation.php +12 -12
  35. v2/App/Helpers/Woocommerce.php +35 -35
  36. v2/App/Models/DBTable.php +8 -0
  37. v2/App/Router.php +2 -2
  38. v2/App/Views/Admin/Menu.php +1 -1
  39. v2/App/Views/Admin/Rules/Conditions/Cart/LineItemCount.php +10 -10
  40. v2/App/Views/Admin/Rules/Conditions/Cart/Subtotal.php +10 -10
  41. v2/App/Views/Admin/Rules/Conditions/Main.php +32 -25
  42. v2/App/Views/Admin/Rules/DiscountBatch/Main.php +24 -24
  43. v2/App/Views/Admin/Rules/Discounts/Bulk.php +13 -13
  44. v2/App/Views/Admin/Rules/Discounts/Cart.php +8 -8
  45. v2/App/Views/Admin/Rules/Discounts/Main.php +10 -10
  46. v2/App/Views/Admin/Rules/Discounts/simple.php +7 -7
  47. v2/App/Views/Admin/Rules/Filters/AllProducts.php +2 -2
  48. v2/App/Views/Admin/Rules/Filters/Main.php +17 -17
  49. v2/App/Views/Admin/Rules/Filters/Products.php +4 -4
  50. v2/App/Views/Admin/Rules/Manage.php +29 -28
  51. v2/App/Views/Admin/Rules/Others/CommonTemplates.php +5 -4
  52. v2/App/Views/Admin/Rules/Others/QuantityPromotion.php +38 -0
  53. v2/App/Views/Admin/Rules/Others/SubtotalPromotion.php +13 -9
  54. v2/App/Views/Admin/Tabs/DiscountRule.php +80 -80
  55. v2/App/Views/Admin/Tabs/ImportExport.php +9 -9
  56. v2/App/Views/Admin/Tabs/Statistics.php +13 -13
  57. v2/App/Views/Admin/Tabs/compatible.php +3 -3
  58. v2/App/Views/Admin/Tabs/help.php +3 -3
  59. v2/App/Views/Admin/Tabs/settings.php +186 -187
  60. v2/App/Views/Admin/welcome-text.php +3 -3
  61. v2/App/Views/Templates/discount_table.php +5 -5
  62. v2/Assets/Css/admin_style.css +3 -0
  63. v2/Assets/Js/admin_script.js +40 -13
  64. woo-discount-rules.php +23 -8
common.php CHANGED
@@ -6,7 +6,7 @@ add_action('wp_ajax_awdr_auto_install_pro_plugin', function (){
6
  FlycartWooDiscountRulesExistingPROUpdater::installProPlugin();
7
  exit;
8
  } else {
9
- die(__('Authentication required', WDR_TEXT_DOMAIN));
10
  }
11
  });
12
  add_action('wp_ajax_awdr_switch_version', function (){
@@ -14,7 +14,7 @@ add_action('wp_ajax_awdr_switch_version', function (){
14
  $page = isset($_REQUEST['page'])? $_REQUEST['page']: '';
15
  $wdr_nonce = isset($_REQUEST['wdr_nonce'])? $_REQUEST['wdr_nonce']: '';
16
  $return['status'] = false;
17
- $return['message'] = esc_html__('Invalid request', WDR_TEXT_DOMAIN);
18
  if($version == "v1"){
19
  \Wdr\App\Helpers\Helper::validateRequest('wdr_ajax_switch_version', $wdr_nonce);
20
  } else {
@@ -25,11 +25,11 @@ add_action('wp_ajax_awdr_switch_version', function (){
25
  $url = admin_url('admin.php?page=' . $page . '&awdr_switch_plugin_to=' . $version);
26
  $do_switch = true;
27
  if (!isAWDREnvironmentCompatible()) {
28
- $return['message'] = __('Discount Rules 2.0 requires minimum PHP version of ', WDR_TEXT_DOMAIN) . ' ' . WDR_REQUIRED_PHP_VERSION;
29
  wp_send_json_success($return);
30
  }
31
  if (!isAWDRWooCompatible()) {
32
- $return['message'] = __('Discount Rules 2.0 requires at least Woocommerce', WDR_TEXT_DOMAIN) . ' ' . WDR_WC_REQUIRED_VERSION;
33
  wp_send_json_success($return);
34
  }
35
  if (defined('WDR_BACKWARD_COMPATIBLE')) {
@@ -59,14 +59,14 @@ add_action('wp_ajax_awdr_switch_version', function (){
59
  }
60
  if($has_auto_update){
61
  $return['type'] = 'auto_install';
62
- $message = __('<p>Since 2.0, you need BOTH Core and Pro (2.0) packages installed and activated.</p>', WDR_TEXT_DOMAIN);
63
- $message .= __('<p><b>Why we made this change?</b></p>', WDR_TEXT_DOMAIN);
64
- $message .= __('<p>This arrangement is to avoid the confusion in the installation and upgrade process. Many users first install the core free version. Then purchase the PRO version and try to install it over the free version. Since both free and pro packages have same names, wordpress asks them to uninstall free and then install pro. As you can see, this is quite confusing for the end users.</p>', WDR_TEXT_DOMAIN);
65
- $message .= __('<p>As a result, starting from 2.0, we now have two packs: 1. Core 2. PRO.</p>', WDR_TEXT_DOMAIN);
66
- $message .= '<p><button type="button" class="awdr_auto_install_pro_plugin btn btn-info">'.__('Download and Install', WDR_TEXT_DOMAIN).'</button></p>';
67
  $return['message'] = $message;
68
  } else {
69
- $return['message'] = __('Since 2.0, you need BOTH Core and Pro (2.0) packages installed and activated. Please download the Pro 2.0 pack from My Downloads page in our site, install and activate it. <a href="https://docs.flycart.org/en/articles/4006520-switching-to-2-0-from-v1-x-versions?utm_source=woo-discount-rules-v2&utm_campaign=doc&utm_medium=text-click&utm_content=switch_to_v2" target="_blank">Here is a guide and video tutorial</a>', WDR_TEXT_DOMAIN);
70
  $return['type'] = 'manual_install';
71
  }
72
  }
@@ -89,12 +89,12 @@ add_action('advanced_woo_discount_rules_on_settings_head', function () {
89
  global $awdr_load_version;
90
  $version = ($awdr_load_version == "v1") ? "v2" : "v1";
91
  $url = admin_url('admin.php?page=' . $page . '&awdr_switch_plugin_to=' . $version);
92
- $message = __('Switch to Discount Rules V2 which comes with a better UI and advanced rules. (You can switch back any time. Your settings and rules in V1 are kept as is)', WDR_TEXT_DOMAIN);
93
- $button_text = __("Switch to v2", WDR_TEXT_DOMAIN);
94
  if($version == "v1"){
95
  $has_switch = \Wdr\App\Helpers\Migration::hasSwitchBackOption();
96
- $message = __('Would you like to switch to older Woo Discount Rules?', WDR_TEXT_DOMAIN);
97
- $button_text = __("Click here to Switch back", WDR_TEXT_DOMAIN);
98
  }
99
  if($has_switch){
100
  if($version == "v1"){
@@ -109,7 +109,7 @@ add_action('advanced_woo_discount_rules_on_settings_head', function () {
109
  <div class="modal-box">
110
  <div class="modal-header">
111
  <div class="close-modal"><span class="wdr-close-modal-box">&#10006;</span></div>
112
- <h1 class="wdr-modal-header-title">'.__("Install 2.0 Pro package", WDR_TEXT_DOMAIN).'</h1>
113
  </div>
114
  <div class="modal-body">
115
  <div class=\'wdr_pro_install_message\'></div>
@@ -136,7 +136,7 @@ add_action('advanced_woo_discount_rules_content_next_to_tabs', function () {
136
  $nounce = FlycartWooDiscountRulesGeneralHelper::createNonce('wdr_ajax_switch_version');
137
  }
138
  if($has_switch){
139
- $button_text = __("Switch back to Discount Rules 1.x", WDR_TEXT_DOMAIN);
140
  echo '<button class="btn btn-info awdr-switch-version-button awdr-switch-version-button-on-tab" data-version="' . $version . '" data-page="'.$page.'" data-nonce="'.$nounce.'">' . $button_text . '</button>';
141
  }
142
  });
@@ -223,13 +223,13 @@ if(!function_exists('isAWDRWpCompatible')){
223
  if(!function_exists('awdr_check_compatible')){
224
  function awdr_check_compatible(){
225
  if (!isAWDREnvironmentCompatible()) {
226
- exit(__('This plugin can not be activated because it requires minimum PHP version of ', WDR_TEXT_DOMAIN) . ' ' . WDR_REQUIRED_PHP_VERSION);
227
  }
228
  if (!isAWDRWooActive()) {
229
- exit(__('Woocommerce must installed and activated in-order to use Advanced woo discount rules!', WDR_TEXT_DOMAIN));
230
  }
231
  if (!isAWDRWooCompatible()) {
232
- exit(__(' Advanced woo discount rules requires at least Woocommerce', WDR_TEXT_DOMAIN) . ' ' . WDR_WC_REQUIRED_VERSION);
233
  }
234
  }
235
  }
6
  FlycartWooDiscountRulesExistingPROUpdater::installProPlugin();
7
  exit;
8
  } else {
9
+ die(__('Authentication required', 'woo-discount-rules'));
10
  }
11
  });
12
  add_action('wp_ajax_awdr_switch_version', function (){
14
  $page = isset($_REQUEST['page'])? $_REQUEST['page']: '';
15
  $wdr_nonce = isset($_REQUEST['wdr_nonce'])? $_REQUEST['wdr_nonce']: '';
16
  $return['status'] = false;
17
+ $return['message'] = esc_html__('Invalid request', 'woo-discount-rules');
18
  if($version == "v1"){
19
  \Wdr\App\Helpers\Helper::validateRequest('wdr_ajax_switch_version', $wdr_nonce);
20
  } else {
25
  $url = admin_url('admin.php?page=' . $page . '&awdr_switch_plugin_to=' . $version);
26
  $do_switch = true;
27
  if (!isAWDREnvironmentCompatible()) {
28
+ $return['message'] = __('Discount Rules 2.0 requires minimum PHP version of ', 'woo-discount-rules') . ' ' . WDR_REQUIRED_PHP_VERSION;
29
  wp_send_json_success($return);
30
  }
31
  if (!isAWDRWooCompatible()) {
32
+ $return['message'] = __('Discount Rules 2.0 requires at least Woocommerce', 'woo-discount-rules') . ' ' . WDR_WC_REQUIRED_VERSION;
33
  wp_send_json_success($return);
34
  }
35
  if (defined('WDR_BACKWARD_COMPATIBLE')) {
59
  }
60
  if($has_auto_update){
61
  $return['type'] = 'auto_install';
62
+ $message = __('<p>Since 2.0, you need BOTH Core and Pro (2.0) packages installed and activated.</p>', 'woo-discount-rules');
63
+ $message .= __('<p><b>Why we made this change?</b></p>', 'woo-discount-rules');
64
+ $message .= __('<p>This arrangement is to avoid the confusion in the installation and upgrade process. Many users first install the core free version. Then purchase the PRO version and try to install it over the free version. Since both free and pro packages have same names, wordpress asks them to uninstall free and then install pro. As you can see, this is quite confusing for the end users.</p>', 'woo-discount-rules');
65
+ $message .= __('<p>As a result, starting from 2.0, we now have two packs: 1. Core 2. PRO.</p>', 'woo-discount-rules');
66
+ $message .= '<p><button type="button" class="awdr_auto_install_pro_plugin btn btn-info">'.__('Download and Install', 'woo-discount-rules').'</button></p>';
67
  $return['message'] = $message;
68
  } else {
69
+ $return['message'] = __('Since 2.0, you need BOTH Core and Pro (2.0) packages installed and activated. Please download the Pro 2.0 pack from My Downloads page in our site, install and activate it. <a href="https://docs.flycart.org/en/articles/4006520-switching-to-2-0-from-v1-x-versions?utm_source=woo-discount-rules-v2&utm_campaign=doc&utm_medium=text-click&utm_content=switch_to_v2" target="_blank">Here is a guide and video tutorial</a>', 'woo-discount-rules');
70
  $return['type'] = 'manual_install';
71
  }
72
  }
89
  global $awdr_load_version;
90
  $version = ($awdr_load_version == "v1") ? "v2" : "v1";
91
  $url = admin_url('admin.php?page=' . $page . '&awdr_switch_plugin_to=' . $version);
92
+ $message = __('Switch to Discount Rules V2 which comes with a better UI and advanced rules. (You can switch back any time. Your settings and rules in V1 are kept as is)', 'woo-discount-rules');
93
+ $button_text = __("Switch to v2", 'woo-discount-rules');
94
  if($version == "v1"){
95
  $has_switch = \Wdr\App\Helpers\Migration::hasSwitchBackOption();
96
+ $message = __('Would you like to switch to older Woo Discount Rules?', 'woo-discount-rules');
97
+ $button_text = __("Click here to Switch back", 'woo-discount-rules');
98
  }
99
  if($has_switch){
100
  if($version == "v1"){
109
  <div class="modal-box">
110
  <div class="modal-header">
111
  <div class="close-modal"><span class="wdr-close-modal-box">&#10006;</span></div>
112
+ <h1 class="wdr-modal-header-title">'.__("Install 2.0 Pro package", 'woo-discount-rules').'</h1>
113
  </div>
114
  <div class="modal-body">
115
  <div class=\'wdr_pro_install_message\'></div>
136
  $nounce = FlycartWooDiscountRulesGeneralHelper::createNonce('wdr_ajax_switch_version');
137
  }
138
  if($has_switch){
139
+ $button_text = __("Switch back to Discount Rules 1.x", 'woo-discount-rules');
140
  echo '<button class="btn btn-info awdr-switch-version-button awdr-switch-version-button-on-tab" data-version="' . $version . '" data-page="'.$page.'" data-nonce="'.$nounce.'">' . $button_text . '</button>';
141
  }
142
  });
223
  if(!function_exists('awdr_check_compatible')){
224
  function awdr_check_compatible(){
225
  if (!isAWDREnvironmentCompatible()) {
226
+ exit(__('This plugin can not be activated because it requires minimum PHP version of ', 'woo-discount-rules') . ' ' . WDR_REQUIRED_PHP_VERSION);
227
  }
228
  if (!isAWDRWooActive()) {
229
+ exit(__('Woocommerce must installed and activated in-order to use Advanced woo discount rules!', 'woo-discount-rules'));
230
  }
231
  if (!isAWDRWooCompatible()) {
232
+ exit(__(' Advanced woo discount rules requires at least Woocommerce', 'woo-discount-rules') . ' ' . WDR_WC_REQUIRED_VERSION);
233
  }
234
  }
235
  }
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: flycart
3
  Donate link: https://flycart.org/
4
  Tags: woocommerce, coupons, discounts, dynamic pricing, Buy One Get One Free, pricing deals, bulk discount, discount
5
  Requires at least: 4.4.1
6
- Tested up to: 5.5
7
- Stable tag: 2.3.3
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -323,13 +323,12 @@ Note : Enable recursive checkbox if the discounts should be applied in sequentia
323
 
324
  == Screenshots ==
325
 
326
- 1. Discount Rules menu
327
- 2. Price rules and Cart rules
328
- 3. Creating a price rule
329
- 4. Example Promotion Offers created using Discount rules
330
- 5. Discounted price is applied in the Cart
331
- 6. Creating a Buy X get Y rule
332
- 7. Free product auto added in cart
333
 
334
  == Credits ==
335
 
@@ -337,6 +336,23 @@ Note : Enable recursive checkbox if the discounts should be applied in sequentia
337
 
338
  == Changelog ==
339
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
340
  = 2.3.3 - 16/12/20 =
341
  * Fix - Attribute doesn't loads for few language.
342
  * Fix - Show Discount bar for 0 price product.
3
  Donate link: https://flycart.org/
4
  Tags: woocommerce, coupons, discounts, dynamic pricing, Buy One Get One Free, pricing deals, bulk discount, discount
5
  Requires at least: 4.4.1
6
+ Tested up to: 5.6
7
+ Stable tag: 2.3.4
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
323
 
324
  == Screenshots ==
325
 
326
+ 1. Price rules and Cart rules
327
+ 2. Creating a price rule
328
+ 3. Example Promotion Offers created using Discount rules
329
+ 4. Discounted price is applied in the Cart
330
+ 5. Creating a Buy X get Y rule
331
+ 6. Free product auto added in cart
 
332
 
333
  == Credits ==
334
 
336
 
337
  == Changelog ==
338
 
339
+ = 2.3.4 - 01/02/21 =
340
+ * Feature - Quantity based promotion message.
341
+ * Improvement - Accept additional tags in sale badge.
342
+ * Improvement - Translation improvements.
343
+ * Improvement - Variable product suffix on strikeout.
344
+ * Improvement - Event: advanced_woo_discount_rules_coupon_discount_type_percentage
345
+ * Improvement - Event: advanced_woo_discount_rules_apply_coupon_for_products_based_on_filters
346
+ * Improvement - Event: advanced_woo_discount_rules_cart_item_key_for_buy_x_get_y_limited_discounts
347
+ * Improvement - Event: advanced_woo_discount_rules_select_coupon_from_woocommerce
348
+ * Improvement - Email tld condition improvement.
349
+ * Fix - Coupon not applied when use settings (disable coupons discount rules will work).
350
+ * Fix - Fatal error for child products when category based rule is set.
351
+ * Fix - Buy X get Y auto add not added while variant is added in cart.
352
+ * Fix - BOGO Cheapest strikeout issue.
353
+ * Fix - Last order purchase condition issue
354
+ * Fix - Fatal error on view plugin details in plugin page
355
+
356
  = 2.3.3 - 16/12/20 =
357
  * Fix - Attribute doesn't loads for few language.
358
  * Fix - Show Discount bar for 0 price product.
v2/App/Compatibility/AeliaCurrencySwitcherByAelia.php CHANGED
@@ -46,7 +46,7 @@ class AeliaCurrencySwitcherByAelia extends Base
46
  <div class="awdr-compatible-field">
47
  <label>
48
  <input type="checkbox" name="wdrc[<?php echo $this->key; ?>]" id="<?php echo $this->key; ?>" value="1" <?php if ($value == 1) { ?> checked <?php } ?>>
49
- <?php esc_html_e('Add compatible for Aelia Currency Switcher', WDR_TEXT_DOMAIN); ?>
50
  </label>
51
  </div>
52
  <?php
46
  <div class="awdr-compatible-field">
47
  <label>
48
  <input type="checkbox" name="wdrc[<?php echo $this->key; ?>]" id="<?php echo $this->key; ?>" value="1" <?php if ($value == 1) { ?> checked <?php } ?>>
49
+ <?php esc_html_e('Add compatible for Aelia Currency Switcher', 'woo-discount-rules'); ?>
50
  </label>
51
  </div>
52
  <?php
v2/App/Compatibility/CompositeProductsBySomewhereWarm.php CHANGED
@@ -48,10 +48,10 @@ class CompositeProductsBySomewhereWarm extends Base
48
  <div class="awdr-compatible-field">
49
  <label>
50
  <input type="checkbox" name="wdrc[<?php echo $this->key; ?>]" id="<?php echo $this->key; ?>" value="1" <?php if ($value == 1) { ?> checked <?php } ?>>
51
- <?php esc_html_e('Add compatible for WooCommerce Composite Products', WDR_TEXT_DOMAIN); ?>
52
  </label>
53
  <br>
54
- <span class="wdr_desc_text awdr-clear-both"><?php esc_html_e('Limitation: Product page strikeout. We suggest to disable strikeout on product page.', WDR_TEXT_DOMAIN); ?></span>
55
  </div>
56
  <?php
57
  }
48
  <div class="awdr-compatible-field">
49
  <label>
50
  <input type="checkbox" name="wdrc[<?php echo $this->key; ?>]" id="<?php echo $this->key; ?>" value="1" <?php if ($value == 1) { ?> checked <?php } ?>>
51
+ <?php esc_html_e('Add compatible for WooCommerce Composite Products', 'woo-discount-rules'); ?>
52
  </label>
53
  <br>
54
+ <span class="wdr_desc_text awdr-clear-both"><?php esc_html_e('Limitation: Product page strikeout. We suggest to disable strikeout on product page.', 'woo-discount-rules'); ?></span>
55
  </div>
56
  <?php
57
  }
v2/App/Compatibility/CurrencySwitcherByRealmag777.php CHANGED
@@ -57,7 +57,7 @@ class CurrencySwitcherByRealmag777 extends Base
57
  <div class="awdr-compatible-field">
58
  <label>
59
  <input type="checkbox" name="wdrc[<?php echo $this->key; ?>]" id="<?php echo $this->key; ?>" value="1" <?php if ($value == 1) { ?> checked <?php } ?>>
60
- <?php esc_html_e('Add compatible for WooCommerce Currency Switcher', WDR_TEXT_DOMAIN); ?>
61
  </label>
62
  </div>
63
  <?php
57
  <div class="awdr-compatible-field">
58
  <label>
59
  <input type="checkbox" name="wdrc[<?php echo $this->key; ?>]" id="<?php echo $this->key; ?>" value="1" <?php if ($value == 1) { ?> checked <?php } ?>>
60
+ <?php esc_html_e('Add compatible for WooCommerce Currency Switcher', 'woo-discount-rules'); ?>
61
  </label>
62
  </div>
63
  <?php
v2/App/Compatibility/CurrencySwitcherByVillatheme.php CHANGED
@@ -53,7 +53,7 @@ class CurrencySwitcherByVillatheme extends Base
53
  <div class="awdr-compatible-field">
54
  <label>
55
  <input type="checkbox" name="wdrc[<?php echo $this->key; ?>]" id="<?php echo $this->key; ?>" value="1" <?php if ($value == 1) { ?> checked <?php } ?>>
56
- <?php esc_html_e('Add compatible for WooCommerce Currency Switcher', WDR_TEXT_DOMAIN); ?>
57
  </label>
58
  </div>
59
  <?php
53
  <div class="awdr-compatible-field">
54
  <label>
55
  <input type="checkbox" name="wdrc[<?php echo $this->key; ?>]" id="<?php echo $this->key; ?>" value="1" <?php if ($value == 1) { ?> checked <?php } ?>>
56
+ <?php esc_html_e('Add compatible for WooCommerce Currency Switcher', 'woo-discount-rules'); ?>
57
  </label>
58
  </div>
59
  <?php
v2/App/Compatibility/CurrencySwitcherByWPWham.php CHANGED
@@ -41,7 +41,7 @@ class CurrencySwitcherByWPWham extends Base
41
  <div class="awdr-compatible-field">
42
  <label>
43
  <input type="checkbox" name="wdrc[<?php echo $this->key; ?>]" id="<?php echo $this->key; ?>" value="1" <?php if ($value == 1) { ?> checked <?php } ?>>
44
- <?php esc_html_e('Add compatible for WooCommerce Currency Switcher', WDR_TEXT_DOMAIN); ?>
45
  </label>
46
  </div>
47
  <?php
41
  <div class="awdr-compatible-field">
42
  <label>
43
  <input type="checkbox" name="wdrc[<?php echo $this->key; ?>]" id="<?php echo $this->key; ?>" value="1" <?php if ($value == 1) { ?> checked <?php } ?>>
44
+ <?php esc_html_e('Add compatible for WooCommerce Currency Switcher', 'woo-discount-rules'); ?>
45
  </label>
46
  </div>
47
  <?php
v2/App/Compatibility/ExtraProductOptionsProByThemeHigh.php CHANGED
@@ -51,10 +51,10 @@ class ExtraProductOptionsProByThemeHigh extends Base
51
  <div class="awdr-compatible-field">
52
  <label>
53
  <input type="checkbox" name="wdrc[<?php echo $this->key; ?>]" id="<?php echo $this->key; ?>" value="1" <?php if ($value == 1) { ?> checked <?php } ?>>
54
- <?php esc_html_e('Add compatible for WooCommerce Extra Product Options', WDR_TEXT_DOMAIN); ?>
55
  </label>
56
  <br>
57
- <span class="wdr_desc_text awdr-clear-both"><?php esc_html_e('Limitation: Strikeout for add-on price and subtotal in product page.', WDR_TEXT_DOMAIN); ?></span>
58
  </div>
59
  <?php
60
  }
51
  <div class="awdr-compatible-field">
52
  <label>
53
  <input type="checkbox" name="wdrc[<?php echo $this->key; ?>]" id="<?php echo $this->key; ?>" value="1" <?php if ($value == 1) { ?> checked <?php } ?>>
54
+ <?php esc_html_e('Add compatible for WooCommerce Extra Product Options', 'woo-discount-rules'); ?>
55
  </label>
56
  <br>
57
+ <span class="wdr_desc_text awdr-clear-both"><?php esc_html_e('Limitation: Strikeout for add-on price and subtotal in product page.', 'woo-discount-rules'); ?></span>
58
  </div>
59
  <?php
60
  }
v2/App/Compatibility/ProductAddOnsByWooCommerce.php CHANGED
@@ -105,7 +105,7 @@ class ProductAddOnsByWooCommerce extends Base
105
  <div class="awdr-compatible-field">
106
  <label>
107
  <input type="checkbox" name="wdrc[<?php echo $this->key; ?>]" id="<?php echo $this->key; ?>" value="1" <?php if ($value == 1) { ?> checked <?php } ?>>
108
- <?php esc_html_e('Show discount price in product pages for WooCommerce Product Add Ons.', WDR_TEXT_DOMAIN); ?>
109
  </label>
110
  </div>
111
  <?php
105
  <div class="awdr-compatible-field">
106
  <label>
107
  <input type="checkbox" name="wdrc[<?php echo $this->key; ?>]" id="<?php echo $this->key; ?>" value="1" <?php if ($value == 1) { ?> checked <?php } ?>>
108
+ <?php esc_html_e('Show discount price in product pages for WooCommerce Product Add Ons.', 'woo-discount-rules'); ?>
109
  </label>
110
  </div>
111
  <?php
v2/App/Compatibility/WholesalePricesByRymeraWebCo.php CHANGED
@@ -48,7 +48,7 @@ class WholesalePricesByRymeraWebCo extends Base
48
  <div class="awdr-compatible-field">
49
  <label>
50
  <input type="checkbox" name="wdrc[<?php echo $this->key; ?>]" id="<?php echo $this->key; ?>" value="1" <?php if ($value == 1) { ?> checked <?php } ?>>
51
- <?php esc_html_e('Add compatible for WooCommerce Wholesale Prices', WDR_TEXT_DOMAIN); ?>
52
  </label>
53
  </div>
54
  <?php
48
  <div class="awdr-compatible-field">
49
  <label>
50
  <input type="checkbox" name="wdrc[<?php echo $this->key; ?>]" id="<?php echo $this->key; ?>" value="1" <?php if ($value == 1) { ?> checked <?php } ?>>
51
+ <?php esc_html_e('Add compatible for WooCommerce Wholesale Prices', 'woo-discount-rules'); ?>
52
  </label>
53
  </div>
54
  <?php
v2/App/Conditions/CartLineItemsCount.php CHANGED
@@ -12,8 +12,8 @@ class CartLineItemsCount extends Base
12
  {
13
  parent::__construct();
14
  $this->name = 'cart_line_items_count';
15
- $this->label = __('Line Item Count', WDR_TEXT_DOMAIN);
16
- $this->group = __('Cart', WDR_TEXT_DOMAIN);
17
  $this->template = WDR_PLUGIN_PATH . 'App/Views/Admin/Rules/Conditions/Cart/LineItemCount.php';
18
  }
19
 
12
  {
13
  parent::__construct();
14
  $this->name = 'cart_line_items_count';
15
+ $this->label = __('Line Item Count', 'woo-discount-rules');
16
+ $this->group = __('Cart', 'woo-discount-rules');
17
  $this->template = WDR_PLUGIN_PATH . 'App/Views/Admin/Rules/Conditions/Cart/LineItemCount.php';
18
  }
19
 
v2/App/Conditions/CartSubTotal.php CHANGED
@@ -2,6 +2,7 @@
2
 
3
  namespace Wdr\App\Conditions;
4
 
 
5
  use Wdr\App\Controllers\DiscountCalculator;
6
  use Wdr\App\Helpers\Helper;
7
  use Wdr\App\Helpers\Woocommerce;
@@ -14,8 +15,8 @@ class CartSubTotal extends Base
14
  {
15
  parent::__construct();
16
  $this->name = 'cart_subtotal';
17
- $this->label = __('Subtotal', WDR_TEXT_DOMAIN);
18
- $this->group = __('Cart', WDR_TEXT_DOMAIN);
19
  $this->template = WDR_PLUGIN_PATH . 'App/Views/Admin/Rules/Conditions/Cart/Subtotal.php';
20
  }
21
 
@@ -48,7 +49,10 @@ class CartSubTotal extends Base
48
  $value = self::$woocommerce_helper->getConvertedFixedPrice($options->value, 'subtotal_condition');
49
  $status = $this->doComparisionOperation($operator, $cart_sub_total, $value);
50
  if(!$status){
51
- $this->processPromotion($operator, $options, $cart_sub_total, $value);
 
 
 
52
  }
53
  return $status;
54
  }
@@ -66,7 +70,7 @@ class CartSubTotal extends Base
66
  if($options->subtotal_promotion_from <= $cart_sub_total){
67
  $difference_amount = $min_value - $cart_sub_total;
68
  if($difference_amount > 0){
69
- $message = __($options->subtotal_promotion_message, WDR_TEXT_DOMAIN);
70
  $difference_amount = Woocommerce::formatPrice($difference_amount);
71
  $message = str_replace('{{difference_amount}}', $difference_amount, $message);
72
  Helper::setPromotionMessage($message, $this->rule->rule->id);
2
 
3
  namespace Wdr\App\Conditions;
4
 
5
+ use Wdr\App\Controllers\Configuration;
6
  use Wdr\App\Controllers\DiscountCalculator;
7
  use Wdr\App\Helpers\Helper;
8
  use Wdr\App\Helpers\Woocommerce;
15
  {
16
  parent::__construct();
17
  $this->name = 'cart_subtotal';
18
+ $this->label = __('Subtotal', 'woo-discount-rules');
19
+ $this->group = __('Cart', 'woo-discount-rules');
20
  $this->template = WDR_PLUGIN_PATH . 'App/Views/Admin/Rules/Conditions/Cart/Subtotal.php';
21
  }
22
 
49
  $value = self::$woocommerce_helper->getConvertedFixedPrice($options->value, 'subtotal_condition');
50
  $status = $this->doComparisionOperation($operator, $cart_sub_total, $value);
51
  if(!$status){
52
+ $config = new Configuration();
53
+ if($config->getConfig('show_subtotal_promotion', '') == 1){
54
+ $this->processPromotion($operator, $options, $cart_sub_total, $value);
55
+ }
56
  }
57
  return $status;
58
  }
70
  if($options->subtotal_promotion_from <= $cart_sub_total){
71
  $difference_amount = $min_value - $cart_sub_total;
72
  if($difference_amount > 0){
73
+ $message = __($options->subtotal_promotion_message, 'woo-discount-rules');
74
  $difference_amount = Woocommerce::formatPrice($difference_amount);
75
  $message = str_replace('{{difference_amount}}', $difference_amount, $message);
76
  Helper::setPromotionMessage($message, $this->rule->rule->id);
v2/App/Controllers/Admin/Settings.php CHANGED
@@ -37,8 +37,8 @@ class Settings extends Base
37
  if (isset($submenu['woocommerce'])) {
38
  add_submenu_page(
39
  'woocommerce',
40
- __('Woo Discount Rules', WDR_TEXT_DOMAIN),
41
- __('Woo Discount Rules', WDR_TEXT_DOMAIN),
42
  'manage_woocommerce', WDR_SLUG,
43
  array($this, 'adminTabs')
44
  );
@@ -51,7 +51,7 @@ class Settings extends Base
51
  function setupSurveyForm()
52
  {
53
  $survey = new SurveyForm();
54
- $survey->init('woo-discount-rules', 'Discount Rules for WooCommerce', WDR_TEXT_DOMAIN);
55
  }
56
 
57
  /**
@@ -62,7 +62,7 @@ class Settings extends Base
62
  function wdr_action_link($links)
63
  {
64
  $action_links = array(
65
- 'settings' => '<a href="' . admin_url('admin.php?page=woo_discount_rules&tab=settings') . '">' . __('Settings', WDR_TEXT_DOMAIN) . '</a>',
66
  );
67
  return array_merge($action_links, $links);
68
  }
@@ -160,7 +160,7 @@ class Settings extends Base
160
  function adminNotices()
161
  {
162
  if (defined('WOO_DISCOUNT_VERSION')) {
163
- echo '<div class="notice notice-warning is-dismissible"><p>' . __("We found that your were using our old \"Woo discount rules\" plugin, Please disable it!", WDR_TEXT_DOMAIN) . '</p></div>';
164
  }
165
  }
166
 
@@ -225,14 +225,15 @@ class Settings extends Base
225
  $conig = new Configuration();
226
  $wdr_data = array(
227
  'labels' => array(
228
- 'select2_no_results' => __('no results', WDR_TEXT_DOMAIN),
229
- 'placeholders' => __('Select Values', WDR_TEXT_DOMAIN),
230
- 'searching_text' => __('Searching…', WDR_TEXT_DOMAIN),
231
  ),
232
  'lists' => $preloaded_lists,
233
  'admin_url' => admin_url('admin.php?page=woo_discount_rules'),
234
  'localization_data' => $localization_data,
235
  'enable_subtotal_promo_text' => $conig->getConfig('show_subtotal_promotion', ''),
 
236
  'rule_id' => $this->input->get('task', 'create'),
237
  );
238
  wp_localize_script(WDR_SLUG . '-admin', 'wdr_data', $wdr_data);
@@ -311,7 +312,7 @@ class Settings extends Base
311
  }, array_keys($all_roles), $all_roles);
312
  $result[] = array(
313
  'id' => 'woo_discount_rules_guest',
314
- 'text' => esc_html__('Guest', WDR_TEXT_DOMAIN),
315
  );
316
  return array_values($result);
317
  }
@@ -419,42 +420,42 @@ class Settings extends Base
419
  protected function getLocalizationData()
420
  {
421
  return array(
422
- 'disable' => esc_html__('Disable', WDR_TEXT_DOMAIN),
423
- 'active' => esc_html__('Active', WDR_TEXT_DOMAIN),
424
- 'enable' => esc_html__('Enable', WDR_TEXT_DOMAIN),
425
- 'running' => esc_html__(' - (Running)', WDR_TEXT_DOMAIN),
426
- 'error' => esc_html__('Oops!! something went wrong!', WDR_TEXT_DOMAIN),
427
- 'duplicate_rule' => esc_html__('Rule duplicated successfully!', WDR_TEXT_DOMAIN),
428
- 'deleted_rule' => esc_html__('Rule deleted successfully!', WDR_TEXT_DOMAIN),
429
- 'delete_confirm' => esc_html__('Are you sure want to delete this rule!', WDR_TEXT_DOMAIN),
430
- 'disabled_rule' => esc_html__('Rule disabled successfully!', WDR_TEXT_DOMAIN),
431
- 'enabled_rule' => esc_html__('Rule enabled successfully!', WDR_TEXT_DOMAIN),
432
- 'save_rule' => esc_html__('Rule saved successfully!', WDR_TEXT_DOMAIN),
433
- 'save_settings' => esc_html__('Settings saved successfully!', WDR_TEXT_DOMAIN),
434
- 'save_priority' => esc_html__('Rule priority changed successfully!', WDR_TEXT_DOMAIN),
435
- 'priority_not_saved' => esc_html__('Rule priority not changed !', WDR_TEXT_DOMAIN),
436
- 'chart_data' => esc_html__('No data for this period', WDR_TEXT_DOMAIN),
437
- 'coupon_exists' => esc_html__('Oops! Coupon already exists in Woocommerce', WDR_TEXT_DOMAIN),
438
- 'copied' => esc_html__('Copied!', WDR_TEXT_DOMAIN),
439
- 'copy_shortcode' => esc_html__('Copy ShortCode', WDR_TEXT_DOMAIN),
440
- 'recursive_warning' => esc_html__('If you make this recursive other row(s) will be removed!', WDR_TEXT_DOMAIN),
441
- 'recursive_qty' => esc_html__('Quantity', WDR_TEXT_DOMAIN),
442
- 'recursive_min_qty' => esc_html__('Minimum Quantity', WDR_TEXT_DOMAIN),
443
- 'buyx_getx_value' => esc_html__('Discount value', WDR_TEXT_DOMAIN),
444
- 'buyx_getx_percentage' => esc_html__('Discount percentage', WDR_TEXT_DOMAIN),
445
- 'bogo_buyx_gety_filter_heading' => esc_html__('Filter (Buy)', WDR_TEXT_DOMAIN),
446
- 'common_filter_heading' => esc_html__('Filter', WDR_TEXT_DOMAIN),
447
  'common_filter_description' => __('<p>Choose <b>what gets discount</b> (products/categories/attributes/SKU and so on )</p>
448
- <p>Note : You can also exclude products/categories.</p>', WDR_TEXT_DOMAIN),
449
- 'common_discount_heading' => esc_html__('Discount', WDR_TEXT_DOMAIN),
450
- 'two_column_bulk_discount_heading' => __('Discount - <a href="https://docs.flycart.org/en/articles/3914904-bulk-discounts-tiered-pricing-discounts-discount-rules-2-0?utm_source=woo-discount-rules-v2&utm_campaign=doc&utm_medium=text-click&utm_content=bulk_documentation" style="font-size: 12px;" target="_blank">Read Docs</a>', WDR_TEXT_DOMAIN),
451
- 'two_column_set_discount_heading' => __('Discount - <a href="https://docs.flycart.org/en/articles/3809899-bundle-set-discount-discount-rules-2-0?utm_source=woo-discount-rules-v2&utm_campaign=doc&utm_medium=text-click&utm_content=bundle_set" style="font-size: 12px;" target="_blank">Read Docs</a>', WDR_TEXT_DOMAIN),
452
- 'two_column_bxgy_discount_heading' => __('Discount - <a href="https://docs.flycart.org/en/articles/3810570-buy-x-get-y-discount-rules-2-0?utm_source=woo-discount-rules-v2&utm_campaign=doc&utm_medium=text-click&utm_content=bxgy" style="font-size: 12px;" target="_blank">Read Docs</a>', WDR_TEXT_DOMAIN),
453
- 'two_column_bxgx_discount_heading' => __('Discount - <a href="https://docs.flycart.org/en/articles/3810071-buy-one-get-one-free-buy-x-get-x-discount-rules-2-0?utm_source=woo-discount-rules-v2&utm_campaign=doc&utm_medium=text-click&utm_content=bxgx" style="font-size: 12px;" target="_blank">Read Docs</a>', WDR_TEXT_DOMAIN),
454
- 'common_discount_description' => __('<p>Select discount type and its value (percentage/price/fixed price)</p>', WDR_TEXT_DOMAIN),
455
  'bulk_filter_together_discount_description' => __('<p>Select discount type and its value (percentage/price/fixed price)</p> <div class="awdr-count-by-description"><b>Filter set above :</b><p> This will count the quantities of products set in the “Filter” section.</p>
456
  <p><b>Example:</b> If you selected a few categories there, it will count the quantities of products in those categories added in cart. If you selected a few products in the filters section, then it will count the quantities together.</p>
457
- <p><b>Example:</b> Let’s say, you wanted to offer a Bulk Quantity discount for Category A and chosen Category A in the filters. So when a customer adds 1 quantity each of X, Y and Z from Category A, then the count here is 3.</p></div>', WDR_TEXT_DOMAIN),
458
 
459
  'bulk_filter_together_discount_description_tool_tip' => Helper::bogoToolTipDescriptionForFilterTogether(),
460
 
@@ -462,48 +463,48 @@ class Settings extends Base
462
  <p><b>Example:</b> If a customer wanted to buy 2 quantities of Product A, 3 quantities of Product B, then count will be maintained at the product level. </p>
463
  <span>2 - count of Product A</span></br>
464
  <span>3 - Count of Product B</span>
465
- <p>In case of variable products, the count will be based on each variant because WooCommerce considers a variant as a product itself. </p></div>', WDR_TEXT_DOMAIN),
466
  'bulk_individual_product_discount_description_tool_tip' => Helper::bogoToolTipDescriptionForIndividualProduct(),
467
  'bulk_variants_discount_description' => __('<p>Select discount type and its value (percentage/price/fixed price)</p><div class="awdr-count-by-description"><b>All variants in each product together :</b><p>Useful when applying discounts based on variable products and you want the quantity to be counted based on the parent product.</p>
468
  <p><b>Example:</b>
469
  Say, you have Product A - Small, Medium, Large.
470
  If a customer buys 2 of Product A - Small, 4 of Product A - Medium, 6 of Product A - Large, then the count will be: 6+4+2 = 12
471
- </p></div>', WDR_TEXT_DOMAIN),
472
  'bulk_variants_discount_description_tool_tip' => Helper::bogoToolTipDescriptionForvariants(),
473
- 'common_rules_heading' => esc_html__('Rules (optional)', WDR_TEXT_DOMAIN),
474
  'common_rules_description' => Helper::ruleConditionDescription(),
475
- 'bogo_buyx_gety_filter_description' => __('<p>Choose Buy Products. (products/categories/attributes/tags/sku) Example : For Buy X get Y scenarios, choose X here.</p>', WDR_TEXT_DOMAIN),
476
- 'bogo_buyx_getx_filter_description' => __('<p>Choose on which products the discount should be applied (This can be products/categories/SKU)</p>', WDR_TEXT_DOMAIN),
477
- 'bogo_buyx_getx_discount_heading' => esc_html__('Get Discount', WDR_TEXT_DOMAIN),
478
- 'bogo_buyx_getx_discount_content' => __('<p>Enter the min/max ranges and choose free item quantity.</p><p>Note : Enable recursive checkbox if the discounts should be applied in sequential ranges. </p><p>Example : Buy 1 get 1, Buy 2 get 2, Buy 3 get 3 and so on..</p>', WDR_TEXT_DOMAIN),
479
- 'bogo_buyx_gety_discount_heading' => esc_html__('Get Discount', WDR_TEXT_DOMAIN),
480
- 'bogo_buyx_gety_discount_content' => __('<p>Choose the adjustment type to which the discount should be applied. You can choose from products/categories/all products.</p><p>Note : Enable recursive checkbox if the discounts should be applied in sequential ranges. </p>', WDR_TEXT_DOMAIN),
481
- 'bogo_buyx_gety_discount_content_for_product' => __('<p>Discount will be applied <b>only the selected products (based on mode of apply)</b></p><p>Note : Enable recursive checkbox if the discounts should be applied in sequential ranges. </p>', WDR_TEXT_DOMAIN),
482
- 'bogo_buyx_gety_discount_content_for_category' => __('<p>Discount will be applied <b>only the selected categories (based on mode of apply)</b></p><p>Note : Enable recursive checkbox if the discounts should be applied in sequential ranges. </p><p>Example ranges:</p><p>Buy 2, get 1 free (a.k.a: Buy 1 get 1 free)</p><table><tbody><tr><td>Min quantity</td><td>Max quantity</td><td>Free quantity</td></tr><tr><td>2</td><td>3</td><td>1</td></tr></tr><tr><td>4</td><td>5</td><td>2</td></tr></tbody></table>', WDR_TEXT_DOMAIN),
483
- 'bogo_buyx_gety_discount_content_for_all' => __('<p>Discount applies on the cheapest/highest priced <b>product IN CART</b>.</p><p>Note : Enable recursive checkbox if the discounts should be applied in sequential ranges. </p><p>Example ranges:</p><p>Buy 2, get 1 free (a.k.a: Buy 1 get 1 free)</p><table><tbody><tr><td>Min quantity</td><td>Max quantity</td><td>Free quantity</td></tr><tr><td>2</td><td>3</td><td>1</td></tr></tr><tr><td>4</td><td>5</td><td>2</td></tr></tbody></table>', WDR_TEXT_DOMAIN),
484
  /*'bogo_buyx_getx_rules_description' => Helper::ruleConditionDescription(),
485
  'bogo_buyx_gety_rules_description' => Helper::ruleConditionDescription(),*/
486
- 'processing_migration_text' => __('<p>Processing migration, please wait...</p>', WDR_TEXT_DOMAIN),
487
- 'processing_migration_success_message' => __('<p>Migration completed.</p>', WDR_TEXT_DOMAIN),
488
- 'skip_migration_success_message' => __('<p>Migration skipped.</p>', WDR_TEXT_DOMAIN),
489
- 'skip_migration_text' => __('<p>Skipping migration, please wait...</p>', WDR_TEXT_DOMAIN),
490
- 'mode_variation_cumulative_example' => __('<span><b>Example:</b> Product A - Small and Product A - Medium will be counted as 2 quantity</span>', WDR_TEXT_DOMAIN),
491
- 'filter_all_products' => __('<span>Discount applies to all eligible products in the store</span>', WDR_TEXT_DOMAIN),
492
- 'filter_products' => __('<span>Choose products that get the discount using "In List". If you want to exclude a few products, choose "Not In List" and select the products you wanted to exclude from discount. (You can add multiple filters)</span>', WDR_TEXT_DOMAIN),
493
- 'filter_Category' => __('<span>Choose categories that get the discount using "In List". If you want to exclude a few categories, choose "Not In List" and select the categories you wanted to exclude from discount. (You can add multiple filters of same type)</span>', WDR_TEXT_DOMAIN),
494
- 'filter_Attributes' => __('<span> Choose attributes that get the discount using "In List". If you want to exclude a few attributes, choose "Not In List" and select the attributes you wanted to exclude from discount. (You can add multiple filters of same type)</span>', WDR_TEXT_DOMAIN),
495
- 'filter_Tags' => __('<span>Choose tags that get the discount using "In List". If you want to exclude a few tags, choose "Not In List" and select the tags you wanted to exclude from discount. (You can add multiple filters of same type)</span>', WDR_TEXT_DOMAIN),
496
- 'filter_SKUs' => __('<span>Choose SKUs that get the discount using "In List". If you want to exclude a few SKUs, choose "Not In List" and select the SKUs you wanted to exclude from discount. (You can add multiple filters of same type)</span>', WDR_TEXT_DOMAIN),
497
- 'filter_On_sale_products' => __('<span>Choose whether you want to include (or exclude) products on sale (those having a sale price) for the discount </span>', WDR_TEXT_DOMAIN),
498
- 'filter_custom_taxonomies' => __('<span>Discount applies to custom taxonomy</span>', WDR_TEXT_DOMAIN),
499
- 'rebuild_on_sale_list_processing_text' => __('Processing please wait..', WDR_TEXT_DOMAIN),
500
- 'rebuild_on_sale_list_processed_text' => __('Rebuild index processed', WDR_TEXT_DOMAIN),
501
- 'rebuild_on_sale_list_error_please_select_rule' => __('Please select the rules to build index', WDR_TEXT_DOMAIN),
502
- 'invalid_file_type' => __("Invalid File. Upload : <b style='color:red;'>.csv</b> File. </br>", WDR_TEXT_DOMAIN),
503
- 'invalid_rule_limit' => __("<b>This rule is not running currently:</b> Rule reached maximum usage limit", WDR_TEXT_DOMAIN),
504
- 'invalid_rule_limit_with_date_future' => __("<b>This rule is not running currently:</b> Start date and time is set in the future date", WDR_TEXT_DOMAIN),
505
- 'invalid_rule_limit_with_date_expire' => __("<b>This rule is not running currently:</b> Validity expired", WDR_TEXT_DOMAIN),
506
- 'select_state' => __("Select State", WDR_TEXT_DOMAIN),
507
  );
508
  }
509
  }
37
  if (isset($submenu['woocommerce'])) {
38
  add_submenu_page(
39
  'woocommerce',
40
+ __('Woo Discount Rules', 'woo-discount-rules'),
41
+ __('Woo Discount Rules', 'woo-discount-rules'),
42
  'manage_woocommerce', WDR_SLUG,
43
  array($this, 'adminTabs')
44
  );
51
  function setupSurveyForm()
52
  {
53
  $survey = new SurveyForm();
54
+ $survey->init('woo-discount-rules', 'Discount Rules for WooCommerce', 'woo-discount-rules');
55
  }
56
 
57
  /**
62
  function wdr_action_link($links)
63
  {
64
  $action_links = array(
65
+ 'settings' => '<a href="' . admin_url('admin.php?page=woo_discount_rules&tab=settings') . '">' . __('Settings', 'woo-discount-rules') . '</a>',
66
  );
67
  return array_merge($action_links, $links);
68
  }
160
  function adminNotices()
161
  {
162
  if (defined('WOO_DISCOUNT_VERSION')) {
163
+ echo '<div class="notice notice-warning is-dismissible"><p>' . __("We found that your were using our old \"Woo discount rules\" plugin, Please disable it!", 'woo-discount-rules') . '</p></div>';
164
  }
165
  }
166
 
225
  $conig = new Configuration();
226
  $wdr_data = array(
227
  'labels' => array(
228
+ 'select2_no_results' => __('no results', 'woo-discount-rules'),
229
+ 'placeholders' => __('Select Values', 'woo-discount-rules'),
230
+ 'searching_text' => __('Searching…', 'woo-discount-rules'),
231
  ),
232
  'lists' => $preloaded_lists,
233
  'admin_url' => admin_url('admin.php?page=woo_discount_rules'),
234
  'localization_data' => $localization_data,
235
  'enable_subtotal_promo_text' => $conig->getConfig('show_subtotal_promotion', ''),
236
+ 'enable_cart_quantity_promo_text' => $conig->getConfig('show_cart_quantity_promotion', ''),
237
  'rule_id' => $this->input->get('task', 'create'),
238
  );
239
  wp_localize_script(WDR_SLUG . '-admin', 'wdr_data', $wdr_data);
312
  }, array_keys($all_roles), $all_roles);
313
  $result[] = array(
314
  'id' => 'woo_discount_rules_guest',
315
+ 'text' => esc_html__('Guest', 'woo-discount-rules'),
316
  );
317
  return array_values($result);
318
  }
420
  protected function getLocalizationData()
421
  {
422
  return array(
423
+ 'disable' => esc_html__('Disable', 'woo-discount-rules'),
424
+ 'active' => esc_html__('Active', 'woo-discount-rules'),
425
+ 'enable' => esc_html__('Enable', 'woo-discount-rules'),
426
+ 'running' => esc_html__(' - (Running)', 'woo-discount-rules'),
427
+ 'error' => esc_html__('Oops!! something went wrong!', 'woo-discount-rules'),
428
+ 'duplicate_rule' => esc_html__('Rule duplicated successfully!', 'woo-discount-rules'),
429
+ 'deleted_rule' => esc_html__('Rule deleted successfully!', 'woo-discount-rules'),
430
+ 'delete_confirm' => esc_html__('Are you sure want to delete this rule!', 'woo-discount-rules'),
431
+ 'disabled_rule' => esc_html__('Rule disabled successfully!', 'woo-discount-rules'),
432
+ 'enabled_rule' => esc_html__('Rule enabled successfully!', 'woo-discount-rules'),
433
+ 'save_rule' => esc_html__('Rule saved successfully!', 'woo-discount-rules'),
434
+ 'save_settings' => esc_html__('Settings saved successfully!', 'woo-discount-rules'),
435
+ 'save_priority' => esc_html__('Rule priority changed successfully!', 'woo-discount-rules'),
436
+ 'priority_not_saved' => esc_html__('Rule priority not changed !', 'woo-discount-rules'),
437
+ 'chart_data' => esc_html__('No data for this period', 'woo-discount-rules'),
438
+ 'coupon_exists' => esc_html__('Oops! Coupon already exists in Woocommerce', 'woo-discount-rules'),
439
+ 'copied' => esc_html__('Copied!', 'woo-discount-rules'),
440
+ 'copy_shortcode' => esc_html__('Copy ShortCode', 'woo-discount-rules'),
441
+ 'recursive_warning' => esc_html__('If you make this recursive other row(s) will be removed!', 'woo-discount-rules'),
442
+ 'recursive_qty' => esc_html__('Quantity', 'woo-discount-rules'),
443
+ 'recursive_min_qty' => esc_html__('Minimum Quantity', 'woo-discount-rules'),
444
+ 'buyx_getx_value' => esc_html__('Discount value', 'woo-discount-rules'),
445
+ 'buyx_getx_percentage' => esc_html__('Discount percentage', 'woo-discount-rules'),
446
+ 'bogo_buyx_gety_filter_heading' => esc_html__('Filter (Buy)', 'woo-discount-rules'),
447
+ 'common_filter_heading' => esc_html__('Filter', 'woo-discount-rules'),
448
  'common_filter_description' => __('<p>Choose <b>what gets discount</b> (products/categories/attributes/SKU and so on )</p>
449
+ <p>Note : You can also exclude products/categories.</p>', 'woo-discount-rules'),
450
+ 'common_discount_heading' => esc_html__('Discount', 'woo-discount-rules'),
451
+ 'two_column_bulk_discount_heading' => __('Discount - <a href="https://docs.flycart.org/en/articles/3914904-bulk-discounts-tiered-pricing-discounts-discount-rules-2-0?utm_source=woo-discount-rules-v2&utm_campaign=doc&utm_medium=text-click&utm_content=bulk_documentation" style="font-size: 12px;" target="_blank">Read Docs</a>', 'woo-discount-rules'),
452
+ 'two_column_set_discount_heading' => __('Discount - <a href="https://docs.flycart.org/en/articles/3809899-bundle-set-discount-discount-rules-2-0?utm_source=woo-discount-rules-v2&utm_campaign=doc&utm_medium=text-click&utm_content=bundle_set" style="font-size: 12px;" target="_blank">Read Docs</a>', 'woo-discount-rules'),
453
+ 'two_column_bxgy_discount_heading' => __('Discount - <a href="https://docs.flycart.org/en/articles/3810570-buy-x-get-y-discount-rules-2-0?utm_source=woo-discount-rules-v2&utm_campaign=doc&utm_medium=text-click&utm_content=bxgy" style="font-size: 12px;" target="_blank">Read Docs</a>', 'woo-discount-rules'),
454
+ 'two_column_bxgx_discount_heading' => __('Discount - <a href="https://docs.flycart.org/en/articles/3810071-buy-one-get-one-free-buy-x-get-x-discount-rules-2-0?utm_source=woo-discount-rules-v2&utm_campaign=doc&utm_medium=text-click&utm_content=bxgx" style="font-size: 12px;" target="_blank">Read Docs</a>', 'woo-discount-rules'),
455
+ 'common_discount_description' => __('<p>Select discount type and its value (percentage/price/fixed price)</p>', 'woo-discount-rules'),
456
  'bulk_filter_together_discount_description' => __('<p>Select discount type and its value (percentage/price/fixed price)</p> <div class="awdr-count-by-description"><b>Filter set above :</b><p> This will count the quantities of products set in the “Filter” section.</p>
457
  <p><b>Example:</b> If you selected a few categories there, it will count the quantities of products in those categories added in cart. If you selected a few products in the filters section, then it will count the quantities together.</p>
458
+ <p><b>Example:</b> Let’s say, you wanted to offer a Bulk Quantity discount for Category A and chosen Category A in the filters. So when a customer adds 1 quantity each of X, Y and Z from Category A, then the count here is 3.</p></div>', 'woo-discount-rules'),
459
 
460
  'bulk_filter_together_discount_description_tool_tip' => Helper::bogoToolTipDescriptionForFilterTogether(),
461
 
463
  <p><b>Example:</b> If a customer wanted to buy 2 quantities of Product A, 3 quantities of Product B, then count will be maintained at the product level. </p>
464
  <span>2 - count of Product A</span></br>
465
  <span>3 - Count of Product B</span>
466
+ <p>In case of variable products, the count will be based on each variant because WooCommerce considers a variant as a product itself. </p></div>', 'woo-discount-rules'),
467
  'bulk_individual_product_discount_description_tool_tip' => Helper::bogoToolTipDescriptionForIndividualProduct(),
468
  'bulk_variants_discount_description' => __('<p>Select discount type and its value (percentage/price/fixed price)</p><div class="awdr-count-by-description"><b>All variants in each product together :</b><p>Useful when applying discounts based on variable products and you want the quantity to be counted based on the parent product.</p>
469
  <p><b>Example:</b>
470
  Say, you have Product A - Small, Medium, Large.
471
  If a customer buys 2 of Product A - Small, 4 of Product A - Medium, 6 of Product A - Large, then the count will be: 6+4+2 = 12
472
+ </p></div>', 'woo-discount-rules'),
473
  'bulk_variants_discount_description_tool_tip' => Helper::bogoToolTipDescriptionForvariants(),
474
+ 'common_rules_heading' => esc_html__('Rules (optional)', 'woo-discount-rules'),
475
  'common_rules_description' => Helper::ruleConditionDescription(),
476
+ 'bogo_buyx_gety_filter_description' => __('<p>Choose Buy Products. (products/categories/attributes/tags/sku) Example : For Buy X get Y scenarios, choose X here.</p>', 'woo-discount-rules'),
477
+ 'bogo_buyx_getx_filter_description' => __('<p>Choose on which products the discount should be applied (This can be products/categories/SKU)</p>', 'woo-discount-rules'),
478
+ 'bogo_buyx_getx_discount_heading' => esc_html__('Get Discount', 'woo-discount-rules'),
479
+ 'bogo_buyx_getx_discount_content' => __('<p>Enter the min/max ranges and choose free item quantity.</p><p>Note : Enable recursive checkbox if the discounts should be applied in sequential ranges. </p><p>Example : Buy 1 get 1, Buy 2 get 2, Buy 3 get 3 and so on..</p>', 'woo-discount-rules'),
480
+ 'bogo_buyx_gety_discount_heading' => esc_html__('Get Discount', 'woo-discount-rules'),
481
+ 'bogo_buyx_gety_discount_content' => __('<p>Choose the adjustment type to which the discount should be applied. You can choose from products/categories/all products.</p><p>Note : Enable recursive checkbox if the discounts should be applied in sequential ranges. </p>', 'woo-discount-rules'),
482
+ 'bogo_buyx_gety_discount_content_for_product' => __('<p>Discount will be applied <b>only the selected products (based on mode of apply)</b></p><p>Note : Enable recursive checkbox if the discounts should be applied in sequential ranges. </p>', 'woo-discount-rules'),
483
+ 'bogo_buyx_gety_discount_content_for_category' => __('<p>Discount will be applied <b>only the selected categories (based on mode of apply)</b></p><p>Note : Enable recursive checkbox if the discounts should be applied in sequential ranges. </p><p>Example ranges:</p><p>Buy 2, get 1 free (a.k.a: Buy 1 get 1 free)</p><table><tbody><tr><td>Min quantity</td><td>Max quantity</td><td>Free quantity</td></tr><tr><td>2</td><td>3</td><td>1</td></tr></tr><tr><td>4</td><td>5</td><td>2</td></tr></tbody></table>', 'woo-discount-rules'),
484
+ 'bogo_buyx_gety_discount_content_for_all' => __('<p>Discount applies on the cheapest/highest priced <b>product IN CART</b>.</p><p>Note : Enable recursive checkbox if the discounts should be applied in sequential ranges. </p><p>Example ranges:</p><p>Buy 2, get 1 free (a.k.a: Buy 1 get 1 free)</p><table><tbody><tr><td>Min quantity</td><td>Max quantity</td><td>Free quantity</td></tr><tr><td>2</td><td>3</td><td>1</td></tr></tr><tr><td>4</td><td>5</td><td>2</td></tr></tbody></table>', 'woo-discount-rules'),
485
  /*'bogo_buyx_getx_rules_description' => Helper::ruleConditionDescription(),
486
  'bogo_buyx_gety_rules_description' => Helper::ruleConditionDescription(),*/
487
+ 'processing_migration_text' => __('<p>Processing migration, please wait...</p>', 'woo-discount-rules'),
488
+ 'processing_migration_success_message' => __('<p>Migration completed.</p>', 'woo-discount-rules'),
489
+ 'skip_migration_success_message' => __('<p>Migration skipped.</p>', 'woo-discount-rules'),
490
+ 'skip_migration_text' => __('<p>Skipping migration, please wait...</p>', 'woo-discount-rules'),
491
+ 'mode_variation_cumulative_example' => __('<span><b>Example:</b> Product A - Small and Product A - Medium will be counted as 2 quantity</span>', 'woo-discount-rules'),
492
+ 'filter_all_products' => __('<span>Discount applies to all eligible products in the store</span>', 'woo-discount-rules'),
493
+ 'filter_products' => __('<span>Choose products that get the discount using "In List". If you want to exclude a few products, choose "Not In List" and select the products you wanted to exclude from discount. (You can add multiple filters)</span>', 'woo-discount-rules'),
494
+ 'filter_Category' => __('<span>Choose categories that get the discount using "In List". If you want to exclude a few categories, choose "Not In List" and select the categories you wanted to exclude from discount. (You can add multiple filters of same type)</span>', 'woo-discount-rules'),
495
+ 'filter_Attributes' => __('<span> Choose attributes that get the discount using "In List". If you want to exclude a few attributes, choose "Not In List" and select the attributes you wanted to exclude from discount. (You can add multiple filters of same type)</span>', 'woo-discount-rules'),
496
+ 'filter_Tags' => __('<span>Choose tags that get the discount using "In List". If you want to exclude a few tags, choose "Not In List" and select the tags you wanted to exclude from discount. (You can add multiple filters of same type)</span>', 'woo-discount-rules'),
497
+ 'filter_SKUs' => __('<span>Choose SKUs that get the discount using "In List". If you want to exclude a few SKUs, choose "Not In List" and select the SKUs you wanted to exclude from discount. (You can add multiple filters of same type)</span>', 'woo-discount-rules'),
498
+ 'filter_On_sale_products' => __('<span>Choose whether you want to include (or exclude) products on sale (those having a sale price) for the discount </span>', 'woo-discount-rules'),
499
+ 'filter_custom_taxonomies' => __('<span>Discount applies to custom taxonomy</span>', 'woo-discount-rules'),
500
+ 'rebuild_on_sale_list_processing_text' => __('Processing please wait..', 'woo-discount-rules'),
501
+ 'rebuild_on_sale_list_processed_text' => __('Rebuild index processed', 'woo-discount-rules'),
502
+ 'rebuild_on_sale_list_error_please_select_rule' => __('Please select the rules to build index', 'woo-discount-rules'),
503
+ 'invalid_file_type' => __("Invalid File. Upload : <b style='color:red;'>.csv</b> File. </br>", 'woo-discount-rules'),
504
+ 'invalid_rule_limit' => __("<b>This rule is not running currently:</b> Rule reached maximum usage limit", 'woo-discount-rules'),
505
+ 'invalid_rule_limit_with_date_future' => __("<b>This rule is not running currently:</b> Start date and time is set in the future date", 'woo-discount-rules'),
506
+ 'invalid_rule_limit_with_date_expire' => __("<b>This rule is not running currently:</b> Validity expired", 'woo-discount-rules'),
507
+ 'select_state' => __("Select State", 'woo-discount-rules'),
508
  );
509
  }
510
  }
v2/App/Controllers/Admin/Tabs/Compatible.php CHANGED
@@ -20,7 +20,7 @@ class Compatible extends Base
20
  public function __construct()
21
  {
22
  parent::__construct();
23
- $this->title = __('Compatibility', WDR_TEXT_DOMAIN);
24
  }
25
 
26
  /**
20
  public function __construct()
21
  {
22
  parent::__construct();
23
+ $this->title = __('Compatibility', 'woo-discount-rules');
24
  }
25
 
26
  /**
v2/App/Controllers/Admin/Tabs/DiscountRules.php CHANGED
@@ -19,7 +19,7 @@ class DiscountRules extends Base
19
  function __construct()
20
  {
21
  parent::__construct();
22
- $this->title = __('Discount Rules', WDR_TEXT_DOMAIN);
23
  }
24
 
25
  /**
19
  function __construct()
20
  {
21
  parent::__construct();
22
+ $this->title = __('Discount Rules', 'woo-discount-rules');
23
  }
24
 
25
  /**
v2/App/Controllers/Admin/Tabs/GeneralSettings.php CHANGED
@@ -20,7 +20,7 @@ class GeneralSettings extends Base
20
  public function __construct()
21
  {
22
  parent::__construct();
23
- $this->title = __('Settings', WDR_TEXT_DOMAIN);
24
  }
25
 
26
  /**
20
  public function __construct()
21
  {
22
  parent::__construct();
23
+ $this->title = __('Settings', 'woo-discount-rules');
24
  }
25
 
26
  /**
v2/App/Controllers/Admin/Tabs/Help.php CHANGED
@@ -14,7 +14,7 @@ class Help extends Base
14
  public function __construct()
15
  {
16
  parent::__construct();
17
- $this->title = __('Read Documentation', WDR_TEXT_DOMAIN);
18
  }
19
 
20
  /**
14
  public function __construct()
15
  {
16
  parent::__construct();
17
+ $this->title = __('Read Documentation', 'woo-discount-rules');
18
  }
19
 
20
  /**
v2/App/Controllers/Admin/Tabs/ImportExport.php CHANGED
@@ -16,7 +16,7 @@ class ImportExport extends Base
16
  public function __construct()
17
  {
18
  parent::__construct();
19
- $this->title = __('Import/Export', WDR_TEXT_DOMAIN);
20
  }
21
 
22
  /**
16
  public function __construct()
17
  {
18
  parent::__construct();
19
+ $this->title = __('Import/Export', 'woo-discount-rules');
20
  }
21
 
22
  /**
v2/App/Controllers/Admin/Tabs/Reports/RuleAmount.php CHANGED
@@ -11,7 +11,7 @@ if ( ! defined( 'ABSPATH' ) ) {
11
  class RuleAmount extends Base {
12
 
13
  public function get_subtitle() {
14
- return __( 'Amount shown in default store currency', WDR_TEXT_DOMAIN );
15
  }
16
 
17
  public function get_type() {
@@ -25,7 +25,7 @@ class RuleAmount extends Base {
25
  $rule_amount_stats = $this->load_raw_data( $params );
26
 
27
  $rules = array_unique( array_column( $rule_amount_stats, 'title' ) );
28
- $columns = array_merge( array( __( 'Date', WDR_TEXT_DOMAIN ) ), $rules );
29
 
30
  $rows = array();
31
  $dates = $this->get_dates( $params['from'], $params['to'] );
11
  class RuleAmount extends Base {
12
 
13
  public function get_subtitle() {
14
+ return __( 'Amount shown in default store currency', 'woo-discount-rules' );
15
  }
16
 
17
  public function get_type() {
25
  $rule_amount_stats = $this->load_raw_data( $params );
26
 
27
  $rules = array_unique( array_column( $rule_amount_stats, 'title' ) );
28
+ $columns = array_merge( array( __( 'Date', 'woo-discount-rules' ) ), $rules );
29
 
30
  $rows = array();
31
  $dates = $this->get_dates( $params['from'], $params['to'] );
v2/App/Controllers/Admin/Tabs/Reports/RuleAmountWithCartDiscount.php CHANGED
@@ -8,7 +8,7 @@ if ( ! defined( 'ABSPATH' ) ) {
8
  class RuleAmountWithCartDiscount extends RuleAmount {
9
 
10
  public function get_subtitle() {
11
- return __( 'Amount shown in default store currency', WDR_TEXT_DOMAIN );
12
  }
13
 
14
  protected function prepare_params( $params ) {
8
  class RuleAmountWithCartDiscount extends RuleAmount {
9
 
10
  public function get_subtitle() {
11
+ return __( 'Amount shown in default store currency', 'woo-discount-rules' );
12
  }
13
 
14
  protected function prepare_params( $params ) {
v2/App/Controllers/Admin/Tabs/Reports/RuleNameDiscount.php CHANGED
@@ -21,7 +21,7 @@ class RuleNameDiscount extends Base {
21
  }
22
 
23
  public function get_subtitle() {
24
- return __( 'Amount shown in default store currency', WDR_TEXT_DOMAIN );
25
  }
26
 
27
  public function get_type() {
@@ -36,7 +36,7 @@ class RuleNameDiscount extends Base {
36
  $rule_amount_stats = $this->load_raw_data( $params, $rule_id);
37
 
38
  $rules = array_unique( array_column( $rule_amount_stats, 'title' ) );
39
- $columns = array_merge( array( __( 'Date', WDR_TEXT_DOMAIN ) ), $rules );
40
 
41
  $rows = array();
42
  $dates = $this->get_dates( $params['from'], $params['to'] );
21
  }
22
 
23
  public function get_subtitle() {
24
+ return __( 'Amount shown in default store currency', 'woo-discount-rules' );
25
  }
26
 
27
  public function get_type() {
36
  $rule_amount_stats = $this->load_raw_data( $params, $rule_id);
37
 
38
  $rules = array_unique( array_column( $rule_amount_stats, 'title' ) );
39
+ $columns = array_merge( array( __( 'Date', 'woo-discount-rules' ) ), $rules );
40
 
41
  $rows = array();
42
  $dates = $this->get_dates( $params['from'], $params['to'] );
v2/App/Controllers/Admin/Tabs/Statistics.php CHANGED
@@ -24,7 +24,7 @@ class Statistics extends Base
24
  public function __construct()
25
  {
26
  parent::__construct();
27
- $this->title = __('Reports', WDR_TEXT_DOMAIN);
28
  $rule_helper = new Rule();
29
  $available_conditions = $this->getAvailableConditions();
30
  $rules = $rule_helper->getAllRules($available_conditions);
@@ -33,22 +33,22 @@ class Statistics extends Base
33
  $rule_title = $rule->getTitle();
34
  $this->rule_details[$rule_id] = array(
35
  'handler' => new Reports\RuleNameDiscount($rule),
36
- 'label' => __( $rule_title , WDR_TEXT_DOMAIN ),
37
- 'group' => __( 'Rule Name', WDR_TEXT_DOMAIN ),
38
  'rule_id' => $rule_id,
39
  );
40
  }
41
  $this->reports = array(
42
  'rule_amount_extra' => array(
43
  'handler' => new Reports\RuleAmountWithCartDiscount(),
44
- 'label' => __( 'All Rules', WDR_TEXT_DOMAIN ),
45
- 'group' => __( 'Rule', WDR_TEXT_DOMAIN ),
46
  'rule_id' => 0,
47
  ),
48
  'rule_amount' => array(
49
  'handler' => new Reports\RuleAmount(),
50
- 'label' => __( 'All Rules (except cart adjustment type)', WDR_TEXT_DOMAIN ),
51
- 'group' => __( 'Rule', WDR_TEXT_DOMAIN ),
52
  'rule_id' => 0,
53
  ),
54
  );
@@ -115,7 +115,7 @@ class Statistics extends Base
115
  }
116
  }
117
  } else {
118
- die(__('Authentication required', WDR_TEXT_DOMAIN));
119
  }
120
  }
121
 
24
  public function __construct()
25
  {
26
  parent::__construct();
27
+ $this->title = __('Reports', 'woo-discount-rules');
28
  $rule_helper = new Rule();
29
  $available_conditions = $this->getAvailableConditions();
30
  $rules = $rule_helper->getAllRules($available_conditions);
33
  $rule_title = $rule->getTitle();
34
  $this->rule_details[$rule_id] = array(
35
  'handler' => new Reports\RuleNameDiscount($rule),
36
+ 'label' => __( $rule_title , 'woo-discount-rules' ),
37
+ 'group' => __( 'Rule Name', 'woo-discount-rules' ),
38
  'rule_id' => $rule_id,
39
  );
40
  }
41
  $this->reports = array(
42
  'rule_amount_extra' => array(
43
  'handler' => new Reports\RuleAmountWithCartDiscount(),
44
+ 'label' => __( 'All Rules', 'woo-discount-rules' ),
45
+ 'group' => __( 'Rule', 'woo-discount-rules' ),
46
  'rule_id' => 0,
47
  ),
48
  'rule_amount' => array(
49
  'handler' => new Reports\RuleAmount(),
50
+ 'label' => __( 'All Rules (except cart adjustment type)', 'woo-discount-rules' ),
51
+ 'group' => __( 'Rule', 'woo-discount-rules' ),
52
  'rule_id' => 0,
53
  ),
54
  );
115
  }
116
  }
117
  } else {
118
+ die(__('Authentication required', 'woo-discount-rules'));
119
  }
120
  }
121
 
v2/App/Controllers/Admin/WDRAjax.php CHANGED
@@ -52,10 +52,10 @@ class WDRAjax extends Base
52
  if (method_exists($this, $method_name)) {
53
  $result = $this->$method_name();
54
  }else{
55
- $result = __('Authentication required', WDR_TEXT_DOMAIN);
56
  }
57
  } else {
58
- $result = __('Authentication required', WDR_TEXT_DOMAIN);
59
  }
60
  wp_send_json_success($result);
61
  }
52
  if (method_exists($this, $method_name)) {
53
  $result = $this->$method_name();
54
  }else{
55
+ $result = __('Authentication required', 'woo-discount-rules');
56
  }
57
  } else {
58
+ $result = __('Authentication required', 'woo-discount-rules');
59
  }
60
  wp_send_json_success($result);
61
  }
v2/App/Controllers/Base.php CHANGED
@@ -39,13 +39,13 @@ class Base
39
  function filtersTypes()
40
  {
41
  $this->filter_types['all_products'] = array(
42
- 'label' => __('All Products', WDR_TEXT_DOMAIN),
43
- 'group' => __('Product', WDR_TEXT_DOMAIN),
44
  'template' => WDR_PLUGIN_PATH . 'App/Views/Admin/Rules/Filters/AllProducts.php',
45
  );
46
  $this->filter_types['products'] = array(
47
- 'label' => __('Products', WDR_TEXT_DOMAIN),
48
- 'group' => __('Product', WDR_TEXT_DOMAIN),
49
  'template' => WDR_PLUGIN_PATH . 'App/Views/Admin/Rules/Filters/Products.php',
50
  );
51
 
@@ -191,20 +191,20 @@ class Base
191
  {
192
  $this->discount_types['wdr_simple_discount'] = array(
193
  'class' => '',
194
- 'label' => __('Product Adjustment', WDR_TEXT_DOMAIN),
195
- 'group' => __('Simple Discount', WDR_TEXT_DOMAIN),
196
  'template' => WDR_PLUGIN_PATH . 'App/Views/Admin/Rules/Discounts/simple.php',
197
  );
198
  $this->discount_types['wdr_cart_discount'] = array(
199
  'class' => '',
200
- 'label' => __('Cart Adjustment', WDR_TEXT_DOMAIN),
201
- 'group' => __('Simple Discount', WDR_TEXT_DOMAIN),
202
  'template' => WDR_PLUGIN_PATH . 'App/Views/Admin/Rules/Discounts/Cart.php',
203
  );
204
  $this->discount_types['wdr_bulk_discount'] = array(
205
  'class' => '',
206
- 'label' => __('Bulk Discount', WDR_TEXT_DOMAIN),
207
- 'group' => __('Bulk Discount', WDR_TEXT_DOMAIN),
208
  'template' => WDR_PLUGIN_PATH . 'App/Views/Admin/Rules/Discounts/Bulk.php',
209
  );
210
 
39
  function filtersTypes()
40
  {
41
  $this->filter_types['all_products'] = array(
42
+ 'label' => __('All Products', 'woo-discount-rules'),
43
+ 'group' => __('Product', 'woo-discount-rules'),
44
  'template' => WDR_PLUGIN_PATH . 'App/Views/Admin/Rules/Filters/AllProducts.php',
45
  );
46
  $this->filter_types['products'] = array(
47
+ 'label' => __('Products', 'woo-discount-rules'),
48
+ 'group' => __('Product', 'woo-discount-rules'),
49
  'template' => WDR_PLUGIN_PATH . 'App/Views/Admin/Rules/Filters/Products.php',
50
  );
51
 
191
  {
192
  $this->discount_types['wdr_simple_discount'] = array(
193
  'class' => '',
194
+ 'label' => __('Product Adjustment', 'woo-discount-rules'),
195
+ 'group' => __('Simple Discount', 'woo-discount-rules'),
196
  'template' => WDR_PLUGIN_PATH . 'App/Views/Admin/Rules/Discounts/simple.php',
197
  );
198
  $this->discount_types['wdr_cart_discount'] = array(
199
  'class' => '',
200
+ 'label' => __('Cart Adjustment', 'woo-discount-rules'),
201
+ 'group' => __('Simple Discount', 'woo-discount-rules'),
202
  'template' => WDR_PLUGIN_PATH . 'App/Views/Admin/Rules/Discounts/Cart.php',
203
  );
204
  $this->discount_types['wdr_bulk_discount'] = array(
205
  'class' => '',
206
+ 'label' => __('Bulk Discount', 'woo-discount-rules'),
207
+ 'group' => __('Bulk Discount', 'woo-discount-rules'),
208
  'template' => WDR_PLUGIN_PATH . 'App/Views/Admin/Rules/Discounts/Bulk.php',
209
  );
210
 
v2/App/Controllers/Configuration.php CHANGED
@@ -62,6 +62,9 @@ class Configuration
62
  'force_override_on_sale_badge' => '',
63
  'on_sale_badge_html' => '<span class="onsale">Sale!</span>',
64
  'licence_key' => '',
 
 
 
65
  );
66
 
67
  /**
62
  'force_override_on_sale_badge' => '',
63
  'on_sale_badge_html' => '<span class="onsale">Sale!</span>',
64
  'licence_key' => '',
65
+ 'show_subtotal_promotion' => 0,
66
+ 'show_cart_quantity_promotion' => 0,
67
+ 'show_promo_text' => '',
68
  );
69
 
70
  /**
v2/App/Controllers/DiscountCalculator.php CHANGED
@@ -186,7 +186,7 @@ class DiscountCalculator extends Base
186
  'discount_value' => $discount_value,
187
  'discount_price' => $discount_price,
188
  'discounted_price' => $discounted_price,
189
- 'rule_title' => __($rule_title, WDR_TEXT_DOMAIN)
190
  );
191
  }
192
 
@@ -535,6 +535,11 @@ class DiscountCalculator extends Base
535
  $product_price = self::$woocommerce_helper->getProductRegularPrice($product);
536
  } else {
537
  $product_price = self::$woocommerce_helper->getProductPrice($product);
 
 
 
 
 
538
  }
539
  } else {
540
  $product_price = $custom_price;
186
  'discount_value' => $discount_value,
187
  'discount_price' => $discount_price,
188
  'discounted_price' => $discounted_price,
189
+ 'rule_title' => __($rule_title, 'woo-discount-rules')
190
  );
191
  }
192
 
535
  $product_price = self::$woocommerce_helper->getProductRegularPrice($product);
536
  } else {
537
  $product_price = self::$woocommerce_helper->getProductPrice($product);
538
+ if($product_price <= 0){
539
+ if(isset($product->awdr_product_original_price) && !empty($product->awdr_product_original_price)){
540
+ $product_price = $product->awdr_product_original_price;
541
+ }
542
+ }
543
  }
544
  } else {
545
  $product_price = $custom_price;
v2/App/Controllers/ManageDiscount.php CHANGED
@@ -132,7 +132,7 @@ class ManageDiscount extends Base
132
  $on_sale_badge_html = self::$config->getConfig('on_sale_badge_html', '<span class="onsale">Sale!</span>');
133
  $translate = __('<span class="onsale">Sale!</span>', 'woo-discount-rules');
134
  $on_sale_badge_html = Helper::getCleanHtml($on_sale_badge_html);
135
- $html = __($on_sale_badge_html, WDR_TEXT_DOMAIN);
136
  $html = apply_filters('advanced_woo_discount_rules_on_sale_badge_html', $html, $post, $_product);
137
  }
138
 
@@ -462,18 +462,18 @@ class ManageDiscount extends Base
462
  if(!empty($max_price)){
463
  $max_price = $calculator->mayHaveTax($product, $max_price);
464
  }
465
- $price_range_suffix = self::$woocommerce_helper->getProductPriceSuffix($product);
466
  if ($min_original_price == $max_original_price) {
467
- $price_html = self::$woocommerce_helper->formatPrice($min_original_price) . $price_range_suffix;
468
  } elseif ($min_original_price < $max_original_price) {
469
- $price_html = self::$woocommerce_helper->formatPriceRange($min_original_price, $max_original_price, true) . $price_range_suffix;
470
  }
471
-
472
  if ($min_price == $max_price) {
473
- $price_html_discounted = self::$woocommerce_helper->formatPrice($min_price) . $price_range_suffix;
474
  return $this->getStrikeoutPrice($price_html, $price_html_discounted, false, true);
475
  } elseif ($min_price < $max_price) {
476
- $price_html_discounted = self::$woocommerce_helper->formatPriceRange($min_price, $max_price, false) . $price_range_suffix;
477
  return $this->getStrikeoutPrice($price_html, $price_html_discounted, false, true);
478
  }
479
  }
@@ -694,7 +694,7 @@ class ManageDiscount extends Base
694
 
695
  //Combine all discounts and add as single discounts
696
  if (!empty($total_combined_discounts) && !empty($combine_all_discounts)) {
697
- $label = self::$config->getConfig('discount_label_for_combined_discounts', __('Cart discount', WDR_TEXT_DOMAIN));
698
  $label = Helper::getCleanHtml($label);
699
  if ($discount_apply_type == 'fee') {
700
  $total_combined_discounts = -1 * $total_combined_discounts;
@@ -873,7 +873,7 @@ class ManageDiscount extends Base
873
  if ($discount_value > 0) {
874
  if (empty($combine_all_discounts)) {
875
  $discount_value = $discount_value;
876
- $label = __($label, WDR_TEXT_DOMAIN);
877
  self::setCartCouponValues($label, $discount_value, $cart_item_keys);
878
  $this->applyFakeCouponsForCartRules($label);
879
  }else{
@@ -889,7 +889,7 @@ class ManageDiscount extends Base
889
  if(empty($combine_all_discounts)){
890
  $discount_value = $discount['value'];
891
  $label = $discount['label'];
892
- $label = __($label, WDR_TEXT_DOMAIN);
893
  self::setCartCouponValues($label, $discount_value, $discount['cart_item_keys']);
894
  $this->applyFakeCouponsForCartRules($label);
895
  }else{
@@ -901,12 +901,12 @@ class ManageDiscount extends Base
901
 
902
  //Combine all discounts and add as single discounts
903
  if (!empty($total_combined_discounts) && !empty($combine_all_discounts)) {
904
- $label = self::$config->getConfig('discount_label_for_combined_discounts', __('Cart discount', WDR_TEXT_DOMAIN));
905
  $label = Helper::getCleanHtml($label);
906
  if(empty($label)){
907
- $label = __('Cart discount', WDR_TEXT_DOMAIN);
908
  }
909
- $label = __($label, WDR_TEXT_DOMAIN);
910
  self::setCartCouponValues($label, $total_combined_discounts, $combined_discounts_cart_items);
911
  $this->applyFakeCouponsForCartRules($label);
912
  }
@@ -999,8 +999,10 @@ class ManageDiscount extends Base
999
  $coupon_code = $coupon_data;
1000
  $amount = self::$apply_as_coupon_values[$coupon_code]['value'];
1001
  $cart_item_keys = self::$apply_as_coupon_values[$coupon_code]['cart_item_keys'];
1002
- $product_ids = self::getProductIdsFromCartKey($cart_item_keys);
1003
- $discount_in_percentage = self::getPercentageFromCartKey($product_ids, $amount);
 
 
1004
  } else {
1005
  return $response;
1006
  }
@@ -1024,7 +1026,7 @@ class ManageDiscount extends Base
1024
  if(empty($product_ids)){
1025
  $discount_type = 'fixed_cart';
1026
  } else {
1027
- $discount_type = 'percent';
1028
  $amount = $discount_in_percentage;
1029
  }
1030
 
@@ -1121,7 +1123,12 @@ class ManageDiscount extends Base
1121
  function removeAppliedMessageOfThirdPartyCoupon($msg, $msg_code, $coupon){
1122
  if(!empty($coupon)){
1123
  $disable_coupon_when_rule_applied = self::$config->getConfig('disable_coupon_when_rule_applied', 'run_both');//run_both, disable_coupon, disable_rules
1124
- if($disable_coupon_when_rule_applied == 'disable_coupon'){
 
 
 
 
 
1125
  $used_coupons = DiscountCalculator::getUsedCoupons();
1126
  $applied_coupons = Woocommerce::getAppliedCoupons();
1127
 
@@ -1146,7 +1153,7 @@ class ManageDiscount extends Base
1146
  * @param $coupon_code string
1147
  * */
1148
  function removeAppliedCoupon($coupon_code){
1149
- $msg = sprintf(__('Sorry, it is not possible to apply coupon <b>"%s"</b> as you already have a discount applied in cart.', WDR_TEXT_DOMAIN), $coupon_code);
1150
 
1151
  $msg = apply_filters('advanced_woo_discount_rules_notice_on_remove_coupon_while_having_a_discount', $msg, $coupon_code);
1152
 
@@ -1222,6 +1229,7 @@ class ManageDiscount extends Base
1222
  $do_apply_price_rules = apply_filters('advanced_woo_discount_rules_do_apply_price_discount', true, $price, $cart_item, $cart_object, self::$calculated_cart_item_discount[$key]);
1223
  if($do_apply_price_rules){
1224
  self::$woocommerce_helper->setCartProductPrice($product_obj, $price);
 
1225
  }
1226
 
1227
  }
@@ -1577,12 +1585,13 @@ class ManageDiscount extends Base
1577
  {
1578
  $message = self::$config->getConfig('applied_rule_message', __('Discount <strong>{{title}}</strong> has been applied to your cart.', 'woo-discount-rules'));
1579
  $message = Helper::getCleanHtml($message);
1580
- $message = __($message, WDR_TEXT_DOMAIN);
1581
  $calc = self::$calculator;
1582
  $applied_rules = $calc::$applied_rules;
1583
  if (!empty($applied_rules)) {
1584
  foreach ($applied_rules as $rule) {
1585
  $title = $rule->getTitle();
 
1586
  $message_to_display = str_replace('{{title}}', $title, $message);
1587
  $message_to_display = apply_filters('advanced_woo_discount_rules_message_to_display_when_rules_applied', $message_to_display, $rule);
1588
  self::$woocommerce_helper->printNotice($message_to_display, 'success');
@@ -1701,7 +1710,7 @@ class ManageDiscount extends Base
1701
  {
1702
  if (!empty($discount)) {
1703
  $text = self::$config->getConfig('you_saved_text', __("You saved {{total_discount}}", 'woo-discount-rules'));
1704
- $text = __($text, WDR_TEXT_DOMAIN);
1705
  $text = Helper::getCleanHtml($text);
1706
  $message = str_replace('{{total_discount}}', $discount, $text);
1707
  return '<div class="awdr-you-saved-text" style="color: green">' . $message . '</div>';
@@ -2381,8 +2390,8 @@ class ManageDiscount extends Base
2381
  * */
2382
  public function displayPromotionMessages(){
2383
  $messages = Helper::getPromotionMessages();
2384
- if(!empty($messages) && is_array($messages)){
2385
- foreach ($messages as $message){
2386
  wc_print_notice($message, "notice");
2387
  }
2388
  }
@@ -2408,6 +2417,7 @@ class ManageDiscount extends Base
2408
  echo "</script>";
2409
  }
2410
 
 
2411
  /**
2412
  * Export Data via CSV
2413
  */
132
  $on_sale_badge_html = self::$config->getConfig('on_sale_badge_html', '<span class="onsale">Sale!</span>');
133
  $translate = __('<span class="onsale">Sale!</span>', 'woo-discount-rules');
134
  $on_sale_badge_html = Helper::getCleanHtml($on_sale_badge_html);
135
+ $html = __($on_sale_badge_html, 'woo-discount-rules');
136
  $html = apply_filters('advanced_woo_discount_rules_on_sale_badge_html', $html, $post, $_product);
137
  }
138
 
462
  if(!empty($max_price)){
463
  $max_price = $calculator->mayHaveTax($product, $max_price);
464
  }
465
+ $min_original_price_range_suffix = self::$woocommerce_helper->getProductPriceSuffix($product, $min_original_price);
466
  if ($min_original_price == $max_original_price) {
467
+ $price_html = self::$woocommerce_helper->formatPrice($min_original_price) . $min_original_price_range_suffix;
468
  } elseif ($min_original_price < $max_original_price) {
469
+ $price_html = self::$woocommerce_helper->formatPriceRange($min_original_price, $max_original_price, true) . $min_original_price_range_suffix;
470
  }
471
+ $min_price_range_suffix = self::$woocommerce_helper->getProductPriceSuffix($product, $min_price);
472
  if ($min_price == $max_price) {
473
+ $price_html_discounted = self::$woocommerce_helper->formatPrice($min_price) . $min_price_range_suffix;
474
  return $this->getStrikeoutPrice($price_html, $price_html_discounted, false, true);
475
  } elseif ($min_price < $max_price) {
476
+ $price_html_discounted = self::$woocommerce_helper->formatPriceRange($min_price, $max_price, false) . $min_price_range_suffix;
477
  return $this->getStrikeoutPrice($price_html, $price_html_discounted, false, true);
478
  }
479
  }
694
 
695
  //Combine all discounts and add as single discounts
696
  if (!empty($total_combined_discounts) && !empty($combine_all_discounts)) {
697
+ $label = self::$config->getConfig('discount_label_for_combined_discounts', __('Cart discount', 'woo-discount-rules'));
698
  $label = Helper::getCleanHtml($label);
699
  if ($discount_apply_type == 'fee') {
700
  $total_combined_discounts = -1 * $total_combined_discounts;
873
  if ($discount_value > 0) {
874
  if (empty($combine_all_discounts)) {
875
  $discount_value = $discount_value;
876
+ $label = __($label, 'woo-discount-rules');
877
  self::setCartCouponValues($label, $discount_value, $cart_item_keys);
878
  $this->applyFakeCouponsForCartRules($label);
879
  }else{
889
  if(empty($combine_all_discounts)){
890
  $discount_value = $discount['value'];
891
  $label = $discount['label'];
892
+ $label = __($label, 'woo-discount-rules');
893
  self::setCartCouponValues($label, $discount_value, $discount['cart_item_keys']);
894
  $this->applyFakeCouponsForCartRules($label);
895
  }else{
901
 
902
  //Combine all discounts and add as single discounts
903
  if (!empty($total_combined_discounts) && !empty($combine_all_discounts)) {
904
+ $label = self::$config->getConfig('discount_label_for_combined_discounts', __('Cart discount', 'woo-discount-rules'));
905
  $label = Helper::getCleanHtml($label);
906
  if(empty($label)){
907
+ $label = __('Cart discount', 'woo-discount-rules');
908
  }
909
+ $label = __($label, 'woo-discount-rules');
910
  self::setCartCouponValues($label, $total_combined_discounts, $combined_discounts_cart_items);
911
  $this->applyFakeCouponsForCartRules($label);
912
  }
999
  $coupon_code = $coupon_data;
1000
  $amount = self::$apply_as_coupon_values[$coupon_code]['value'];
1001
  $cart_item_keys = self::$apply_as_coupon_values[$coupon_code]['cart_item_keys'];
1002
+ if(apply_filters('advanced_woo_discount_rules_apply_coupon_for_products_based_on_filters', true, $coupon_code)){
1003
+ $product_ids = self::getProductIdsFromCartKey($cart_item_keys);
1004
+ $discount_in_percentage = self::getPercentageFromCartKey($product_ids, $amount);
1005
+ }
1006
  } else {
1007
  return $response;
1008
  }
1026
  if(empty($product_ids)){
1027
  $discount_type = 'fixed_cart';
1028
  } else {
1029
+ $discount_type = apply_filters('advanced_woo_discount_rules_coupon_discount_type_percentage', 'percent');
1030
  $amount = $discount_in_percentage;
1031
  }
1032
 
1123
  function removeAppliedMessageOfThirdPartyCoupon($msg, $msg_code, $coupon){
1124
  if(!empty($coupon)){
1125
  $disable_coupon_when_rule_applied = self::$config->getConfig('disable_coupon_when_rule_applied', 'run_both');//run_both, disable_coupon, disable_rules
1126
+ /**
1127
+ * Added fix for coupon not applied in checkout page( when disable coupon discount rules will work)
1128
+ * added check for condition isset(self::$calculated_cart_item_discount) && !empty(self::$calculated_cart_item_discount)
1129
+ * @since 2.3.4
1130
+ */
1131
+ if($disable_coupon_when_rule_applied == 'disable_coupon' && isset(self::$calculated_cart_item_discount) && !empty(self::$calculated_cart_item_discount)){
1132
  $used_coupons = DiscountCalculator::getUsedCoupons();
1133
  $applied_coupons = Woocommerce::getAppliedCoupons();
1134
 
1153
  * @param $coupon_code string
1154
  * */
1155
  function removeAppliedCoupon($coupon_code){
1156
+ $msg = sprintf(__('Sorry, it is not possible to apply coupon <b>"%s"</b> as you already have a discount applied in cart.', 'woo-discount-rules'), $coupon_code);
1157
 
1158
  $msg = apply_filters('advanced_woo_discount_rules_notice_on_remove_coupon_while_having_a_discount', $msg, $coupon_code);
1159
 
1229
  $do_apply_price_rules = apply_filters('advanced_woo_discount_rules_do_apply_price_discount', true, $price, $cart_item, $cart_object, self::$calculated_cart_item_discount[$key]);
1230
  if($do_apply_price_rules){
1231
  self::$woocommerce_helper->setCartProductPrice($product_obj, $price);
1232
+ $product_obj->awdr_product_original_price = $initial_price;
1233
  }
1234
 
1235
  }
1585
  {
1586
  $message = self::$config->getConfig('applied_rule_message', __('Discount <strong>{{title}}</strong> has been applied to your cart.', 'woo-discount-rules'));
1587
  $message = Helper::getCleanHtml($message);
1588
+ $message = __($message, 'woo-discount-rules');
1589
  $calc = self::$calculator;
1590
  $applied_rules = $calc::$applied_rules;
1591
  if (!empty($applied_rules)) {
1592
  foreach ($applied_rules as $rule) {
1593
  $title = $rule->getTitle();
1594
+ $title = __($title, 'woo-discount-rules');
1595
  $message_to_display = str_replace('{{title}}', $title, $message);
1596
  $message_to_display = apply_filters('advanced_woo_discount_rules_message_to_display_when_rules_applied', $message_to_display, $rule);
1597
  self::$woocommerce_helper->printNotice($message_to_display, 'success');
1710
  {
1711
  if (!empty($discount)) {
1712
  $text = self::$config->getConfig('you_saved_text', __("You saved {{total_discount}}", 'woo-discount-rules'));
1713
+ $text = __($text, 'woo-discount-rules');
1714
  $text = Helper::getCleanHtml($text);
1715
  $message = str_replace('{{total_discount}}', $discount, $text);
1716
  return '<div class="awdr-you-saved-text" style="color: green">' . $message . '</div>';
2390
  * */
2391
  public function displayPromotionMessages(){
2392
  $messages = Helper::getPromotionMessages();
2393
+ if(!empty($messages) && is_array($messages)) {
2394
+ foreach ($messages as $message) {
2395
  wc_print_notice($message, "notice");
2396
  }
2397
  }
2417
  echo "</script>";
2418
  }
2419
 
2420
+
2421
  /**
2422
  * Export Data via CSV
2423
  */
v2/App/Controllers/ShortCodeManager.php CHANGED
@@ -560,7 +560,7 @@ class ShortCodeManager extends ManageDiscount
560
  $awdr_banner_editer = $this->getCleanHtml($awdr_banner_editer);
561
  echo "<div class='awdr_banner_content'>".$awdr_banner_editer."</div>";
562
  }else{
563
- echo "<div class='awdr_banner_content'>"._e('No Banner Content', WDR_TEXT_DOMAIN);".</div>";
564
  }*/
565
  }
566
  }
560
  $awdr_banner_editer = $this->getCleanHtml($awdr_banner_editer);
561
  echo "<div class='awdr_banner_content'>".$awdr_banner_editer."</div>";
562
  }else{
563
+ echo "<div class='awdr_banner_content'>"._e('No Banner Content', 'woo-discount-rules');".</div>";
564
  }*/
565
  }
566
  }
v2/App/Helpers/Filter.php CHANGED
@@ -88,7 +88,7 @@ class Filter
88
  }
89
  $processing_result = $this->compareWithProducts($values, $method, $product_id, $product);
90
  } elseif ('product_category' === $type) {
91
- //$product = Woocommerce::getParentProduct($product);
92
  $processing_result = $this->compareWithCategories($product, $values, $method);
93
  } elseif ('product_tags' === $type) {
94
  $product = Woocommerce::getParentProduct($product);
88
  }
89
  $processing_result = $this->compareWithProducts($values, $method, $product_id, $product);
90
  } elseif ('product_category' === $type) {
91
+ $product = Woocommerce::getParentProduct($product);
92
  $processing_result = $this->compareWithCategories($product, $values, $method);
93
  } elseif ('product_tags' === $type) {
94
  $product = Woocommerce::getParentProduct($product);
v2/App/Helpers/Helper.php CHANGED
@@ -113,8 +113,11 @@ class Helper
113
  }
114
 
115
  /**
116
- * Set messages
117
- * */
 
 
 
118
  public static function setPromotionMessage($message, $rule_id = '')
119
  {
120
  $messages = Woocommerce::getSession('awdr_promotion_messages', array());
@@ -151,25 +154,25 @@ class Helper
151
  */
152
  public static function ruleConditionDescription()
153
  {
154
- return $content = "<p>" . __('Include additional conditions (if necessary)', WDR_TEXT_DOMAIN) . "</p>
155
- <b>" . __('Popular conditions:', WDR_TEXT_DOMAIN) . "</b>
156
  <span style='width: 100%; display: flex;'>
157
  <span style='width: 45%; padding-right: 5px;'>
158
  <ul class='awdr-bullet-style'>
159
- <li ><a href='https://docs.flycart.org/en/articles/3977542-subtotal-based-free-product-2-0?utm_source=woo-discount-rules-v2&utm_campaign=doc&utm_medium=text-click&utm_content=subtotal_documentation' target='_blank'>" . __('Subtotal', WDR_TEXT_DOMAIN) . "</a></li>
160
- <li ><a href='https://docs.flycart.org/en/articles/4203313-user-role-based-discount-rules-discount-rules-2-0?utm_source=woo-discount-rules-v2&utm_campaign=doc&utm_medium=text-click&utm_content=user_role_documentation' target='_blank'>" . __('User role', WDR_TEXT_DOMAIN) . "</a></li>
161
- <li >" . __('Days & Time', WDR_TEXT_DOMAIN) . "</li>
162
- <li ><a href='https://docs.flycart.org/en/articles/4206683-how-to-provide-first-order-discount-2-0?utm_source=woo-discount-rules-v2&utm_campaign=doc&utm_medium=text-click&utm_content=purchase_history' target='_blank'>" . __('Purchase History', WDR_TEXT_DOMAIN) . "</a></li>
163
- <li >" . __('Payment Method', WDR_TEXT_DOMAIN) . "</li>
164
  </ul>
165
  </span>
166
  <span style='width: 45%;'>
167
  <ul class='awdr-bullet-style'>
168
- <li ><a href='https://docs.flycart.org/en/articles/4268595-activate-discount-rule-using-a-coupon-code-in-woocommerce-2-0?utm_source=woo-discount-rules-v2&utm_campaign=doc&utm_medium=text-click&utm_content=coupon_documentation' target='_blank'>" . __('Coupon', WDR_TEXT_DOMAIN) . "</a></li>
169
- <li ><a href='https://docs.flycart.org/en/articles/4214869-customer-shipping-address-based-discount-2-0?utm_source=woo-discount-rules-v2&utm_campaign=doc&utm_medium=text-click&utm_content=shipping_address_documentation' target='_blank'>" . __('Shipping Address', WDR_TEXT_DOMAIN) . "</a></li>
170
- <li><a href='https://docs.flycart.org/en/articles/4279899-category-combination-get-discount-only-when-category-a-b-c-are-in-the-cart-2-0?utm_source=woo-discount-rules-v2&utm_campaign=doc&utm_medium=text-click&utm_content=category_combination' target='_blank'>" . __('Category Combination', WDR_TEXT_DOMAIN) . "</a></li>
171
- <li><a href='https://docs.flycart.org/en/articles/4164153-buy-product-a-b-and-get-discount-in-product-c-discount-rules-2-0?utm_source=woo-discount-rules-v2&utm_campaign=doc&utm_medium=text-click&utm_content=product_combination' target='_blank'>" . __('Product Combination', WDR_TEXT_DOMAIN) . "</a></li>
172
- <li ><a href='https://docs.flycart.org/en/articles/4280177-discounts-based-on-cart-line-items?utm_source=woo-discount-rules-v2&utm_campaign=doc&utm_medium=text-click&utm_content=quantity_or_line_items' target='_blank'>" . __('Quantities/Line items', WDR_TEXT_DOMAIN) . "</a></li>
173
 
174
 
175
  </ul>
@@ -189,7 +192,7 @@ class Helper
189
  If a customer wanted to buy 2 quantities of Product A, 3 quantities of Product B, then count will be maintained at the product level.
190
  2 - count of Product A
191
  3 - Count of Product B
192
- In case of variable products, the count will be based on each variant because WooCommerce considers a variant as a product itself.", WDR_TEXT_DOMAIN);
193
  }
194
 
195
  /**
@@ -201,7 +204,7 @@ class Helper
201
  return $content = __("Filter set above :
202
  This will count the quantities of products set in the 'Filter' section.
203
  Example: If you selected a few categories there, it will count the quantities of products in those categories added in cart. If you selected a few products in the filters section, then it will count the quantities together.
204
- Example: Let’s say, you wanted to offer a Bulk Quantity discount for Category A and chosen Category A in the filters. So when a customer adds 1 quantity each of X, Y and Z from Category A, then the count here is 3.", WDR_TEXT_DOMAIN);
205
  }
206
 
207
  /**
@@ -215,7 +218,7 @@ class Helper
215
  Example:
216
  Say, you have Product A - Small, Medium, Large.
217
  If a customer buys 2 of Product A - Small, 4 of Product A - Medium, 6 of Product A - Large, then the count will be: 6+4+2 = 12
218
- ', WDR_TEXT_DOMAIN);
219
  }
220
 
221
  /**
@@ -265,8 +268,8 @@ class Helper
265
  }
266
  }
267
  }
268
- $coupon_name_from_config = Configuration::getInstance()->getConfig('discount_label_for_combined_discounts', __('Cart discount', WDR_TEXT_DOMAIN));
269
- $coupon_names[] = (empty($coupon_name_from_config))? __('Cart discount', WDR_TEXT_DOMAIN): $coupon_name_from_config;
270
  foreach ($coupon_names as $key => $coupon_name){
271
  $coupon_names[$key] = apply_filters('woocommerce_coupon_code', $coupon_name);
272
  }
@@ -319,7 +322,7 @@ class Helper
319
  return true;
320
  }
321
  }
322
- die(__('Invalid token', WDR_TEXT_DOMAIN));
323
  }
324
 
325
  public static function filterSelect2SearchQuery($query)
@@ -329,16 +332,16 @@ class Helper
329
 
330
  public static function displayCompatibleCheckMessages()
331
  {
332
- if (version_compare(WDR_VERSION, '2.3.3', '>=')) {
333
  if (defined('WDR_PRO_VERSION')) {
334
- if (version_compare(WDR_PRO_VERSION, '2.3.3', '<')) {
335
  $url = admin_url() . "plugins.php";
336
- $plugin_page = '<a target="_blank" href="' . $url . '">' . __('Update now', WDR_TEXT_DOMAIN) . '</a>';
337
  ?>
338
  <br>
339
  <div class="notice inline notice notice-warning notice-alt awdr-rule-limit-disabled">
340
  <p class="rule_limit_msg_future">
341
- <?php echo sprintf(__('You are using a lower version of our <b>Woo Discount Rules PRO 2.0</b> plugin. Please update the plugin to latest version to run smoothly. %s', WDR_TEXT_DOMAIN), $plugin_page); ?>
342
  </p>
343
  </div>
344
  <?php
113
  }
114
 
115
  /**
116
+ * Set promotion messages
117
+ * @param $message
118
+ * @param string $rule_id
119
+ * @param $promotion_type
120
+ */
121
  public static function setPromotionMessage($message, $rule_id = '')
122
  {
123
  $messages = Woocommerce::getSession('awdr_promotion_messages', array());
154
  */
155
  public static function ruleConditionDescription()
156
  {
157
+ return $content = "<p>" . __('Include additional conditions (if necessary)', 'woo-discount-rules') . "</p>
158
+ <b>" . __('Popular conditions:', 'woo-discount-rules') . "</b>
159
  <span style='width: 100%; display: flex;'>
160
  <span style='width: 45%; padding-right: 5px;'>
161
  <ul class='awdr-bullet-style'>
162
+ <li ><a href='https://docs.flycart.org/en/articles/3977542-subtotal-based-free-product-2-0?utm_source=woo-discount-rules-v2&utm_campaign=doc&utm_medium=text-click&utm_content=subtotal_documentation' target='_blank'>" . __('Subtotal', 'woo-discount-rules') . "</a></li>
163
+ <li ><a href='https://docs.flycart.org/en/articles/4203313-user-role-based-discount-rules-discount-rules-2-0?utm_source=woo-discount-rules-v2&utm_campaign=doc&utm_medium=text-click&utm_content=user_role_documentation' target='_blank'>" . __('User role', 'woo-discount-rules') . "</a></li>
164
+ <li >" . __('Days & Time', 'woo-discount-rules') . "</li>
165
+ <li ><a href='https://docs.flycart.org/en/articles/4206683-how-to-provide-first-order-discount-2-0?utm_source=woo-discount-rules-v2&utm_campaign=doc&utm_medium=text-click&utm_content=purchase_history' target='_blank'>" . __('Purchase History', 'woo-discount-rules') . "</a></li>
166
+ <li >" . __('Payment Method', 'woo-discount-rules') . "</li>
167
  </ul>
168
  </span>
169
  <span style='width: 45%;'>
170
  <ul class='awdr-bullet-style'>
171
+ <li ><a href='https://docs.flycart.org/en/articles/4268595-activate-discount-rule-using-a-coupon-code-in-woocommerce-2-0?utm_source=woo-discount-rules-v2&utm_campaign=doc&utm_medium=text-click&utm_content=coupon_documentation' target='_blank'>" . __('Coupon', 'woo-discount-rules') . "</a></li>
172
+ <li ><a href='https://docs.flycart.org/en/articles/4214869-customer-shipping-address-based-discount-2-0?utm_source=woo-discount-rules-v2&utm_campaign=doc&utm_medium=text-click&utm_content=shipping_address_documentation' target='_blank'>" . __('Shipping Address', 'woo-discount-rules') . "</a></li>
173
+ <li><a href='https://docs.flycart.org/en/articles/4279899-category-combination-get-discount-only-when-category-a-b-c-are-in-the-cart-2-0?utm_source=woo-discount-rules-v2&utm_campaign=doc&utm_medium=text-click&utm_content=category_combination' target='_blank'>" . __('Category Combination', 'woo-discount-rules') . "</a></li>
174
+ <li><a href='https://docs.flycart.org/en/articles/4164153-buy-product-a-b-and-get-discount-in-product-c-discount-rules-2-0?utm_source=woo-discount-rules-v2&utm_campaign=doc&utm_medium=text-click&utm_content=product_combination' target='_blank'>" . __('Product Combination', 'woo-discount-rules') . "</a></li>
175
+ <li ><a href='https://docs.flycart.org/en/articles/4280177-discounts-based-on-cart-line-items?utm_source=woo-discount-rules-v2&utm_campaign=doc&utm_medium=text-click&utm_content=quantity_or_line_items' target='_blank'>" . __('Quantities/Line items', 'woo-discount-rules') . "</a></li>
176
 
177
 
178
  </ul>
192
  If a customer wanted to buy 2 quantities of Product A, 3 quantities of Product B, then count will be maintained at the product level.
193
  2 - count of Product A
194
  3 - Count of Product B
195
+ In case of variable products, the count will be based on each variant because WooCommerce considers a variant as a product itself.", 'woo-discount-rules');
196
  }
197
 
198
  /**
204
  return $content = __("Filter set above :
205
  This will count the quantities of products set in the 'Filter' section.
206
  Example: If you selected a few categories there, it will count the quantities of products in those categories added in cart. If you selected a few products in the filters section, then it will count the quantities together.
207
+ Example: Let’s say, you wanted to offer a Bulk Quantity discount for Category A and chosen Category A in the filters. So when a customer adds 1 quantity each of X, Y and Z from Category A, then the count here is 3.", 'woo-discount-rules');
208
  }
209
 
210
  /**
218
  Example:
219
  Say, you have Product A - Small, Medium, Large.
220
  If a customer buys 2 of Product A - Small, 4 of Product A - Medium, 6 of Product A - Large, then the count will be: 6+4+2 = 12
221
+ ', 'woo-discount-rules');
222
  }
223
 
224
  /**
268
  }
269
  }
270
  }
271
+ $coupon_name_from_config = Configuration::getInstance()->getConfig('discount_label_for_combined_discounts', __('Cart discount', 'woo-discount-rules'));
272
+ $coupon_names[] = (empty($coupon_name_from_config))? __('Cart discount', 'woo-discount-rules'): $coupon_name_from_config;
273
  foreach ($coupon_names as $key => $coupon_name){
274
  $coupon_names[$key] = apply_filters('woocommerce_coupon_code', $coupon_name);
275
  }
322
  return true;
323
  }
324
  }
325
+ die(__('Invalid token', 'woo-discount-rules'));
326
  }
327
 
328
  public static function filterSelect2SearchQuery($query)
332
 
333
  public static function displayCompatibleCheckMessages()
334
  {
335
+ if (version_compare(WDR_VERSION, '2.3.4', '>=')) {
336
  if (defined('WDR_PRO_VERSION')) {
337
+ if (version_compare(WDR_PRO_VERSION, '2.3.4', '<')) {
338
  $url = admin_url() . "plugins.php";
339
+ $plugin_page = '<a target="_blank" href="' . $url . '">' . __('Update now', 'woo-discount-rules') . '</a>';
340
  ?>
341
  <br>
342
  <div class="notice inline notice notice-warning notice-alt awdr-rule-limit-disabled">
343
  <p class="rule_limit_msg_future">
344
+ <?php echo sprintf(__('You are using a lower version of our <b>Woo Discount Rules PRO 2.0</b> plugin. Please update the plugin to latest version to run smoothly. %s', 'woo-discount-rules'), $plugin_page); ?>
345
  </p>
346
  </div>
347
  <?php
v2/App/Helpers/Migration.php CHANGED
@@ -36,6 +36,89 @@ class Migration
36
  return apply_filters('advanced_woo_discount_rules_has_switch_back_option', $has_switch_back_option);
37
  }
38
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
39
  /**
40
  * Migrate licence key
41
  * */
@@ -130,7 +213,7 @@ class Migration
130
  Woocommerce::setSession('awdr_v1_to_v2_total_migrated', $total_migrated);
131
  }
132
  $percentage = $percentage.'%';
133
- $return_status['display_text'] = sprintf(esc_html__('%s Completed. Please wait..', WDR_TEXT_DOMAIN), $percentage);
134
 
135
  return $return_status;
136
  }
36
  return apply_filters('advanced_woo_discount_rules_has_switch_back_option', $has_switch_back_option);
37
  }
38
 
39
+ /**
40
+ * Check and create sample rules if no rules exists
41
+ * */
42
+ public static function checkAndCreateSampleRules(){
43
+ $database = new \Wdr\App\Models\DBTable();
44
+ $rows = $database->getRulesCount();
45
+ if(empty($rows) || $rows <= 0){
46
+ self::createSampleRules();
47
+ }
48
+ }
49
+
50
+ protected static function getSampleRules(){
51
+ $rules[] = array(
52
+ 'title' => "Store wide discount - sample",
53
+ 'type' => "wdr_simple_discount",
54
+ 'has_condition' => false,
55
+ 'discount_type' => "percentage",
56
+ 'discount_value' => 10,
57
+ );
58
+ $rules[] = array(
59
+ 'title' => "Bulk/tiered discount - sample",
60
+ 'type' => "wdr_bulk_discount",
61
+ 'has_condition' => false,
62
+ 'discount_ranges' => array(
63
+ array("from" => 1, "to" => 5, "discount_type" => "percentage", "discount_value" => 5),
64
+ array("from" => 6, "to" => 10, "discount_type" => "percentage", "discount_value" => 10),
65
+ array("from" => 11, "to" => 15, "discount_type" => "percentage", "discount_value" => 15),
66
+ array("from" => 16, "to" => 20, "discount_type" => "percentage", "discount_value" => 20),
67
+ array("from" => 21, "to" => '', "discount_type" => "percentage", "discount_value" => 25),
68
+ )
69
+ );
70
+ $rules[] = array(
71
+ 'title' => "Cart discount - sample",
72
+ 'type' => "wdr_cart_discount",
73
+ 'has_condition' => true,
74
+ 'discount_type' => "percentage",
75
+ 'discount_value' => 20,
76
+ 'discount_label' => "Subtotal discount",
77
+ 'condition_type' => "cart_subtotal",
78
+ 'condition_option' => array(
79
+ 'operator' => 'greater_than_or_equal',
80
+ 'value' => 500,
81
+ 'calculate_from' => 'from_cart',
82
+ ),
83
+ );
84
+
85
+ return $rules;
86
+ }
87
+
88
+ protected static function createSampleRules(){
89
+ $current_obj = new self();
90
+ $rules = self::getSampleRules();
91
+ foreach ($rules as $key => $rule){
92
+ $current_obj->form->reset();
93
+ $current_obj->form->title = $rule['title'];
94
+ $current_obj->form->enabled = 0;
95
+ $current_obj->form->additional = array('condition_relationship' => 'and');
96
+ $current_obj->form->usage_limits = 0;
97
+ $current_obj->form->date_from = '';
98
+ $current_obj->form->date_to = '';
99
+ $current_obj->form->discount_type = $rule['type'];
100
+ $current_obj->form->setFilter('all_products');
101
+
102
+ if($rule['has_condition']){
103
+ $current_obj->form->setConditions($rule['condition_type'], $rule['condition_option']);
104
+ }
105
+ if($rule['type'] == 'wdr_cart_discount'){
106
+ $current_obj->form->setCartAdjustment($rule['discount_value'], $rule['discount_type'], $rule['discount_label']);
107
+ } else {
108
+ $current_obj->form->setCumulativeOption();
109
+ if($rule['type'] == 'wdr_simple_discount'){
110
+ $current_obj->form->setProductAdjustment($rule['discount_type'], $rule['discount_value']);
111
+ } elseif ($rule['type'] == 'wdr_bulk_discount'){
112
+ foreach ($rule['discount_ranges'] as $discount_range){
113
+ $current_obj->form->setBulkRange($discount_range['from'], $discount_range['to'], $discount_range['discount_value'], $discount_range['discount_type']);
114
+ }
115
+ }
116
+ }
117
+ $form_data = $current_obj->form->getForm();
118
+ $current_obj->rule->save($form_data);
119
+ }
120
+ }
121
+
122
  /**
123
  * Migrate licence key
124
  * */
213
  Woocommerce::setSession('awdr_v1_to_v2_total_migrated', $total_migrated);
214
  }
215
  $percentage = $percentage.'%';
216
+ $return_status['display_text'] = sprintf(esc_html__('%s Completed. Please wait..', 'woo-discount-rules'), $percentage);
217
 
218
  return $return_status;
219
  }
v2/App/Helpers/ProOptions.php CHANGED
@@ -30,32 +30,32 @@ class ProOptions
30
  if($is_pro === false){
31
  $filter_types['product_category'] = array(
32
  'active' => false,
33
- 'label' => __('Category - PRO -', WDR_TEXT_DOMAIN),
34
- 'group' => __('Product', WDR_TEXT_DOMAIN),
35
  'template' => '',
36
  );
37
  $filter_types['product_attributes'] = array(
38
  'active' => false,
39
- 'label' => __('Attributes - PRO -', WDR_TEXT_DOMAIN),
40
- 'group' => __('Product', WDR_TEXT_DOMAIN),
41
  'template' => '',
42
  );
43
  $filter_types['product_tags'] = array(
44
  'active' => false,
45
- 'label' => __('Tags - PRO -', WDR_TEXT_DOMAIN),
46
- 'group' => __('Product', WDR_TEXT_DOMAIN),
47
  'template' => '',
48
  );
49
  $filter_types['product_sku'] = array(
50
  'active' => false,
51
- 'label' => __('SKUs - PRO -', WDR_TEXT_DOMAIN),
52
- 'group' => __('Product', WDR_TEXT_DOMAIN),
53
  'template' => '',
54
  );
55
  $filter_types['product_on_sale'] = array(
56
  'active' => false,
57
- 'label' => __('On sale products - PRO -', WDR_TEXT_DOMAIN),
58
- 'group' => __('Product', WDR_TEXT_DOMAIN),
59
  'template' => '',
60
  );
61
 
@@ -76,224 +76,224 @@ class ProOptions
76
  $available_conditions['cart_coupon'] = array(
77
  'object' => '\Wdr\App\Conditions\Base',
78
  'enable' => false,
79
- 'label' => __('Coupons - PRO -', WDR_TEXT_DOMAIN),
80
- 'group' => __('Cart', WDR_TEXT_DOMAIN),
81
  'template' => '',
82
  'extra_params' => array(),
83
  );
84
  $available_conditions['cart_item_product_attributes'] = array(
85
  'object' => '\Wdr\App\Conditions\Base',
86
  'enable' => false,
87
- 'label' => __('Attributes - PRO -', WDR_TEXT_DOMAIN),
88
- 'group' => __('Cart Items', WDR_TEXT_DOMAIN),
89
  'template' => '',
90
  'extra_params' => array(),
91
  );
92
  $available_conditions['cart_item_product_category'] = array(
93
  'object' => '\Wdr\App\Conditions\Base',
94
  'enable' => false,
95
- 'label' => __('Category - PRO -', WDR_TEXT_DOMAIN),
96
- 'group' => __('Cart Items', WDR_TEXT_DOMAIN),
97
  'template' => '',
98
  'extra_params' => array(),
99
  );
100
  $available_conditions['cart_item_product_combination'] = array(
101
  'object' => '\Wdr\App\Conditions\Base',
102
  'enable' => false,
103
- 'label' => __('Product combination - PRO -', WDR_TEXT_DOMAIN),
104
- 'group' => __('Cart Items', WDR_TEXT_DOMAIN),
105
  'template' => '',
106
  'extra_params' => array(),
107
  );
108
  $available_conditions['cart_item_products'] = array(
109
  'object' => '\Wdr\App\Conditions\Base',
110
  'enable' => false,
111
- 'label' => __('Products - PRO -', WDR_TEXT_DOMAIN),
112
- 'group' => __('Cart Items', WDR_TEXT_DOMAIN),
113
  'template' => '',
114
  'extra_params' => array(),
115
  );
116
  $available_conditions['cart_item_product_sku'] = array(
117
  'object' => '\Wdr\App\Conditions\Base',
118
  'enable' => false,
119
- 'label' => __('SKU - PRO -', WDR_TEXT_DOMAIN),
120
- 'group' => __('Cart Items', WDR_TEXT_DOMAIN),
121
  'template' => '',
122
  'extra_params' => array(),
123
  );
124
  $available_conditions['cart_item_product_tags'] = array(
125
  'object' => '\Wdr\App\Conditions\Base',
126
  'enable' => false,
127
- 'label' => __('Tags - PRO -', WDR_TEXT_DOMAIN),
128
- 'group' => __('Cart Items', WDR_TEXT_DOMAIN),
129
  'template' => '',
130
  'extra_params' => array(),
131
  );
132
  $available_conditions['cart_items_quantity'] = array(
133
  'object' => '\Wdr\App\Conditions\Base',
134
  'enable' => false,
135
- 'label' => __('Cart items quantity - PRO -', WDR_TEXT_DOMAIN),
136
- 'group' => __('Cart', WDR_TEXT_DOMAIN),
137
  'template' => '',
138
  'extra_params' => array(),
139
  );
140
  $available_conditions['cart_items_weight'] = array(
141
  'object' => '\Wdr\App\Conditions\Base',
142
  'enable' => false,
143
- 'label' => __('Total weight - PRO -', WDR_TEXT_DOMAIN),
144
- 'group' => __('Cart', WDR_TEXT_DOMAIN),
145
  'template' => '',
146
  'extra_params' => array(),
147
  );
148
  $available_conditions['cart_payment_method'] = array(
149
  'object' => '\Wdr\App\Conditions\Base',
150
  'enable' => false,
151
- 'label' => __('Payment Method - PRO -', WDR_TEXT_DOMAIN),
152
- 'group' => __('Cart', WDR_TEXT_DOMAIN),
153
  'template' => '',
154
  'extra_params' => array(),
155
  );
156
  $available_conditions['order_date'] = array(
157
  'object' => '\Wdr\App\Conditions\Base',
158
  'enable' => false,
159
- 'label' => __('Date - PRO -', WDR_TEXT_DOMAIN),
160
- 'group' => __('Date & Time', WDR_TEXT_DOMAIN),
161
  'template' => '',
162
  'extra_params' => array(),
163
  );
164
  $available_conditions['order_date_and_time'] = array(
165
  'object' => '\Wdr\App\Conditions\Base',
166
  'enable' => false,
167
- 'label' => __('Date and Time - PRO -', WDR_TEXT_DOMAIN),
168
- 'group' => __('Date & Time', WDR_TEXT_DOMAIN),
169
  'template' => '',
170
  'extra_params' => array(),
171
  );
172
  $available_conditions['order_days'] = array(
173
  'object' => '\Wdr\App\Conditions\Base',
174
  'enable' => false,
175
- 'label' => __('Days - PRO -', WDR_TEXT_DOMAIN),
176
- 'group' => __('Date & Time', WDR_TEXT_DOMAIN),
177
  'template' => '',
178
  'extra_params' => array(),
179
  );
180
  $available_conditions['order_time'] = array(
181
  'object' => '\Wdr\App\Conditions\Base',
182
  'enable' => false,
183
- 'label' => __('Time - PRO -', WDR_TEXT_DOMAIN),
184
- 'group' => __('Date & Time', WDR_TEXT_DOMAIN),
185
  'template' => '',
186
  'extra_params' => array(),
187
  );
188
  $available_conditions['purchase_first_order'] = array(
189
  'object' => '\Wdr\App\Conditions\Base',
190
  'enable' => false,
191
- 'label' => __('First order - PRO -', WDR_TEXT_DOMAIN),
192
- 'group' => __('Purchase History', WDR_TEXT_DOMAIN),
193
  'template' => '',
194
  'extra_params' => array(),
195
  );
196
  $available_conditions['purchase_last_order'] = array(
197
  'object' => '\Wdr\App\Conditions\Base',
198
  'enable' => false,
199
- 'label' => __('Last order - PRO -', WDR_TEXT_DOMAIN),
200
- 'group' => __('Purchase History', WDR_TEXT_DOMAIN),
201
  'template' => '',
202
  'extra_params' => array(),
203
  );
204
  $available_conditions['purchase_last_order_amount'] = array(
205
  'object' => '\Wdr\App\Conditions\Base',
206
  'enable' => false,
207
- 'label' => __('Last order amount - PRO -', WDR_TEXT_DOMAIN),
208
- 'group' => __('Purchase History', WDR_TEXT_DOMAIN),
209
  'template' => '',
210
  'extra_params' => array(),
211
  );
212
  $available_conditions['purchase_previous_orders'] = array(
213
  'object' => '\Wdr\App\Conditions\Base',
214
  'enable' => false,
215
- 'label' => __('Number of orders made - PRO -', WDR_TEXT_DOMAIN),
216
- 'group' => __('Purchase History', WDR_TEXT_DOMAIN),
217
  'template' => '',
218
  'extra_params' => array(),
219
  );
220
  $available_conditions['purchase_previous_orders_for_specific_product'] = array(
221
  'object' => '\Wdr\App\Conditions\Base',
222
  'enable' => false,
223
- 'label' => __('Number of orders made with following products - PRO -', WDR_TEXT_DOMAIN),
224
- 'group' => __('Purchase History', WDR_TEXT_DOMAIN),
225
  'template' => '',
226
  'extra_params' => array(),
227
  );
228
  $available_conditions['purchase_spent'] = array(
229
  'object' => '\Wdr\App\Conditions\Base',
230
  'enable' => false,
231
- 'label' => __('Spent - PRO -', WDR_TEXT_DOMAIN),
232
- 'group' => __('Purchase History', WDR_TEXT_DOMAIN),
233
  'template' => '',
234
  'extra_params' => array(),
235
  );
236
  $available_conditions['shipping_city'] = array(
237
  'object' => '\Wdr\App\Conditions\Base',
238
  'enable' => false,
239
- 'label' => __('City - PRO -', WDR_TEXT_DOMAIN),
240
- 'group' => __('Shipping', WDR_TEXT_DOMAIN),
241
  'template' => '',
242
  'extra_params' => array(),
243
  );
244
  $available_conditions['shipping_country'] = array(
245
  'object' => '\Wdr\App\Conditions\Base',
246
  'enable' => false,
247
- 'label' => __('Country - PRO -', WDR_TEXT_DOMAIN),
248
- 'group' => __('Shipping', WDR_TEXT_DOMAIN),
249
  'template' => '',
250
  'extra_params' => array(),
251
  );
252
  $available_conditions['shipping_state'] = array(
253
  'object' => '\Wdr\App\Conditions\Base',
254
  'enable' => false,
255
- 'label' => __('State - PRO -', WDR_TEXT_DOMAIN),
256
- 'group' => __('Shipping', WDR_TEXT_DOMAIN),
257
  'template' => '',
258
  'extra_params' => array(),
259
  );
260
  $available_conditions['shipping_zipcode'] = array(
261
  'object' => '\Wdr\App\Conditions\Base',
262
  'enable' => false,
263
- 'label' => __('Zipcode - PRO -', WDR_TEXT_DOMAIN),
264
- 'group' => __('Shipping', WDR_TEXT_DOMAIN),
265
  'template' => '',
266
  'extra_params' => array(),
267
  );
268
  $available_conditions['user_email'] = array(
269
  'object' => '\Wdr\App\Conditions\Base',
270
  'enable' => false,
271
- 'label' => __('Email - PRO -', WDR_TEXT_DOMAIN),
272
- 'group' => __('Customer', WDR_TEXT_DOMAIN),
273
  'template' => '',
274
  'extra_params' => array(),
275
  );
276
  $available_conditions['user_list'] = array(
277
  'object' => '\Wdr\App\Conditions\Base',
278
  'enable' => false,
279
- 'label' => __('User - PRO -', WDR_TEXT_DOMAIN),
280
- 'group' => __('Customer', WDR_TEXT_DOMAIN),
281
  'template' => '',
282
  'extra_params' => array(),
283
  );
284
  $available_conditions['user_logged_in'] = array(
285
  'object' => '\Wdr\App\Conditions\Base',
286
  'enable' => false,
287
- 'label' => __('Is logged in - PRO -', WDR_TEXT_DOMAIN),
288
- 'group' => __('Customer', WDR_TEXT_DOMAIN),
289
  'template' => '',
290
  'extra_params' => array(),
291
  );
292
  $available_conditions['user_role'] = array(
293
  'object' => '\Wdr\App\Conditions\Base',
294
  'enable' => false,
295
- 'label' => __('User role - PRO -', WDR_TEXT_DOMAIN),
296
- 'group' => __('Customer', WDR_TEXT_DOMAIN),
297
  'template' => '',
298
  'extra_params' => array(),
299
  );
@@ -314,28 +314,28 @@ class ProOptions
314
  $adjustment_type['wdr_buy_x_get_x_discount'] = array(
315
  'class' => '',
316
  'enable' => false,
317
- 'label' => __('Buy X get X - PRO -', WDR_TEXT_DOMAIN),
318
- 'group' => __('Bogo Discount', WDR_TEXT_DOMAIN),
319
  'template' => '',
320
  );
321
  $adjustment_type['wdr_buy_x_get_y_discount'] = array(
322
  'class' => '',
323
  'enable' => false,
324
- 'label' => __('Buy X get Y - PRO -', WDR_TEXT_DOMAIN),
325
- 'group' => __('Bogo Discount', WDR_TEXT_DOMAIN),
326
  'template' => '',
327
  );
328
  $adjustment_type['wdr_free_shipping'] = array(
329
  'class' => '',
330
  'enable' => false,
331
- 'label' => __('Free Shipping - PRO -', WDR_TEXT_DOMAIN),
332
- 'group' => __('Simple Discount', WDR_TEXT_DOMAIN),
333
  );
334
  $adjustment_type['wdr_set_discount'] = array(
335
  'class' => '',
336
  'enable' => false,
337
- 'label' => __('Bundle (Set) Discount - PRO -', WDR_TEXT_DOMAIN),
338
- 'group' => __('Bulk Discount', WDR_TEXT_DOMAIN),
339
  );
340
  }
341
 
30
  if($is_pro === false){
31
  $filter_types['product_category'] = array(
32
  'active' => false,
33
+ 'label' => __('Category - PRO -', 'woo-discount-rules'),
34
+ 'group' => __('Product', 'woo-discount-rules'),
35
  'template' => '',
36
  );
37
  $filter_types['product_attributes'] = array(
38
  'active' => false,
39
+ 'label' => __('Attributes - PRO -', 'woo-discount-rules'),
40
+ 'group' => __('Product', 'woo-discount-rules'),
41
  'template' => '',
42
  );
43
  $filter_types['product_tags'] = array(
44
  'active' => false,
45
+ 'label' => __('Tags - PRO -', 'woo-discount-rules'),
46
+ 'group' => __('Product', 'woo-discount-rules'),
47
  'template' => '',
48
  );
49
  $filter_types['product_sku'] = array(
50
  'active' => false,
51
+ 'label' => __('SKUs - PRO -', 'woo-discount-rules'),
52
+ 'group' => __('Product', 'woo-discount-rules'),
53
  'template' => '',
54
  );
55
  $filter_types['product_on_sale'] = array(
56
  'active' => false,
57
+ 'label' => __('On sale products - PRO -', 'woo-discount-rules'),
58
+ 'group' => __('Product', 'woo-discount-rules'),
59
  'template' => '',
60
  );
61
 
76
  $available_conditions['cart_coupon'] = array(
77
  'object' => '\Wdr\App\Conditions\Base',
78
  'enable' => false,
79
+ 'label' => __('Coupons - PRO -', 'woo-discount-rules'),
80
+ 'group' => __('Cart', 'woo-discount-rules'),
81
  'template' => '',
82
  'extra_params' => array(),
83
  );
84
  $available_conditions['cart_item_product_attributes'] = array(
85
  'object' => '\Wdr\App\Conditions\Base',
86
  'enable' => false,
87
+ 'label' => __('Attributes - PRO -', 'woo-discount-rules'),
88
+ 'group' => __('Cart Items', 'woo-discount-rules'),
89
  'template' => '',
90
  'extra_params' => array(),
91
  );
92
  $available_conditions['cart_item_product_category'] = array(
93
  'object' => '\Wdr\App\Conditions\Base',
94
  'enable' => false,
95
+ 'label' => __('Category - PRO -', 'woo-discount-rules'),
96
+ 'group' => __('Cart Items', 'woo-discount-rules'),
97
  'template' => '',
98
  'extra_params' => array(),
99
  );
100
  $available_conditions['cart_item_product_combination'] = array(
101
  'object' => '\Wdr\App\Conditions\Base',
102
  'enable' => false,
103
+ 'label' => __('Product combination - PRO -', 'woo-discount-rules'),
104
+ 'group' => __('Cart Items', 'woo-discount-rules'),
105
  'template' => '',
106
  'extra_params' => array(),
107
  );
108
  $available_conditions['cart_item_products'] = array(
109
  'object' => '\Wdr\App\Conditions\Base',
110
  'enable' => false,
111
+ 'label' => __('Products - PRO -', 'woo-discount-rules'),
112
+ 'group' => __('Cart Items', 'woo-discount-rules'),
113
  'template' => '',
114
  'extra_params' => array(),
115
  );
116
  $available_conditions['cart_item_product_sku'] = array(
117
  'object' => '\Wdr\App\Conditions\Base',
118
  'enable' => false,
119
+ 'label' => __('SKU - PRO -', 'woo-discount-rules'),
120
+ 'group' => __('Cart Items', 'woo-discount-rules'),
121
  'template' => '',
122
  'extra_params' => array(),
123
  );
124
  $available_conditions['cart_item_product_tags'] = array(
125
  'object' => '\Wdr\App\Conditions\Base',
126
  'enable' => false,
127
+ 'label' => __('Tags - PRO -', 'woo-discount-rules'),
128
+ 'group' => __('Cart Items', 'woo-discount-rules'),
129
  'template' => '',
130
  'extra_params' => array(),
131
  );
132
  $available_conditions['cart_items_quantity'] = array(
133
  'object' => '\Wdr\App\Conditions\Base',
134
  'enable' => false,
135
+ 'label' => __('Cart items quantity - PRO -', 'woo-discount-rules'),
136
+ 'group' => __('Cart', 'woo-discount-rules'),
137
  'template' => '',
138
  'extra_params' => array(),
139
  );
140
  $available_conditions['cart_items_weight'] = array(
141
  'object' => '\Wdr\App\Conditions\Base',
142
  'enable' => false,
143
+ 'label' => __('Total weight - PRO -', 'woo-discount-rules'),
144
+ 'group' => __('Cart', 'woo-discount-rules'),
145
  'template' => '',
146
  'extra_params' => array(),
147
  );
148
  $available_conditions['cart_payment_method'] = array(
149
  'object' => '\Wdr\App\Conditions\Base',
150
  'enable' => false,
151
+ 'label' => __('Payment Method - PRO -', 'woo-discount-rules'),
152
+ 'group' => __('Cart', 'woo-discount-rules'),
153
  'template' => '',
154
  'extra_params' => array(),
155
  );
156
  $available_conditions['order_date'] = array(
157
  'object' => '\Wdr\App\Conditions\Base',
158
  'enable' => false,
159
+ 'label' => __('Date - PRO -', 'woo-discount-rules'),
160
+ 'group' => __('Date & Time', 'woo-discount-rules'),
161
  'template' => '',
162
  'extra_params' => array(),
163
  );
164
  $available_conditions['order_date_and_time'] = array(
165
  'object' => '\Wdr\App\Conditions\Base',
166
  'enable' => false,
167
+ 'label' => __('Date and Time - PRO -', 'woo-discount-rules'),
168
+ 'group' => __('Date & Time', 'woo-discount-rules'),
169
  'template' => '',
170
  'extra_params' => array(),
171
  );
172
  $available_conditions['order_days'] = array(
173
  'object' => '\Wdr\App\Conditions\Base',
174
  'enable' => false,
175
+ 'label' => __('Days - PRO -', 'woo-discount-rules'),
176
+ 'group' => __('Date & Time', 'woo-discount-rules'),
177
  'template' => '',
178
  'extra_params' => array(),
179
  );
180
  $available_conditions['order_time'] = array(
181
  'object' => '\Wdr\App\Conditions\Base',
182
  'enable' => false,
183
+ 'label' => __('Time - PRO -', 'woo-discount-rules'),
184
+ 'group' => __('Date & Time', 'woo-discount-rules'),
185
  'template' => '',
186
  'extra_params' => array(),
187
  );
188
  $available_conditions['purchase_first_order'] = array(
189
  'object' => '\Wdr\App\Conditions\Base',
190
  'enable' => false,
191
+ 'label' => __('First order - PRO -', 'woo-discount-rules'),
192
+ 'group' => __('Purchase History', 'woo-discount-rules'),
193
  'template' => '',
194
  'extra_params' => array(),
195
  );
196
  $available_conditions['purchase_last_order'] = array(
197
  'object' => '\Wdr\App\Conditions\Base',
198
  'enable' => false,
199
+ 'label' => __('Last order - PRO -', 'woo-discount-rules'),
200
+ 'group' => __('Purchase History', 'woo-discount-rules'),
201
  'template' => '',
202
  'extra_params' => array(),
203
  );
204
  $available_conditions['purchase_last_order_amount'] = array(
205
  'object' => '\Wdr\App\Conditions\Base',
206
  'enable' => false,
207
+ 'label' => __('Last order amount - PRO -', 'woo-discount-rules'),
208
+ 'group' => __('Purchase History', 'woo-discount-rules'),
209
  'template' => '',
210
  'extra_params' => array(),
211
  );
212
  $available_conditions['purchase_previous_orders'] = array(
213
  'object' => '\Wdr\App\Conditions\Base',
214
  'enable' => false,
215
+ 'label' => __('Number of orders made - PRO -', 'woo-discount-rules'),
216
+ 'group' => __('Purchase History', 'woo-discount-rules'),
217
  'template' => '',
218
  'extra_params' => array(),
219
  );
220
  $available_conditions['purchase_previous_orders_for_specific_product'] = array(
221
  'object' => '\Wdr\App\Conditions\Base',
222
  'enable' => false,
223
+ 'label' => __('Number of orders made with following products - PRO -', 'woo-discount-rules'),
224
+ 'group' => __('Purchase History', 'woo-discount-rules'),
225
  'template' => '',
226
  'extra_params' => array(),
227
  );
228
  $available_conditions['purchase_spent'] = array(
229
  'object' => '\Wdr\App\Conditions\Base',
230
  'enable' => false,
231
+ 'label' => __('Spent - PRO -', 'woo-discount-rules'),
232
+ 'group' => __('Purchase History', 'woo-discount-rules'),
233
  'template' => '',
234
  'extra_params' => array(),
235
  );
236
  $available_conditions['shipping_city'] = array(
237
  'object' => '\Wdr\App\Conditions\Base',
238
  'enable' => false,
239
+ 'label' => __('City - PRO -', 'woo-discount-rules'),
240
+ 'group' => __('Shipping', 'woo-discount-rules'),
241
  'template' => '',
242
  'extra_params' => array(),
243
  );
244
  $available_conditions['shipping_country'] = array(
245
  'object' => '\Wdr\App\Conditions\Base',
246
  'enable' => false,
247
+ 'label' => __('Country - PRO -', 'woo-discount-rules'),
248
+ 'group' => __('Shipping', 'woo-discount-rules'),
249
  'template' => '',
250
  'extra_params' => array(),
251
  );
252
  $available_conditions['shipping_state'] = array(
253
  'object' => '\Wdr\App\Conditions\Base',
254
  'enable' => false,
255
+ 'label' => __('State - PRO -', 'woo-discount-rules'),
256
+ 'group' => __('Shipping', 'woo-discount-rules'),
257
  'template' => '',
258
  'extra_params' => array(),
259
  );
260
  $available_conditions['shipping_zipcode'] = array(
261
  'object' => '\Wdr\App\Conditions\Base',
262
  'enable' => false,
263
+ 'label' => __('Zipcode - PRO -', 'woo-discount-rules'),
264
+ 'group' => __('Shipping', 'woo-discount-rules'),
265
  'template' => '',
266
  'extra_params' => array(),
267
  );
268
  $available_conditions['user_email'] = array(
269
  'object' => '\Wdr\App\Conditions\Base',
270
  'enable' => false,
271
+ 'label' => __('Email - PRO -', 'woo-discount-rules'),
272
+ 'group' => __('Customer', 'woo-discount-rules'),
273
  'template' => '',
274
  'extra_params' => array(),
275
  );
276
  $available_conditions['user_list'] = array(
277
  'object' => '\Wdr\App\Conditions\Base',
278
  'enable' => false,
279
+ 'label' => __('User - PRO -', 'woo-discount-rules'),
280
+ 'group' => __('Customer', 'woo-discount-rules'),
281
  'template' => '',
282
  'extra_params' => array(),
283
  );
284
  $available_conditions['user_logged_in'] = array(
285
  'object' => '\Wdr\App\Conditions\Base',
286
  'enable' => false,
287
+ 'label' => __('Is logged in - PRO -', 'woo-discount-rules'),
288
+ 'group' => __('Customer', 'woo-discount-rules'),
289
  'template' => '',
290
  'extra_params' => array(),
291
  );
292
  $available_conditions['user_role'] = array(
293
  'object' => '\Wdr\App\Conditions\Base',
294
  'enable' => false,
295
+ 'label' => __('User role - PRO -', 'woo-discount-rules'),
296
+ 'group' => __('Customer', 'woo-discount-rules'),
297
  'template' => '',
298
  'extra_params' => array(),
299
  );
314
  $adjustment_type['wdr_buy_x_get_x_discount'] = array(
315
  'class' => '',
316
  'enable' => false,
317
+ 'label' => __('Buy X get X - PRO -', 'woo-discount-rules'),
318
+ 'group' => __('Bogo Discount', 'woo-discount-rules'),
319
  'template' => '',
320
  );
321
  $adjustment_type['wdr_buy_x_get_y_discount'] = array(
322
  'class' => '',
323
  'enable' => false,
324
+ 'label' => __('Buy X get Y - PRO -', 'woo-discount-rules'),
325
+ 'group' => __('Bogo Discount', 'woo-discount-rules'),
326
  'template' => '',
327
  );
328
  $adjustment_type['wdr_free_shipping'] = array(
329
  'class' => '',
330
  'enable' => false,
331
+ 'label' => __('Free Shipping - PRO -', 'woo-discount-rules'),
332
+ 'group' => __('Simple Discount', 'woo-discount-rules'),
333
  );
334
  $adjustment_type['wdr_set_discount'] = array(
335
  'class' => '',
336
  'enable' => false,
337
+ 'label' => __('Bundle (Set) Discount - PRO -', 'woo-discount-rules'),
338
+ 'group' => __('Bulk Discount', 'woo-discount-rules'),
339
  );
340
  }
341
 
v2/App/Helpers/Rule.php CHANGED
@@ -1230,7 +1230,7 @@ class Rule
1230
  $value = isset($adjustment->value) ? $adjustment->value : 0;
1231
  if (in_array($type, array('flat', 'percentage'))) {
1232
  if (!empty($value)) {
1233
- $label = isset($adjustment->label) ? $adjustment->label : __('discount', WDR_TEXT_DOMAIN);
1234
  $discounts[] = array(
1235
  'free_shipping' => 0,
1236
  'discount' => $value,
@@ -1241,7 +1241,7 @@ class Rule
1241
  }
1242
  } elseif($type == 'flat_in_subtotal'){
1243
  if (!empty($value)) {
1244
- $label = isset($adjustment->label) ? $adjustment->label : __('discount', WDR_TEXT_DOMAIN);
1245
  $discounts[] = array(
1246
  'free_shipping' => 0,
1247
  'discount' => $value,
@@ -1301,7 +1301,7 @@ class Rule
1301
  }
1302
  $current_user = get_current_user_id();
1303
  $rule_id = intval($this->getFromArray($post, 'edit_rule', NULL));
1304
- $title = $this->getFromArray($post, 'title', esc_html__('Untitled Rule', WDR_TEXT_DOMAIN));
1305
  $title = self::validateHtmlBeforeSave($title);
1306
  $enabled = $this->getFromArray($post, 'enabled', '0');
1307
  $exclusive = $this->getFromArray($post, 'exclusive', '0');
@@ -1401,7 +1401,7 @@ class Rule
1401
  $date_to = intval($date_to);
1402
  }
1403
  $current_time = current_time('mysql', true);
1404
- $rule_title = (empty($title)) ? esc_html__('Untitled Rule', WDR_TEXT_DOMAIN) : $title;
1405
  $arg = array(
1406
  'title' => sanitize_text_field($rule_title),
1407
  'enabled' => intval($enabled),
@@ -1459,6 +1459,14 @@ class Rule
1459
  'span' => array('class' => array()),
1460
  'div' => array('class' => array()),
1461
  'p' => array('class' => array()),
 
 
 
 
 
 
 
 
1462
  );
1463
  return wp_kses($html, $allowed_html);
1464
  }
1230
  $value = isset($adjustment->value) ? $adjustment->value : 0;
1231
  if (in_array($type, array('flat', 'percentage'))) {
1232
  if (!empty($value)) {
1233
+ $label = isset($adjustment->label) ? $adjustment->label : __('discount', 'woo-discount-rules');
1234
  $discounts[] = array(
1235
  'free_shipping' => 0,
1236
  'discount' => $value,
1241
  }
1242
  } elseif($type == 'flat_in_subtotal'){
1243
  if (!empty($value)) {
1244
+ $label = isset($adjustment->label) ? $adjustment->label : __('discount', 'woo-discount-rules');
1245
  $discounts[] = array(
1246
  'free_shipping' => 0,
1247
  'discount' => $value,
1301
  }
1302
  $current_user = get_current_user_id();
1303
  $rule_id = intval($this->getFromArray($post, 'edit_rule', NULL));
1304
+ $title = $this->getFromArray($post, 'title', esc_html__('Untitled Rule', 'woo-discount-rules'));
1305
  $title = self::validateHtmlBeforeSave($title);
1306
  $enabled = $this->getFromArray($post, 'enabled', '0');
1307
  $exclusive = $this->getFromArray($post, 'exclusive', '0');
1401
  $date_to = intval($date_to);
1402
  }
1403
  $current_time = current_time('mysql', true);
1404
+ $rule_title = (empty($title)) ? esc_html__('Untitled Rule', 'woo-discount-rules') : $title;
1405
  $arg = array(
1406
  'title' => sanitize_text_field($rule_title),
1407
  'enabled' => intval($enabled),
1459
  'span' => array('class' => array()),
1460
  'div' => array('class' => array()),
1461
  'p' => array('class' => array()),
1462
+ 'table' => array('class' => array(), 'border' => array(), 'cellpadding' => array(), 'cellspacing' => array()),
1463
+ 'tr' => array('class' => array()),
1464
+ 'td' => array('class' => array()),
1465
+ 'th' => array('class' => array()),
1466
+ 'h4' => array('class' => array()),
1467
+ 'h3' => array('class' => array()),
1468
+ 'h1' => array('class' => array()),
1469
+ 'h2' => array('class' => array()),
1470
  );
1471
  return wp_kses($html, $allowed_html);
1472
  }
v2/App/Helpers/Validation.php CHANGED
@@ -143,12 +143,12 @@ class Validation
143
  static function validateRules($post_values)
144
  {
145
  $input_validator = new Validator($post_values);
146
- Validator::addRule('basicTags', array(__CLASS__, 'validateBasicHtmlTags'), __('Invalid characters', WDR_TEXT_DOMAIN));
147
- Validator::addRule('checkPlainInputText', array(__CLASS__, 'validatePlainInputText'), __('Accepts only letters a-z, numbers 0-9 and spaces with special characters', WDR_TEXT_DOMAIN));
148
- Validator::addRule('float', array(__CLASS__, 'validateFloat'), __('Accepts only numbers 0-9 and one dot', WDR_TEXT_DOMAIN));
149
- Validator::addRule('checked', array(__CLASS__, 'validateChecked'), __('Accepts only 0 or 1', WDR_TEXT_DOMAIN));
150
- Validator::addRule('color', array(__CLASS__, 'validateColor'), __('Accepts only hex color code', WDR_TEXT_DOMAIN));
151
- Validator::addRule('conditionValues', array(__CLASS__, 'validateConditionFields'), __('Invalid characters', WDR_TEXT_DOMAIN));
152
  //may contain
153
  $input_validator->rule('checkPlainInputText',
154
  array(
@@ -314,10 +314,10 @@ class Validation
314
  static function validateSettingsTabFields($post_values)
315
  {
316
  $settings_fields_validator = new Validator($post_values);
317
- Validator::addRule('basicTags', array(__CLASS__, 'validateBasicHtmlTags'), __('Invalid characters', WDR_TEXT_DOMAIN));
318
- Validator::addRule('radioButtonAndSelectBox', array(__CLASS__, 'validateRadioButtonAndSelectBox'), __('Accept only yes, on, 1, true', WDR_TEXT_DOMAIN));
319
- Validator::addRule('plainInputText', array(__CLASS__, 'validatePlainInputText'), __('Should not contain any tags', WDR_TEXT_DOMAIN));
320
- Validator::addRule('selectedArrayValues', array(__CLASS__, 'validateSelectedArrayValues'), __('Should not contain any tags and special characters', WDR_TEXT_DOMAIN));
321
  //allow br, strong, span,div, p tags only
322
  $settings_fields_validator->rule('basicTags',
323
  array(
@@ -440,7 +440,7 @@ class Validation
440
  static function validateReportTabFields($post_values)
441
  {
442
  $report_fields_validator = new Validator($post_values);
443
- Validator::addRule('reportFields', array(__CLASS__, 'validateReportFields'), __('Validation error', WDR_TEXT_DOMAIN));
444
  //Validation condition values
445
  $report_fields_validator->rule('reportFields',
446
  array(
@@ -466,7 +466,7 @@ class Validation
466
  static function validateStateCountryCondition($post_values)
467
  {
468
  $state_country_validator = new Validator($post_values);
469
- Validator::addRule('conditionValues', array(__CLASS__, 'validateConditionFields'), __('Invalid characters', WDR_TEXT_DOMAIN));
470
  //Validation condition values
471
  $state_country_validator->rule('conditionValues',
472
  array(
143
  static function validateRules($post_values)
144
  {
145
  $input_validator = new Validator($post_values);
146
+ Validator::addRule('basicTags', array(__CLASS__, 'validateBasicHtmlTags'), __('Invalid characters', 'woo-discount-rules'));
147
+ Validator::addRule('checkPlainInputText', array(__CLASS__, 'validatePlainInputText'), __('Accepts only letters a-z, numbers 0-9 and spaces with special characters', 'woo-discount-rules'));
148
+ Validator::addRule('float', array(__CLASS__, 'validateFloat'), __('Accepts only numbers 0-9 and one dot', 'woo-discount-rules'));
149
+ Validator::addRule('checked', array(__CLASS__, 'validateChecked'), __('Accepts only 0 or 1', 'woo-discount-rules'));
150
+ Validator::addRule('color', array(__CLASS__, 'validateColor'), __('Accepts only hex color code', 'woo-discount-rules'));
151
+ Validator::addRule('conditionValues', array(__CLASS__, 'validateConditionFields'), __('Invalid characters', 'woo-discount-rules'));
152
  //may contain
153
  $input_validator->rule('checkPlainInputText',
154
  array(
314
  static function validateSettingsTabFields($post_values)
315
  {
316
  $settings_fields_validator = new Validator($post_values);
317
+ Validator::addRule('basicTags', array(__CLASS__, 'validateBasicHtmlTags'), __('Invalid characters', 'woo-discount-rules'));
318
+ Validator::addRule('radioButtonAndSelectBox', array(__CLASS__, 'validateRadioButtonAndSelectBox'), __('Accept only yes, on, 1, true', 'woo-discount-rules'));
319
+ Validator::addRule('plainInputText', array(__CLASS__, 'validatePlainInputText'), __('Should not contain any tags', 'woo-discount-rules'));
320
+ Validator::addRule('selectedArrayValues', array(__CLASS__, 'validateSelectedArrayValues'), __('Should not contain any tags and special characters', 'woo-discount-rules'));
321
  //allow br, strong, span,div, p tags only
322
  $settings_fields_validator->rule('basicTags',
323
  array(
440
  static function validateReportTabFields($post_values)
441
  {
442
  $report_fields_validator = new Validator($post_values);
443
+ Validator::addRule('reportFields', array(__CLASS__, 'validateReportFields'), __('Validation error', 'woo-discount-rules'));
444
  //Validation condition values
445
  $report_fields_validator->rule('reportFields',
446
  array(
466
  static function validateStateCountryCondition($post_values)
467
  {
468
  $state_country_validator = new Validator($post_values);
469
+ Validator::addRule('conditionValues', array(__CLASS__, 'validateConditionFields'), __('Invalid characters', 'woo-discount-rules'));
470
  //Validation condition values
471
  $state_country_validator->rule('conditionValues',
472
  array(
v2/App/Helpers/Woocommerce.php CHANGED
@@ -731,7 +731,7 @@ class Woocommerce
731
  }, 10, 3);
732
  }
733
  $fee = apply_filters('advanced_discount_rules_discount_fee_amount', $fee, $name, $cart);
734
- $name = __($name, WDR_TEXT_DOMAIN);
735
  return $cart->add_fee($name, $fee);
736
  }
737
  }
@@ -937,13 +937,13 @@ class Woocommerce
937
  static function getWeekDaysList()
938
  {
939
  return array(
940
- 'sunday' => __('Sunday', WDR_TEXT_DOMAIN),
941
- 'monday' => __('Monday', WDR_TEXT_DOMAIN),
942
- 'tuesday' => __('Tuesday', WDR_TEXT_DOMAIN),
943
- 'wednesday' => __('Wednesday', WDR_TEXT_DOMAIN),
944
- 'thursday' => __('Thursday', WDR_TEXT_DOMAIN),
945
- 'friday' => __('Friday', WDR_TEXT_DOMAIN),
946
- 'saturday' => __('Saturday', WDR_TEXT_DOMAIN),
947
  );
948
  }
949
 
@@ -954,33 +954,33 @@ class Woocommerce
954
  static function getBannerPositionList()
955
  {
956
  $banner_hooks = array(
957
- 'woocommerce_before_main_content' => __('Woocommerce before main content(Archive / Shop / Cat Pages / single product)', WDR_TEXT_DOMAIN),
958
- 'woocommerce_archive_description' => __('Woocommerce archive description(Archive / Shop / Cat Pages)', WDR_TEXT_DOMAIN),
959
- 'woocommerce_before_shop_loop' => __('Woocommerce before shop loop(Archive / Shop / Cat Pages)', WDR_TEXT_DOMAIN),
960
- 'woocommerce_after_shop_loop' => __('Woocommerce after shop loop(Archive / Shop / Cat Pages)', WDR_TEXT_DOMAIN),
961
- 'woocommerce_after_main_content' => __('Woocommerce after main content(Archive / Shop / Cat Pages / single product)', WDR_TEXT_DOMAIN),
962
- 'woocommerce_before_single_product' => __('Woocommerce before single product', WDR_TEXT_DOMAIN),
963
- 'woocommerce_before_single_product_summary' => __('Woocommerce before single product summary', WDR_TEXT_DOMAIN),
964
- 'woocommerce_after_single_product_summary' => __('Woocommerce after single product summary', WDR_TEXT_DOMAIN),
965
- 'woocommerce_after_single_product' => __('Woocommerce after single product', WDR_TEXT_DOMAIN),
966
- 'woocommerce_before_cart' => __('Woocommerce before cart', WDR_TEXT_DOMAIN),
967
- 'woocommerce_before_cart_table' => __('Woocommerce before cart table', WDR_TEXT_DOMAIN),
968
- 'woocommerce_before_cart_contents' => __('Woocommerce before cart contents', WDR_TEXT_DOMAIN),
969
- 'woocommerce_cart_contents' => __('Woocommerce cart contents', WDR_TEXT_DOMAIN),
970
- 'woocommerce_after_cart_contents' => __('Woocommerce after cart contents', WDR_TEXT_DOMAIN),
971
- 'woocommerce_after_cart_table' => __('Woocommerce after cart table', WDR_TEXT_DOMAIN),
972
- 'woocommerce_after_cart' => __('Woocommerce after cart', WDR_TEXT_DOMAIN),
973
- 'woocommerce_before_checkout_form' => __('Woocommerce before checkout form', WDR_TEXT_DOMAIN),
974
- //'woocommerce_checkout_before_customer_details' => __('Woocommerce checkout before customer details', WDR_TEXT_DOMAIN),
975
- 'woocommerce_before_checkout_billing_form' => __('Woocommerce before checkout billing form', WDR_TEXT_DOMAIN),
976
- 'woocommerce_after_checkout_billing_form' => __('Woocommerce after checkout billing form', WDR_TEXT_DOMAIN),
977
- 'woocommerce_before_checkout_shipping_form' => __('Woocommerce before checkout shipping form', WDR_TEXT_DOMAIN),
978
- 'woocommerce_after_checkout_shipping_form' => __('Woocommerce after checkout shipping form', WDR_TEXT_DOMAIN),
979
- 'woocommerce_before_order_notes' => __('Woocommerce before order notes', WDR_TEXT_DOMAIN),
980
- 'woocommerce_after_order_notes' => __('Woocommerce after order notes', WDR_TEXT_DOMAIN),
981
- //'woocommerce_checkout_after_customer_details' => __('Woocommerce checkout after customer details', WDR_TEXT_DOMAIN),
982
- //'woocommerce_checkout_before_order_review' => __('Woocommerce checkout before order review', WDR_TEXT_DOMAIN),
983
- //'woocommerce_checkout_after_order_review' => __('Woocommerce checkout after order review', WDR_TEXT_DOMAIN),
984
  );
985
 
986
  return apply_filters('advanced_woo_discount_rules_get_banner_position_events', $banner_hooks);
731
  }, 10, 3);
732
  }
733
  $fee = apply_filters('advanced_discount_rules_discount_fee_amount', $fee, $name, $cart);
734
+ $name = __($name, 'woo-discount-rules');
735
  return $cart->add_fee($name, $fee);
736
  }
737
  }
937
  static function getWeekDaysList()
938
  {
939
  return array(
940
+ 'sunday' => __('Sunday', 'woo-discount-rules'),
941
+ 'monday' => __('Monday', 'woo-discount-rules'),
942
+ 'tuesday' => __('Tuesday', 'woo-discount-rules'),
943
+ 'wednesday' => __('Wednesday', 'woo-discount-rules'),
944
+ 'thursday' => __('Thursday', 'woo-discount-rules'),
945
+ 'friday' => __('Friday', 'woo-discount-rules'),
946
+ 'saturday' => __('Saturday', 'woo-discount-rules'),
947
  );
948
  }
949
 
954
  static function getBannerPositionList()
955
  {
956
  $banner_hooks = array(
957
+ 'woocommerce_before_main_content' => __('Woocommerce before main content(Archive / Shop / Cat Pages / single product)', 'woo-discount-rules'),
958
+ 'woocommerce_archive_description' => __('Woocommerce archive description(Archive / Shop / Cat Pages)', 'woo-discount-rules'),
959
+ 'woocommerce_before_shop_loop' => __('Woocommerce before shop loop(Archive / Shop / Cat Pages)', 'woo-discount-rules'),
960
+ 'woocommerce_after_shop_loop' => __('Woocommerce after shop loop(Archive / Shop / Cat Pages)', 'woo-discount-rules'),
961
+ 'woocommerce_after_main_content' => __('Woocommerce after main content(Archive / Shop / Cat Pages / single product)', 'woo-discount-rules'),
962
+ 'woocommerce_before_single_product' => __('Woocommerce before single product', 'woo-discount-rules'),
963
+ 'woocommerce_before_single_product_summary' => __('Woocommerce before single product summary', 'woo-discount-rules'),
964
+ 'woocommerce_after_single_product_summary' => __('Woocommerce after single product summary', 'woo-discount-rules'),
965
+ 'woocommerce_after_single_product' => __('Woocommerce after single product', 'woo-discount-rules'),
966
+ 'woocommerce_before_cart' => __('Woocommerce before cart', 'woo-discount-rules'),
967
+ 'woocommerce_before_cart_table' => __('Woocommerce before cart table', 'woo-discount-rules'),
968
+ 'woocommerce_before_cart_contents' => __('Woocommerce before cart contents', 'woo-discount-rules'),
969
+ 'woocommerce_cart_contents' => __('Woocommerce cart contents', 'woo-discount-rules'),
970
+ 'woocommerce_after_cart_contents' => __('Woocommerce after cart contents', 'woo-discount-rules'),
971
+ 'woocommerce_after_cart_table' => __('Woocommerce after cart table', 'woo-discount-rules'),
972
+ 'woocommerce_after_cart' => __('Woocommerce after cart', 'woo-discount-rules'),
973
+ 'woocommerce_before_checkout_form' => __('Woocommerce before checkout form', 'woo-discount-rules'),
974
+ //'woocommerce_checkout_before_customer_details' => __('Woocommerce checkout before customer details', 'woo-discount-rules'),
975
+ 'woocommerce_before_checkout_billing_form' => __('Woocommerce before checkout billing form', 'woo-discount-rules'),
976
+ 'woocommerce_after_checkout_billing_form' => __('Woocommerce after checkout billing form', 'woo-discount-rules'),
977
+ 'woocommerce_before_checkout_shipping_form' => __('Woocommerce before checkout shipping form', 'woo-discount-rules'),
978
+ 'woocommerce_after_checkout_shipping_form' => __('Woocommerce after checkout shipping form', 'woo-discount-rules'),
979
+ 'woocommerce_before_order_notes' => __('Woocommerce before order notes', 'woo-discount-rules'),
980
+ 'woocommerce_after_order_notes' => __('Woocommerce after order notes', 'woo-discount-rules'),
981
+ //'woocommerce_checkout_after_customer_details' => __('Woocommerce checkout after customer details', 'woo-discount-rules'),
982
+ //'woocommerce_checkout_before_order_review' => __('Woocommerce checkout before order review', 'woo-discount-rules'),
983
+ //'woocommerce_checkout_after_order_review' => __('Woocommerce checkout after order review', 'woo-discount-rules'),
984
  );
985
 
986
  return apply_filters('advanced_woo_discount_rules_get_banner_position_events', $banner_hooks);
v2/App/Models/DBTable.php CHANGED
@@ -146,6 +146,14 @@ class DBTable
146
  return apply_filters('advanced_woo_discount_rules_is_front_end_request_for_fetching_rules', $is_front_end_request);
147
  }
148
 
 
 
 
 
 
 
 
 
149
  /**
150
  * get all available rules
151
  * @param null $rule_id
146
  return apply_filters('advanced_woo_discount_rules_is_front_end_request_for_fetching_rules', $is_front_end_request);
147
  }
148
 
149
+ public function getRulesCount(){
150
+ global $wpdb;
151
+ $wpdb->hide_errors();
152
+
153
+ $rules_table_name = $wpdb->prefix . self::RULES_TABLE_NAME;
154
+ return $wpdb->get_var("SELECT COUNT(*) as total FROM {$rules_table_name};");
155
+ }
156
+
157
  /**
158
  * get all available rules
159
  * @param null $rule_id
v2/App/Router.php CHANGED
@@ -83,7 +83,8 @@ class Router
83
  add_filter('advanced_woo_discount_rules_get_order_total_you_saved_text', array(self::$manage_discount, 'displayTotalSavingsInOrderAfterOrderTotal'), 10,2);
84
 
85
  $show_subtotal_promotion = $manage_discount_class::$config->getConfig('show_subtotal_promotion', '');
86
- if($show_subtotal_promotion == 1){
 
87
  $show_promo_message = $manage_discount_class::$config->getConfig('show_promo_text', '');
88
  if(!empty($show_promo_message) && is_array($show_promo_message)){
89
  if(in_array('shop_page', $show_promo_message)){
@@ -101,7 +102,6 @@ class Router
101
  }
102
  }
103
  }
104
-
105
  /**
106
  * All hooks needed for front End
107
  */
83
  add_filter('advanced_woo_discount_rules_get_order_total_you_saved_text', array(self::$manage_discount, 'displayTotalSavingsInOrderAfterOrderTotal'), 10,2);
84
 
85
  $show_subtotal_promotion = $manage_discount_class::$config->getConfig('show_subtotal_promotion', '');
86
+ $show_cart_quantity_promotion = $manage_discount_class::$config->getConfig('show_cart_quantity_promotion', '');
87
+ if($show_subtotal_promotion == 1 || $show_cart_quantity_promotion == 1){
88
  $show_promo_message = $manage_discount_class::$config->getConfig('show_promo_text', '');
89
  if(!empty($show_promo_message) && is_array($show_promo_message)){
90
  if(in_array('shop_page', $show_promo_message)){
102
  }
103
  }
104
  }
 
105
  /**
106
  * All hooks needed for front End
107
  */
v2/App/Views/Admin/Menu.php CHANGED
@@ -30,7 +30,7 @@
30
  ?>
31
  <span class="awdr_rebuild_on_sale_rule_page_con<?php echo $additional_class_for_rebuild; ?>">
32
  <button type="button" class="btn btn-danger"
33
- id="awdr_rebuild_on_sale_list_on_rule_page" data-awdr_nonce="<?php echo \Wdr\App\Helpers\Helper::create_nonce('wdr_ajax_rule_build_index'); ?>"><?php esc_html_e('Rebuild index', WDR_TEXT_DOMAIN); ?></button>
34
  </span>
35
  <?php
36
  }
30
  ?>
31
  <span class="awdr_rebuild_on_sale_rule_page_con<?php echo $additional_class_for_rebuild; ?>">
32
  <button type="button" class="btn btn-danger"
33
+ id="awdr_rebuild_on_sale_list_on_rule_page" data-awdr_nonce="<?php echo \Wdr\App\Helpers\Helper::create_nonce('wdr_ajax_rule_build_index'); ?>"><?php esc_html_e('Rebuild index', 'woo-discount-rules'); ?></button>
34
  </span>
35
  <?php
36
  }
v2/App/Views/Admin/Rules/Conditions/Cart/LineItemCount.php CHANGED
@@ -9,25 +9,25 @@ echo ($render_saved_condition == true) ? '' : '<div class="cart_line_items_count
9
  <div class="wdr_cart_line_item_count_group wdr-condition-type-options">
10
  <div class="wdr-cart-subtotal wdr-select-filed-hight">
11
  <select name="conditions[<?php echo (isset($i)) ? $i : '{i}' ?>][options][operator]" class="awdr-left-align">
12
- <option value="less_than" <?php echo ($operator == "less_than") ? "selected" : ""; ?>><?php _e('Less than ( &lt; )', WDR_TEXT_DOMAIN) ?></option>
13
- <option value="less_than_or_equal" <?php echo ($operator == "less_than_or_equal") ? "selected" : ""; ?>><?php _e('Less than or equal ( &lt;= )', WDR_TEXT_DOMAIN) ?></option>
14
- <option value="greater_than_or_equal" <?php echo ($operator == "greater_than_or_equal") ? "selected" : ""; ?>><?php _e('Greater than or equal ( &gt;= )', WDR_TEXT_DOMAIN) ?></option>
15
- <option value="greater_than" <?php echo ($operator == "greater_than") ? "selected" : ""; ?>><?php _e('Greater than ( &gt; )', WDR_TEXT_DOMAIN) ?></option>
16
  </select>
17
- <span class="wdr_desc_text awdr-clear-both"><?php _e('Line item count should be', WDR_TEXT_DOMAIN); ?></span>
18
  </div>
19
 
20
  <div class="cart-subtotal-value wdr-input-filed-hight">
21
  <input name="conditions[<?php echo (isset($i)) ? $i : '{i}' ?>][options][value]" type="text" class="float_only_field awdr-left-align"
22
- value="<?php echo (isset($options->value)) ? $options->value : '' ?>" placeholder="<?php _e('1', WDR_TEXT_DOMAIN);?>">
23
- <span class="wdr_desc_text awdr-clear-both"><?php _e('Line item count', WDR_TEXT_DOMAIN); ?></span>
24
  </div>
25
  <div class="cart-subtotal-methods wdr-select-filed-hight">
26
  <select name="conditions[<?php echo (isset($i)) ? $i : '{i}' ?>][options][calculate_from]" class="calculate_cart_from awdr-left-align">
27
- <option value="from_cart" <?php echo ($calculate_from == "from_cart") ? "selected" : ""; ?>><?php _e('Count all items in cart', WDR_TEXT_DOMAIN) ?></option>
28
- <option value="from_filter" <?php echo ($calculate_from == "from_filter") ? "selected" : ""; ?>><?php _e('Only count items chosen in the filters set for this rule', WDR_TEXT_DOMAIN) ?></option>
29
  </select>
30
- <span class="wdr_desc_text awdr-clear-both "><?php _e('How to calculate the line item count', WDR_TEXT_DOMAIN); ?></span>
31
  </div>
32
  </div>
33
  <?php echo ($render_saved_condition == true) ? '' : '</div>'; ?>
9
  <div class="wdr_cart_line_item_count_group wdr-condition-type-options">
10
  <div class="wdr-cart-subtotal wdr-select-filed-hight">
11
  <select name="conditions[<?php echo (isset($i)) ? $i : '{i}' ?>][options][operator]" class="awdr-left-align">
12
+ <option value="less_than" <?php echo ($operator == "less_than") ? "selected" : ""; ?>><?php _e('Less than ( &lt; )', 'woo-discount-rules') ?></option>
13
+ <option value="less_than_or_equal" <?php echo ($operator == "less_than_or_equal") ? "selected" : ""; ?>><?php _e('Less than or equal ( &lt;= )', 'woo-discount-rules') ?></option>
14
+ <option value="greater_than_or_equal" <?php echo ($operator == "greater_than_or_equal") ? "selected" : ""; ?>><?php _e('Greater than or equal ( &gt;= )', 'woo-discount-rules') ?></option>
15
+ <option value="greater_than" <?php echo ($operator == "greater_than") ? "selected" : ""; ?>><?php _e('Greater than ( &gt; )', 'woo-discount-rules') ?></option>
16
  </select>
17
+ <span class="wdr_desc_text awdr-clear-both"><?php _e('Line item count should be', 'woo-discount-rules'); ?></span>
18
  </div>
19
 
20
  <div class="cart-subtotal-value wdr-input-filed-hight">
21
  <input name="conditions[<?php echo (isset($i)) ? $i : '{i}' ?>][options][value]" type="text" class="float_only_field awdr-left-align"
22
+ value="<?php echo (isset($options->value)) ? $options->value : '' ?>" placeholder="<?php _e('1', 'woo-discount-rules');?>">
23
+ <span class="wdr_desc_text awdr-clear-both"><?php _e('Line item count', 'woo-discount-rules'); ?></span>
24
  </div>
25
  <div class="cart-subtotal-methods wdr-select-filed-hight">
26
  <select name="conditions[<?php echo (isset($i)) ? $i : '{i}' ?>][options][calculate_from]" class="calculate_cart_from awdr-left-align">
27
+ <option value="from_cart" <?php echo ($calculate_from == "from_cart") ? "selected" : ""; ?>><?php _e('Count all items in cart', 'woo-discount-rules') ?></option>
28
+ <option value="from_filter" <?php echo ($calculate_from == "from_filter") ? "selected" : ""; ?>><?php _e('Only count items chosen in the filters set for this rule', 'woo-discount-rules') ?></option>
29
  </select>
30
+ <span class="wdr_desc_text awdr-clear-both "><?php _e('How to calculate the line item count', 'woo-discount-rules'); ?></span>
31
  </div>
32
  </div>
33
  <?php echo ($render_saved_condition == true) ? '' : '</div>'; ?>
v2/App/Views/Admin/Rules/Conditions/Cart/Subtotal.php CHANGED
@@ -10,26 +10,26 @@ echo ($render_saved_condition == true) ? '' : '<div class="cart_subtotal">';
10
  <div class="wdr_cart_subtotal_group">
11
  <div class="cart-subtotal-methods wdr-select-filed-hight">
12
  <select name="conditions[<?php echo (isset($i)) ? $i : '{i}' ?>][options][operator]" class="awdr-left-align subtotal_operator">
13
- <option value="less_than" <?php echo ($operator == "less_than") ? "selected" : ""; ?>><?php _e('Less than ( &lt; )', WDR_TEXT_DOMAIN) ?></option>
14
- <option value="less_than_or_equal" <?php echo ($operator == "less_than_or_equal") ? "selected" : ""; ?>><?php _e('Less than or equal ( &lt;= )', WDR_TEXT_DOMAIN) ?></option>
15
- <option value="greater_than_or_equal" <?php echo ($operator == "greater_than_or_equal") ? "selected" : ""; ?>><?php _e('Greater than or equal ( &gt;= )', WDR_TEXT_DOMAIN) ?></option>
16
- <option value="greater_than" <?php echo ($operator == "greater_than") ? "selected" : ""; ?>><?php _e('Greater than ( &gt; )', WDR_TEXT_DOMAIN) ?></option>
17
  </select>
18
- <span class="wdr_desc_text awdr-clear-both"><?php _e('Subtotal should be', WDR_TEXT_DOMAIN); ?></span>
19
  </div>
20
 
21
  <div class="cart-subtotal-value wdr-input-filed-hight">
22
  <input name="conditions[<?php echo (isset($i)) ? $i : '{i}' ?>][options][value]" type="text" class="float_only_field awdr-left-align"
23
- value="<?php echo (isset($options->value)) ? $options->value : '' ?>" placeholder="<?php _e('0.00', WDR_TEXT_DOMAIN);?>" min="0">
24
- <span class="wdr_desc_text awdr-clear-both"><?php _e('Subtotal Amount ', WDR_TEXT_DOMAIN); ?></span>
25
  </div>
26
 
27
  <div class="cart-subtotal-methods wdr-select-filed-hight">
28
  <select name="conditions[<?php echo (isset($i)) ? $i : '{i}' ?>][options][calculate_from]" class="calculate_cart_from awdr-left-align">
29
- <option value="from_cart" <?php echo ($calculate_from == "from_cart") ? "selected" : ""; ?>><?php _e('Count all items in cart', WDR_TEXT_DOMAIN) ?></option>
30
- <option value="from_filter" <?php echo ($calculate_from == "from_filter") ? "selected" : ""; ?>><?php _e('Only count items chosen in the filters set for this rule', WDR_TEXT_DOMAIN) ?></option>
31
  </select>
32
- <span class="wdr_desc_text awdr-clear-both "><?php _e('How to calculate the subtotal', WDR_TEXT_DOMAIN); ?></span>
33
  </div>
34
  </div>
35
  </div>
10
  <div class="wdr_cart_subtotal_group">
11
  <div class="cart-subtotal-methods wdr-select-filed-hight">
12
  <select name="conditions[<?php echo (isset($i)) ? $i : '{i}' ?>][options][operator]" class="awdr-left-align subtotal_operator">
13
+ <option value="less_than" <?php echo ($operator == "less_than") ? "selected" : ""; ?>><?php _e('Less than ( &lt; )', 'woo-discount-rules') ?></option>
14
+ <option value="less_than_or_equal" <?php echo ($operator == "less_than_or_equal") ? "selected" : ""; ?>><?php _e('Less than or equal ( &lt;= )', 'woo-discount-rules') ?></option>
15
+ <option value="greater_than_or_equal" <?php echo ($operator == "greater_than_or_equal") ? "selected" : ""; ?>><?php _e('Greater than or equal ( &gt;= )', 'woo-discount-rules') ?></option>
16
+ <option value="greater_than" <?php echo ($operator == "greater_than") ? "selected" : ""; ?>><?php _e('Greater than ( &gt; )', 'woo-discount-rules') ?></option>
17
  </select>
18
+ <span class="wdr_desc_text awdr-clear-both"><?php _e('Subtotal should be', 'woo-discount-rules'); ?></span>
19
  </div>
20
 
21
  <div class="cart-subtotal-value wdr-input-filed-hight">
22
  <input name="conditions[<?php echo (isset($i)) ? $i : '{i}' ?>][options][value]" type="text" class="float_only_field awdr-left-align"
23
+ value="<?php echo (isset($options->value)) ? $options->value : '' ?>" placeholder="<?php _e('0.00', 'woo-discount-rules');?>" min="0">
24
+ <span class="wdr_desc_text awdr-clear-both"><?php _e('Subtotal Amount ', 'woo-discount-rules'); ?></span>
25
  </div>
26
 
27
  <div class="cart-subtotal-methods wdr-select-filed-hight">
28
  <select name="conditions[<?php echo (isset($i)) ? $i : '{i}' ?>][options][calculate_from]" class="calculate_cart_from awdr-left-align">
29
+ <option value="from_cart" <?php echo ($calculate_from == "from_cart") ? "selected" : ""; ?>><?php _e('Count all items in cart', 'woo-discount-rules') ?></option>
30
+ <option value="from_filter" <?php echo ($calculate_from == "from_filter") ? "selected" : ""; ?>><?php _e('Only count items chosen in the filters set for this rule', 'woo-discount-rules') ?></option>
31
  </select>
32
+ <span class="wdr_desc_text awdr-clear-both "><?php _e('How to calculate the subtotal', 'woo-discount-rules'); ?></span>
33
  </div>
34
  </div>
35
  </div>
v2/App/Views/Admin/Rules/Conditions/Main.php CHANGED
@@ -5,9 +5,10 @@ use Wdr\App\Helpers\Helper;
5
  if (!defined('ABSPATH')) {
6
  exit; // Exit if accessed directly
7
  }
 
8
  ?>
9
  <div class="wdr-rule-menu">
10
- <h2><?php _e('Rules (Optional)', WDR_TEXT_DOMAIN); ?> - <span><a href="https://docs.flycart.org/en/articles/3834240-conditions-rules?utm_source=woo-discount-rules-v2&utm_campaign=doc&utm_medium=text-click&utm_content=rule_condition" target="_blank" style="font-size: 12px;"><?php _e('Read Docs', WDR_TEXT_DOMAIN); ?></a></span></h2>
11
  <div class="awdr-rules-content">
12
  <?php echo Helper::ruleConditionDescription();?>
13
  </div>
@@ -21,12 +22,12 @@ if (!defined('ABSPATH')) {
21
  <div class="wdr-condition-template">
22
  <div class="wdr-block">
23
  <div class="wdr-conditions-relationship">
24
- <label><b><?php _e('Conditions Relationship ', WDR_TEXT_DOMAIN); ?></b></label>&nbsp;&nbsp;&nbsp;&nbsp;
25
  <label><input type="radio" name="additional[condition_relationship]"
26
  value="and" <?php echo ($condition_relationship == 'and') ? 'checked' : '' ?>
27
- ><?php _e('Match All', WDR_TEXT_DOMAIN); ?></label>
28
  <label><input type="radio" name="additional[condition_relationship]"
29
- value="or" <?php echo ($condition_relationship == 'or') ? 'checked' : '' ?>><?php _e('Match Any', WDR_TEXT_DOMAIN); ?>
30
  </label>
31
  </div>
32
  <div class="wdr-condition-group-items">
@@ -53,7 +54,7 @@ if (!defined('ABSPATH')) {
53
  foreach ($wdr_product_conditions as $wdr_condition_key => $wdr_condition_value) {
54
  ?>
55
  <optgroup
56
- label="<?php _e($wdr_condition_key, WDR_TEXT_DOMAIN); ?>"><?php
57
  foreach ($wdr_condition_value as $key => $value) {?>
58
  <option class="<?php echo ($awdr_discount_type != 'wdr_free_shipping' && $key == 'cart_item_product_onsale') ? 'wdr-hide awdr-free-shipping-special-condition' : 'awdr-free-shipping-special-condition'; ?>"
59
  <?php
@@ -69,13 +70,13 @@ if (!defined('ABSPATH')) {
69
  ?>
70
  <?php if ($key == $type) {
71
  echo 'selected';
72
- } ?>><?php _e($value['label'], WDR_TEXT_DOMAIN); ?></option><?php
73
  } ?>
74
  </optgroup><?php
75
  }
76
  } ?>
77
  </select>
78
- <span class="wdr_desc_text awdr-clear-both"><?php _e('Condition Type', WDR_TEXT_DOMAIN); ?></span>
79
  </div><?php
80
  extract($extra_params);
81
  $render_saved_condition = true;
@@ -89,6 +90,7 @@ if (!defined('ABSPATH')) {
89
  </div><?php
90
  $config = new \Wdr\App\Controllers\Configuration();
91
  $subtotal_promo = $config->getConfig("show_subtotal_promotion", '');
 
92
  $type_promotion = isset($condition->type) ? $condition->type : NULL;
93
  if($type_promotion == 'cart_subtotal' && $subtotal_promo == 1){
94
  $operator = isset($options->operator) ? $options->operator : 'greater_than_or_equal';?>
@@ -96,7 +98,12 @@ if (!defined('ABSPATH')) {
96
  <?php include(WDR_PLUGIN_PATH . 'App/Views/Admin/Rules/Others/SubtotalPromotion.php'); ?>
97
  </div>
98
  <?php
99
-
 
 
 
 
 
100
  }
101
  $i++;
102
  }
@@ -106,7 +113,7 @@ if (!defined('ABSPATH')) {
106
  </div>
107
  <div class="add-condition add-condition-and-filters">
108
  <button type="button"
109
- class="button add-product-condition"><?php _e('Add condition', WDR_TEXT_DOMAIN); ?></button>
110
  </div>
111
  </div>
112
  </div><?php
@@ -114,11 +121,11 @@ if (!defined('ABSPATH')) {
114
  <div class="wdr-condition-template">
115
  <div class="wdr-block">
116
  <div class="wdr-conditions-relationship">
117
- <label><b><?php _e('Conditions Relationship', WDR_TEXT_DOMAIN); ?></b></label>&nbsp;&nbsp;&nbsp;&nbsp;
118
  <label><input type="radio" name="additional[condition_relationship]"
119
- value="and" checked><?php _e('Match All', WDR_TEXT_DOMAIN); ?></label>
120
  <label><input type="radio" name="additional[condition_relationship]"
121
- value="or"><?php _e('Match Any', WDR_TEXT_DOMAIN); ?>
122
  </label>
123
  </div>
124
  <div class="wdr-condition-group-items">
@@ -126,7 +133,7 @@ if (!defined('ABSPATH')) {
126
  </div>
127
  <div class="wdp-block add-condition">
128
  <button type="button"
129
- class="button add-product-condition"><?php _e('Add condition', WDR_TEXT_DOMAIN); ?></button>
130
  </div>
131
  </div>
132
  </div>
@@ -138,12 +145,12 @@ if (!defined('ABSPATH')) {
138
  <div class="wdr-conditions-relationship"><?php
139
  $usage_limits = $rule->getUsageLimits();
140
  $used_limits = $rule->getUsedLimits(); ?>
141
- <label><b><?php _e('Rule Limits', WDR_TEXT_DOMAIN); ?></b>
142
  <span class="awdr-rule-limit-timestamp"><?php
143
- if(!empty($current_time)) echo sprintf(esc_html__('Current date and time: %s', WDR_TEXT_DOMAIN), '<b>' . date('Y-m-d H:i', $current_time) . '</b>'); ?>
144
  </span>
145
  <span class="awdr-rule-limit-timestamp usage-limits-display" style="<?php echo ($usage_limits == 0) ? 'display:none;' : ''; ?>"> <?php
146
- _e('Rule Used: ', WDR_TEXT_DOMAIN);
147
  echo "<b class='awdr-used-limit-total'>".$used_limits."</b>"; ?>
148
  </span>
149
  </label>
@@ -153,14 +160,14 @@ if (!defined('ABSPATH')) {
153
  <div class="wdr-rule-setting">
154
  <div class="wdr-apply-to" style="float:left;">
155
  <select class="wdr-title" id="select_usage_limits" name="usage_limits">
156
- <option value="0" <?php echo ($usage_limits == 0) ? 'selected' : ''; ?>><?php _e('Unlimited', WDR_TEXT_DOMAIN); ?></option><?php
157
  for ($limit = 1; $limit <= 20; $limit++) {
158
  ?>
159
  <option
160
- value="<?php echo $limit; ?>" <?php echo ($usage_limits == $limit) ? 'selected' : ''; ?>><?php _e($limit, WDR_TEXT_DOMAIN); ?></option><?php
161
  } ?>
162
  </select><span
163
- class="wdr_desc_text"><?php _e('Maximum usage limit', WDR_TEXT_DOMAIN); ?></span>
164
  </div>
165
  <div class="wdr-rule-date-valid">
166
  <div class="wdr-dateandtime-value">
@@ -168,23 +175,23 @@ if (!defined('ABSPATH')) {
168
  name="date_from"
169
  class="wdr-condition-date wdr-title"
170
  data-class="start_datetimeonly"
171
- placeholder="<?php _e('Rule Vaild From', WDR_TEXT_DOMAIN); ?>"
172
  data-field="date"
173
  autocomplete="off"
174
  id="rule_datetime_from"
175
  value="<?php echo $rule->getStartDate(false, 'Y-m-d H:i'); ?>">
176
- <span class="wdr_desc_text"><?php _e('Vaild from', WDR_TEXT_DOMAIN); ?></span>
177
  </div>
178
  <div class="wdr-dateandtime-value">
179
  <input type="text"
180
  name="date_to"
181
  class="wdr-condition-date wdr-title"
182
  data-class="end_datetimeonly"
183
- placeholder="<?php _e('Rule Valid To', WDR_TEXT_DOMAIN); ?>"
184
  data-field="date" autocomplete="off"
185
  id="rule_datetime_to"
186
  value="<?php echo $rule->getEndDate(false, 'Y-m-d H:i'); ?>">
187
- <span class="wdr_desc_text"><?php _e('Vaild to', WDR_TEXT_DOMAIN); ?></span>
188
  </div>
189
  </div>
190
  <?php
@@ -195,7 +202,7 @@ if (!defined('ABSPATH')) {
195
  class="edit-preloaded-values"
196
  data-list="site_languages"
197
  data-field="preloaded"
198
- data-placeholder="<?php _e('Select values', WDR_TEXT_DOMAIN) ?>"
199
  name="rule_language[]"><?php
200
  $chosen_languages = $rule->getLanguages();
201
  foreach ($site_languages as $language_key => $name) {
@@ -208,7 +215,7 @@ if (!defined('ABSPATH')) {
208
  }
209
  ?>
210
  </select>
211
- <span class="wdr_desc_text"><?php _e('Language', WDR_TEXT_DOMAIN); ?></span>
212
  </div>
213
  <?php
214
  } ?>
5
  if (!defined('ABSPATH')) {
6
  exit; // Exit if accessed directly
7
  }
8
+ $is_pro = \Wdr\App\Helpers\Helper::hasPro();
9
  ?>
10
  <div class="wdr-rule-menu">
11
+ <h2><?php _e('Rules (Optional)', 'woo-discount-rules'); ?> - <span><a href="https://docs.flycart.org/en/articles/3834240-conditions-rules?utm_source=woo-discount-rules-v2&utm_campaign=doc&utm_medium=text-click&utm_content=rule_condition" target="_blank" style="font-size: 12px;"><?php _e('Read Docs', 'woo-discount-rules'); ?></a></span></h2>
12
  <div class="awdr-rules-content">
13
  <?php echo Helper::ruleConditionDescription();?>
14
  </div>
22
  <div class="wdr-condition-template">
23
  <div class="wdr-block">
24
  <div class="wdr-conditions-relationship">
25
+ <label><b><?php _e('Conditions Relationship ', 'woo-discount-rules'); ?></b></label>&nbsp;&nbsp;&nbsp;&nbsp;
26
  <label><input type="radio" name="additional[condition_relationship]"
27
  value="and" <?php echo ($condition_relationship == 'and') ? 'checked' : '' ?>
28
+ ><?php _e('Match All', 'woo-discount-rules'); ?></label>
29
  <label><input type="radio" name="additional[condition_relationship]"
30
+ value="or" <?php echo ($condition_relationship == 'or') ? 'checked' : '' ?>><?php _e('Match Any', 'woo-discount-rules'); ?>
31
  </label>
32
  </div>
33
  <div class="wdr-condition-group-items">
54
  foreach ($wdr_product_conditions as $wdr_condition_key => $wdr_condition_value) {
55
  ?>
56
  <optgroup
57
+ label="<?php _e($wdr_condition_key, 'woo-discount-rules'); ?>"><?php
58
  foreach ($wdr_condition_value as $key => $value) {?>
59
  <option class="<?php echo ($awdr_discount_type != 'wdr_free_shipping' && $key == 'cart_item_product_onsale') ? 'wdr-hide awdr-free-shipping-special-condition' : 'awdr-free-shipping-special-condition'; ?>"
60
  <?php
70
  ?>
71
  <?php if ($key == $type) {
72
  echo 'selected';
73
+ } ?>><?php _e($value['label'], 'woo-discount-rules'); ?></option><?php
74
  } ?>
75
  </optgroup><?php
76
  }
77
  } ?>
78
  </select>
79
+ <span class="wdr_desc_text awdr-clear-both"><?php _e('Condition Type', 'woo-discount-rules'); ?></span>
80
  </div><?php
81
  extract($extra_params);
82
  $render_saved_condition = true;
90
  </div><?php
91
  $config = new \Wdr\App\Controllers\Configuration();
92
  $subtotal_promo = $config->getConfig("show_subtotal_promotion", '');
93
+ $cart_quantity_promo = $config->getConfig("show_cart_quantity_promotion", '');
94
  $type_promotion = isset($condition->type) ? $condition->type : NULL;
95
  if($type_promotion == 'cart_subtotal' && $subtotal_promo == 1){
96
  $operator = isset($options->operator) ? $options->operator : 'greater_than_or_equal';?>
98
  <?php include(WDR_PLUGIN_PATH . 'App/Views/Admin/Rules/Others/SubtotalPromotion.php'); ?>
99
  </div>
100
  <?php
101
+ }else if($type_promotion == 'cart_items_quantity' && $cart_quantity_promo == 1 && $is_pro){
102
+ $operator = isset($options->operator) ? $options->operator : 'greater_than_or_equal';?>
103
+ <div class="wdr-grid wdr-conditions-container wdr-condition-group <?php echo 'promo_show_hide_'.$i; ?>" data-index="<?php echo $i; ?>" style="<?php echo ($operator == 'greater_than_or_equal' || $operator == 'greater_than') ? '': 'display: none'; ?>">
104
+ <?php include(WDR_PLUGIN_PATH . 'App/Views/Admin/Rules/Others/QuantityPromotion.php'); ?>
105
+ </div>
106
+ <?php
107
  }
108
  $i++;
109
  }
113
  </div>
114
  <div class="add-condition add-condition-and-filters">
115
  <button type="button"
116
+ class="button add-product-condition"><?php _e('Add condition', 'woo-discount-rules'); ?></button>
117
  </div>
118
  </div>
119
  </div><?php
121
  <div class="wdr-condition-template">
122
  <div class="wdr-block">
123
  <div class="wdr-conditions-relationship">
124
+ <label><b><?php _e('Conditions Relationship', 'woo-discount-rules'); ?></b></label>&nbsp;&nbsp;&nbsp;&nbsp;
125
  <label><input type="radio" name="additional[condition_relationship]"
126
+ value="and" checked><?php _e('Match All', 'woo-discount-rules'); ?></label>
127
  <label><input type="radio" name="additional[condition_relationship]"
128
+ value="or"><?php _e('Match Any', 'woo-discount-rules'); ?>
129
  </label>
130
  </div>
131
  <div class="wdr-condition-group-items">
133
  </div>
134
  <div class="wdp-block add-condition">
135
  <button type="button"
136
+ class="button add-product-condition"><?php _e('Add condition', 'woo-discount-rules'); ?></button>
137
  </div>
138
  </div>
139
  </div>
145
  <div class="wdr-conditions-relationship"><?php
146
  $usage_limits = $rule->getUsageLimits();
147
  $used_limits = $rule->getUsedLimits(); ?>
148
+ <label><b><?php _e('Rule Limits', 'woo-discount-rules'); ?></b>
149
  <span class="awdr-rule-limit-timestamp"><?php
150
+ if(!empty($current_time)) echo sprintf(esc_html__('Current date and time: %s', 'woo-discount-rules'), '<b>' . date('Y-m-d H:i', $current_time) . '</b>'); ?>
151
  </span>
152
  <span class="awdr-rule-limit-timestamp usage-limits-display" style="<?php echo ($usage_limits == 0) ? 'display:none;' : ''; ?>"> <?php
153
+ _e('Rule Used: ', 'woo-discount-rules');
154
  echo "<b class='awdr-used-limit-total'>".$used_limits."</b>"; ?>
155
  </span>
156
  </label>
160
  <div class="wdr-rule-setting">
161
  <div class="wdr-apply-to" style="float:left;">
162
  <select class="wdr-title" id="select_usage_limits" name="usage_limits">
163
+ <option value="0" <?php echo ($usage_limits == 0) ? 'selected' : ''; ?>><?php _e('Unlimited', 'woo-discount-rules'); ?></option><?php
164
  for ($limit = 1; $limit <= 20; $limit++) {
165
  ?>
166
  <option
167
+ value="<?php echo $limit; ?>" <?php echo ($usage_limits == $limit) ? 'selected' : ''; ?>><?php _e($limit, 'woo-discount-rules'); ?></option><?php
168
  } ?>
169
  </select><span
170
+ class="wdr_desc_text"><?php _e('Maximum usage limit', 'woo-discount-rules'); ?></span>
171
  </div>
172
  <div class="wdr-rule-date-valid">
173
  <div class="wdr-dateandtime-value">
175
  name="date_from"
176
  class="wdr-condition-date wdr-title"
177
  data-class="start_datetimeonly"
178
+ placeholder="<?php _e('Rule Vaild From', 'woo-discount-rules'); ?>"
179
  data-field="date"
180
  autocomplete="off"
181
  id="rule_datetime_from"
182
  value="<?php echo $rule->getStartDate(false, 'Y-m-d H:i'); ?>">
183
+ <span class="wdr_desc_text"><?php _e('Vaild from', 'woo-discount-rules'); ?></span>
184
  </div>
185
  <div class="wdr-dateandtime-value">
186
  <input type="text"
187
  name="date_to"
188
  class="wdr-condition-date wdr-title"
189
  data-class="end_datetimeonly"
190
+ placeholder="<?php _e('Rule Valid To', 'woo-discount-rules'); ?>"
191
  data-field="date" autocomplete="off"
192
  id="rule_datetime_to"
193
  value="<?php echo $rule->getEndDate(false, 'Y-m-d H:i'); ?>">
194
+ <span class="wdr_desc_text"><?php _e('Vaild to', 'woo-discount-rules'); ?></span>
195
  </div>
196
  </div>
197
  <?php
202
  class="edit-preloaded-values"
203
  data-list="site_languages"
204
  data-field="preloaded"
205
+ data-placeholder="<?php _e('Select values', 'woo-discount-rules') ?>"
206
  name="rule_language[]"><?php
207
  $chosen_languages = $rule->getLanguages();
208
  foreach ($site_languages as $language_key => $name) {
215
  }
216
  ?>
217
  </select>
218
+ <span class="wdr_desc_text"><?php _e('Language', 'woo-discount-rules'); ?></span>
219
  </div>
220
  <?php
221
  } ?>
v2/App/Views/Admin/Rules/DiscountBatch/Main.php CHANGED
@@ -7,19 +7,19 @@ if (!defined('ABSPATH')) {
7
  }
8
  $is_pro = Helper::hasPro();
9
  ?>
10
- <button class="awdr-accordion <?php echo ($badge_display) ? 'awdr-accordion-active' : ''; ?>"><?php _e("Discount Bar (optional) - Display discount information", WDR_TEXT_DOMAIN); ?></button>
11
  <div class="awdr-discount-batch-container awdr-accordion-panel"
12
  style="<?php echo ($badge_display) ? 'display: block;' : ''; ?>">
13
  <div class="awdr-discount-batch-row">
14
  <div class="wdr-rule-filters-and-options-con">
15
  <div class="wdr-rule-menu">
16
  <div class="awdr-discount-bar-content">
17
- <p><?php _e("It helps to display discount information in product pages.", WDR_TEXT_DOMAIN); ?> <a href="https://docs.flycart.org/en/articles/3946529-discount-bar?utm_source=woo-discount-rules-v2&utm_campaign=doc&utm_medium=text-click&utm_content=dicount_bar_inner" target="_blank" ><?php _e("Read docs.", WDR_TEXT_DOMAIN); ?></a> </p>
18
- <b><?php _e('Preview', WDR_TEXT_DOMAIN); ?></b><br><br>
19
  <div class="awdr_admin_discount_bar awdr_row_0" style="background-color:<?php echo ($badge_bg_color) ? $badge_bg_color : '#ffffff' ?>;color:<?php echo ($badge_text_color) ? $badge_text_color : '#000000' ?>;">
20
  <?php echo ($badge_text) ? $badge_text : 'Discount Text'; ?>
21
  </div>
22
- <p><b><?php _e('Note:', WDR_TEXT_DOMAIN); ?></b><?php _e('Preview contains sample result for original result see product page.', WDR_TEXT_DOMAIN); ?></p>
23
  </div>
24
  </div>
25
  <div class="wdr-rule-options-con">
@@ -32,30 +32,30 @@ $is_pro = Helper::hasPro();
32
  <tr>
33
  <td scope="row">
34
  <label for=""
35
- class="awdr-left-align"><b><?php _e('Show Discount Bar?', WDR_TEXT_DOMAIN); ?></b></label>
36
- <span class="wdr_desc_text awdr-clear-both"><?php _e('Show/hide discount bar on product pages', WDR_TEXT_DOMAIN); ?></span>
37
  </td>
38
  <td>
39
  <?php if($is_pro) { ?>
40
  <input type="radio" name="discount_badge[display]"
41
  id="show_applied_rules_message_on_cart"
42
  value="1" <?php echo ($badge_display) ? 'checked' : ''; ?>><label
43
- for="show_applied_rules_message_on_cart"><?php _e('Yes', WDR_TEXT_DOMAIN); ?></label>
44
 
45
  <input type="radio"
46
  name="discount_badge[display]" <?php echo (!$badge_display) ? 'checked' : ''; ?>
47
  id="dont_show_applied_rules_message_on_cart" value="0"><label
48
- for="dont_show_applied_rules_message_on_cart"><?php _e('No', WDR_TEXT_DOMAIN); ?></label>
49
  <?php } else {
50
- _e("Unlock this feature by <a href='https://www.flycart.org/products/wordpress/woocommerce-discount-rules' target='_blank'>Upgrading to Pro</a>", WDR_TEXT_DOMAIN);
51
  } ?>
52
  </td>
53
  </tr>
54
  <tr>
55
  <td scope="row">
56
  <label for=""
57
- class="awdr-left-align"><b><?php _e('Badge Background Color', WDR_TEXT_DOMAIN); ?></b></label>
58
- <span class="wdr_desc_text awdr-clear-both"><?php _e('Choose background color to be shown in product pages.', WDR_TEXT_DOMAIN); ?></span>
59
  </td>
60
  <td>
61
  <?php if($is_pro) { ?>
@@ -68,15 +68,15 @@ $is_pro = Helper::hasPro();
68
  value="<?php echo ($badge_bg_color) ? $badge_bg_color : '#ffffff'; ?>"
69
  id="badge_hexcolor" class="wdr_color_picker">
70
  <?php } else {
71
- _e("Unlock this feature by <a href='https://www.flycart.org/products/wordpress/woocommerce-discount-rules' target='_blank'>Upgrading to Pro</a>", WDR_TEXT_DOMAIN);
72
  } ?>
73
  </td>
74
  </tr>
75
  <tr>
76
  <td scope="row">
77
  <label for=""
78
- class="awdr-left-align"><b><?php _e('Badge Text Color', WDR_TEXT_DOMAIN); ?></b></label>
79
- <span class="wdr_desc_text awdr-clear-both"><?php _e('Choose text color to be shown in product pages.', WDR_TEXT_DOMAIN); ?></span>
80
  </td>
81
  <td>
82
  <?php if($is_pro) { ?>
@@ -89,7 +89,7 @@ $is_pro = Helper::hasPro();
89
  value="<?php echo ($badge_text_color) ? $badge_text_color : '#000000'; ?>"
90
  id="text_hexcolor" class="wdr_color_picker">
91
  <?php } else {
92
- _e("Unlock this feature by <a href='https://www.flycart.org/products/wordpress/woocommerce-discount-rules' target='_blank'>Upgrading to Pro</a>", WDR_TEXT_DOMAIN);
93
  } ?>
94
  </td>
95
  </tr>
@@ -97,8 +97,8 @@ $is_pro = Helper::hasPro();
97
  <tr>
98
  <td scope="row">
99
  <label for=""
100
- class="awdr-left-align"><b><?php _e('Badge Text ', WDR_TEXT_DOMAIN); ?></b></label>
101
- <span class="wdr_desc_text awdr-clear-both"><?php _e('Customise the text that you want to display. <br><b>Note</b> : You can also use shortcodes to show discount amount.', WDR_TEXT_DOMAIN); ?></span>
102
  </td>
103
  <td>
104
  <?php if($is_pro) { ?>
@@ -108,22 +108,22 @@ $is_pro = Helper::hasPro();
108
  id="awdr_discount_bar_content"
109
  rows="4"
110
  cols="50"
111
- placeholder="<?php _e('Discount Text', WDR_TEXT_DOMAIN); ?>"><?php echo ($badge_text) ? $badge_text : ''; ?></textarea>
112
  <br/><span class="wdr_adv_msg_shortcode_text">
113
- <b class="adv-msg-title">{{title}} -&gt; <?php _e(' Rule Title,', WDR_TEXT_DOMAIN); ?></b>&nbsp;&nbsp;&nbsp;&nbsp;
114
  <?php
115
  if(0){ //Disabled for now
116
  ?>
117
- <b class="adv-msg-discount">{{discount}} -&gt; <?php _e(' Discount (if percentage eg: 20% or Flat, Fixed Price eg:$20),', WDR_TEXT_DOMAIN); ?></b>&nbsp;&nbsp;&nbsp;&nbsp;
118
- <b class="adv-msg-discount-price">{{discounted_price}} -&gt; <?php _e(' Discounted Product Price,', WDR_TEXT_DOMAIN); ?></b>&nbsp;&nbsp;&nbsp;&nbsp;
119
- <b class="adv-msg-min-qty">{{min_quantity}} -&gt; <?php _e(' Minimum quantity (shows only for bluk and set discount range),', WDR_TEXT_DOMAIN); ?></b>&nbsp;&nbsp;&nbsp;&nbsp;
120
- <b class="adv-msg-max-qty">{{max_quantity}} -&gt; <?php _e(' Maximum quantity (shows only for bulk discount range)', WDR_TEXT_DOMAIN); ?></b>&nbsp;&nbsp;&nbsp;&nbsp;
121
  <?php
122
  }
123
  ?>
124
  </span>
125
  <?php } else {
126
- _e("Unlock this feature by <a href='https://www.flycart.org/products/wordpress/woocommerce-discount-rules' target='_blank'>Upgrading to Pro</a>", WDR_TEXT_DOMAIN);
127
  } ?>
128
  </td>
129
  </tr>
7
  }
8
  $is_pro = Helper::hasPro();
9
  ?>
10
+ <button class="awdr-accordion <?php echo ($badge_display) ? 'awdr-accordion-active' : ''; ?>"><?php _e("Discount Bar (optional) - Display discount information", 'woo-discount-rules'); ?></button>
11
  <div class="awdr-discount-batch-container awdr-accordion-panel"
12
  style="<?php echo ($badge_display) ? 'display: block;' : ''; ?>">
13
  <div class="awdr-discount-batch-row">
14
  <div class="wdr-rule-filters-and-options-con">
15
  <div class="wdr-rule-menu">
16
  <div class="awdr-discount-bar-content">
17
+ <p><?php _e("It helps to display discount information in product pages.", 'woo-discount-rules'); ?> <a href="https://docs.flycart.org/en/articles/3946529-discount-bar?utm_source=woo-discount-rules-v2&utm_campaign=doc&utm_medium=text-click&utm_content=dicount_bar_inner" target="_blank" ><?php _e("Read docs.", 'woo-discount-rules'); ?></a> </p>
18
+ <b><?php _e('Preview', 'woo-discount-rules'); ?></b><br><br>
19
  <div class="awdr_admin_discount_bar awdr_row_0" style="background-color:<?php echo ($badge_bg_color) ? $badge_bg_color : '#ffffff' ?>;color:<?php echo ($badge_text_color) ? $badge_text_color : '#000000' ?>;">
20
  <?php echo ($badge_text) ? $badge_text : 'Discount Text'; ?>
21
  </div>
22
+ <p><b><?php _e('Note:', 'woo-discount-rules'); ?></b><?php _e('Preview contains sample result for original result see product page.', 'woo-discount-rules'); ?></p>
23
  </div>
24
  </div>
25
  <div class="wdr-rule-options-con">
32
  <tr>
33
  <td scope="row">
34
  <label for=""
35
+ class="awdr-left-align"><b><?php _e('Show Discount Bar?', 'woo-discount-rules'); ?></b></label>
36
+ <span class="wdr_desc_text awdr-clear-both"><?php _e('Show/hide discount bar on product pages', 'woo-discount-rules'); ?></span>
37
  </td>
38
  <td>
39
  <?php if($is_pro) { ?>
40
  <input type="radio" name="discount_badge[display]"
41
  id="show_applied_rules_message_on_cart"
42
  value="1" <?php echo ($badge_display) ? 'checked' : ''; ?>><label
43
+ for="show_applied_rules_message_on_cart"><?php _e('Yes', 'woo-discount-rules'); ?></label>
44
 
45
  <input type="radio"
46
  name="discount_badge[display]" <?php echo (!$badge_display) ? 'checked' : ''; ?>
47
  id="dont_show_applied_rules_message_on_cart" value="0"><label
48
+ for="dont_show_applied_rules_message_on_cart"><?php _e('No', 'woo-discount-rules'); ?></label>
49
  <?php } else {
50
+ _e("Unlock this feature by <a href='https://www.flycart.org/products/wordpress/woocommerce-discount-rules' target='_blank'>Upgrading to Pro</a>", 'woo-discount-rules');
51
  } ?>
52
  </td>
53
  </tr>
54
  <tr>
55
  <td scope="row">
56
  <label for=""
57
+ class="awdr-left-align"><b><?php _e('Badge Background Color', 'woo-discount-rules'); ?></b></label>
58
+ <span class="wdr_desc_text awdr-clear-both"><?php _e('Choose background color to be shown in product pages.', 'woo-discount-rules'); ?></span>
59
  </td>
60
  <td>
61
  <?php if($is_pro) { ?>
68
  value="<?php echo ($badge_bg_color) ? $badge_bg_color : '#ffffff'; ?>"
69
  id="badge_hexcolor" class="wdr_color_picker">
70
  <?php } else {
71
+ _e("Unlock this feature by <a href='https://www.flycart.org/products/wordpress/woocommerce-discount-rules' target='_blank'>Upgrading to Pro</a>", 'woo-discount-rules');
72
  } ?>
73
  </td>
74
  </tr>
75
  <tr>
76
  <td scope="row">
77
  <label for=""
78
+ class="awdr-left-align"><b><?php _e('Badge Text Color', 'woo-discount-rules'); ?></b></label>
79
+ <span class="wdr_desc_text awdr-clear-both"><?php _e('Choose text color to be shown in product pages.', 'woo-discount-rules'); ?></span>
80
  </td>
81
  <td>
82
  <?php if($is_pro) { ?>
89
  value="<?php echo ($badge_text_color) ? $badge_text_color : '#000000'; ?>"
90
  id="text_hexcolor" class="wdr_color_picker">
91
  <?php } else {
92
+ _e("Unlock this feature by <a href='https://www.flycart.org/products/wordpress/woocommerce-discount-rules' target='_blank'>Upgrading to Pro</a>", 'woo-discount-rules');
93
  } ?>
94
  </td>
95
  </tr>
97
  <tr>
98
  <td scope="row">
99
  <label for=""
100
+ class="awdr-left-align"><b><?php _e('Badge Text ', 'woo-discount-rules'); ?></b></label>
101
+ <span class="wdr_desc_text awdr-clear-both"><?php _e('Customise the text that you want to display. <br><b>Note</b> : You can also use shortcodes to show discount amount.', 'woo-discount-rules'); ?></span>
102
  </td>
103
  <td>
104
  <?php if($is_pro) { ?>
108
  id="awdr_discount_bar_content"
109
  rows="4"
110
  cols="50"
111
+ placeholder="<?php _e('Discount Text', 'woo-discount-rules'); ?>"><?php echo ($badge_text) ? $badge_text : ''; ?></textarea>
112
  <br/><span class="wdr_adv_msg_shortcode_text">
113
+ <b class="adv-msg-title">{{title}} -&gt; <?php _e(' Rule Title,', 'woo-discount-rules'); ?></b>&nbsp;&nbsp;&nbsp;&nbsp;
114
  <?php
115
  if(0){ //Disabled for now
116
  ?>
117
+ <b class="adv-msg-discount">{{discount}} -&gt; <?php _e(' Discount (if percentage eg: 20% or Flat, Fixed Price eg:$20),', 'woo-discount-rules'); ?></b>&nbsp;&nbsp;&nbsp;&nbsp;
118
+ <b class="adv-msg-discount-price">{{discounted_price}} -&gt; <?php _e(' Discounted Product Price,', 'woo-discount-rules'); ?></b>&nbsp;&nbsp;&nbsp;&nbsp;
119
+ <b class="adv-msg-min-qty">{{min_quantity}} -&gt; <?php _e(' Minimum quantity (shows only for bluk and set discount range),', 'woo-discount-rules'); ?></b>&nbsp;&nbsp;&nbsp;&nbsp;
120
+ <b class="adv-msg-max-qty">{{max_quantity}} -&gt; <?php _e(' Maximum quantity (shows only for bulk discount range)', 'woo-discount-rules'); ?></b>&nbsp;&nbsp;&nbsp;&nbsp;
121
  <?php
122
  }
123
  ?>
124
  </span>
125
  <?php } else {
126
+ _e("Unlock this feature by <a href='https://www.flycart.org/products/wordpress/woocommerce-discount-rules' target='_blank'>Upgrading to Pro</a>", 'woo-discount-rules');
127
  } ?>
128
  </td>
129
  </tr>
v2/App/Views/Admin/Rules/Discounts/Bulk.php CHANGED
@@ -13,63 +13,63 @@ $is_pro = \Wdr\App\Helpers\Helper::hasPro();
13
  <input type="number"
14
  name="bulk_adjustments[ranges][<?php echo $bulk_index; ?>][from]"
15
  class="bulk_discount_min awdr_value_selector awdr_next_value"
16
- placeholder="<?php _e('min', WDR_TEXT_DOMAIN); ?>"
17
  min="0"
18
  step="any"
19
  value="<?php if (isset($range_value->from) && !empty($range_value->from)) {
20
  echo $range_value->from;
21
  } ?>">
22
- <span class="wdr_desc_text"><?php _e('Minimum Quantity ', WDR_TEXT_DOMAIN); ?></span>
23
  </div>
24
  <div class="bulk-max">
25
  <input type="number"
26
  name="bulk_adjustments[ranges][<?php echo $bulk_index; ?>][to]"
27
  class="bulk_discount_max awdr_value_selector awdr_auto_add_value"
28
- placeholder="<?php _e('max', WDR_TEXT_DOMAIN); ?>"
29
  min="0"
30
  step="any"
31
  value="<?php if (isset($range_value->to) && !empty($range_value->to)) {
32
  echo $range_value->to;
33
  } ?>">
34
- <span class="wdr_desc_text"><?php _e('Maximum Quantity ', WDR_TEXT_DOMAIN); ?></span>
35
  </div>
36
  <div class="bulk_gen_disc_type wdr-select-filed-hight">
37
  <select name="bulk_adjustments[ranges][<?php echo $bulk_index; ?>][type]"
38
  class="bulk-discount-type bulk_discount_select">
39
  <option value="percentage" <?php if (isset($range_value->type) && $range_value->type == 'percentage') {
40
  echo 'selected';
41
- } ?>><?php _e('Percentage discount', WDR_TEXT_DOMAIN) ?></option>
42
  <option value="flat" <?php if (isset($range_value->type) && $range_value->type == 'flat') {
43
  echo 'selected';
44
- } ?>><?php _e('Fixed discount', WDR_TEXT_DOMAIN) ?></option>
45
  <?php if($is_pro){ ?>
46
  <option value="fixed_price" <?php if (isset($range_value->type) && $range_value->type == 'fixed_price') {
47
  echo 'selected';
48
- } ?>><?php _e('Fixed price for item', WDR_TEXT_DOMAIN) ?></option>
49
  <?php } else { ?>
50
- <option disabled><?php _e('Fixed price for item - PRO -', WDR_TEXT_DOMAIN) ?></option>
51
  <?php } ?>
52
  </select>
53
- <span class="wdr_desc_text"><?php _e('Discount Type', WDR_TEXT_DOMAIN); ?></span>
54
  </div>
55
  <div class="bulk_amount">
56
  <input type="number"
57
  name="bulk_adjustments[ranges][<?php echo $bulk_index; ?>][value]"
58
  class="bulk_discount_value bulk_value_selector awdr_value_selector"
59
- placeholder="<?php _e('Discount', WDR_TEXT_DOMAIN); ?>"
60
  min="0"
61
  step="any"
62
  value="<?php echo (isset($range_value->value) && !empty($range_value->value)) ? $range_value->value : 0;?>">
63
- <span class="wdr_desc_text"><?php _e('Discount Value', WDR_TEXT_DOMAIN); ?></span>
64
  </div>
65
  <div class="bulk_amount">
66
  <input type="text" name="bulk_adjustments[ranges][<?php echo $bulk_index; ?>][label]"
67
  class="bulk_value_selector awdr_value_selector"
68
- placeholder="<?php _e('Label', WDR_TEXT_DOMAIN); ?>" min="0"
69
  value="<?php if (isset($range_value->label) && !empty($range_value->label)) {
70
  echo $range_value->label;
71
  } ?>">
72
- <span class="wdr_desc_text"><?php _e('Title column For Bulk Table', WDR_TEXT_DOMAIN); ?></span>
73
  </div>
74
  <div class="wdr-btn-remove">
75
  <span class="dashicons dashicons-no-alt wdr_discount_remove" data-rmdiv="bulk_range_group"></span>
13
  <input type="number"
14
  name="bulk_adjustments[ranges][<?php echo $bulk_index; ?>][from]"
15
  class="bulk_discount_min awdr_value_selector awdr_next_value"
16
+ placeholder="<?php _e('min', 'woo-discount-rules'); ?>"
17
  min="0"
18
  step="any"
19
  value="<?php if (isset($range_value->from) && !empty($range_value->from)) {
20
  echo $range_value->from;
21
  } ?>">
22
+ <span class="wdr_desc_text"><?php _e('Minimum Quantity ', 'woo-discount-rules'); ?></span>
23
  </div>
24
  <div class="bulk-max">
25
  <input type="number"
26
  name="bulk_adjustments[ranges][<?php echo $bulk_index; ?>][to]"
27
  class="bulk_discount_max awdr_value_selector awdr_auto_add_value"
28
+ placeholder="<?php _e('max', 'woo-discount-rules'); ?>"
29
  min="0"
30
  step="any"
31
  value="<?php if (isset($range_value->to) && !empty($range_value->to)) {
32
  echo $range_value->to;
33
  } ?>">
34
+ <span class="wdr_desc_text"><?php _e('Maximum Quantity ', 'woo-discount-rules'); ?></span>
35
  </div>
36
  <div class="bulk_gen_disc_type wdr-select-filed-hight">
37
  <select name="bulk_adjustments[ranges][<?php echo $bulk_index; ?>][type]"
38
  class="bulk-discount-type bulk_discount_select">
39
  <option value="percentage" <?php if (isset($range_value->type) && $range_value->type == 'percentage') {
40
  echo 'selected';
41
+ } ?>><?php _e('Percentage discount', 'woo-discount-rules') ?></option>
42
  <option value="flat" <?php if (isset($range_value->type) && $range_value->type == 'flat') {
43
  echo 'selected';
44
+ } ?>><?php _e('Fixed discount', 'woo-discount-rules') ?></option>
45
  <?php if($is_pro){ ?>
46
  <option value="fixed_price" <?php if (isset($range_value->type) && $range_value->type == 'fixed_price') {
47
  echo 'selected';
48
+ } ?>><?php _e('Fixed price for item', 'woo-discount-rules') ?></option>
49
  <?php } else { ?>
50
+ <option disabled><?php _e('Fixed price for item - PRO -', 'woo-discount-rules') ?></option>
51
  <?php } ?>
52
  </select>
53
+ <span class="wdr_desc_text"><?php _e('Discount Type', 'woo-discount-rules'); ?></span>
54
  </div>
55
  <div class="bulk_amount">
56
  <input type="number"
57
  name="bulk_adjustments[ranges][<?php echo $bulk_index; ?>][value]"
58
  class="bulk_discount_value bulk_value_selector awdr_value_selector"
59
+ placeholder="<?php _e('Discount', 'woo-discount-rules'); ?>"
60
  min="0"
61
  step="any"
62
  value="<?php echo (isset($range_value->value) && !empty($range_value->value)) ? $range_value->value : 0;?>">
63
+ <span class="wdr_desc_text"><?php _e('Discount Value', 'woo-discount-rules'); ?></span>
64
  </div>
65
  <div class="bulk_amount">
66
  <input type="text" name="bulk_adjustments[ranges][<?php echo $bulk_index; ?>][label]"
67
  class="bulk_value_selector awdr_value_selector"
68
+ placeholder="<?php _e('Label', 'woo-discount-rules'); ?>" min="0"
69
  value="<?php if (isset($range_value->label) && !empty($range_value->label)) {
70
  echo $range_value->label;
71
  } ?>">
72
+ <span class="wdr_desc_text"><?php _e('Title column For Bulk Table', 'woo-discount-rules'); ?></span>
73
  </div>
74
  <div class="wdr-btn-remove">
75
  <span class="dashicons dashicons-no-alt wdr_discount_remove" data-rmdiv="bulk_range_group"></span>
v2/App/Views/Admin/Rules/Discounts/Cart.php CHANGED
@@ -11,17 +11,17 @@ $is_pro = \Wdr\App\Helpers\Helper::hasPro();
11
  <div class="cart_discount_option wdr-select-filed-hight">
12
  <select class="cart_free_shipping awdr-left-align"
13
  name="cart_adjustments[type]">
14
- <option value="percentage" <?php echo (!empty($cart_adjustment) && isset($cart_adjustment->type) && $cart_adjustment->type == 'percentage') ? 'selected' : ''; ?>><?php _e('Percentage discount', WDR_TEXT_DOMAIN); ?></option>
15
- <option value="flat_in_subtotal" <?php echo (!empty($cart_adjustment) && isset($cart_adjustment->type) && $cart_adjustment->type == 'flat_in_subtotal') ? 'selected' : ''; ?>><?php _e('Fixed discount', WDR_TEXT_DOMAIN); ?></option>
16
  <?php if($is_pro){ ?>
17
- <option value="flat" <?php echo (!empty($cart_adjustment) && isset($cart_adjustment->type) && $cart_adjustment->type == 'flat') ? 'selected' : ''; ?>><?php _e('Fixed discount per product', WDR_TEXT_DOMAIN); ?></option>
18
  <?php } else {
19
  ?>
20
- <option disabled><?php _e('Fixed discount per product -PRO-', WDR_TEXT_DOMAIN); ?></option>
21
  <?php
22
  }?>
23
  </select>
24
- <span class="wdr_desc_text awdr-clear"><?php _e('Discount Type', WDR_TEXT_DOMAIN); ?></span>
25
  </div>
26
  <div class="cart_discount_value wdr-input-filed-hight">
27
  <input name="cart_adjustments[value]"
@@ -30,16 +30,16 @@ $is_pro = \Wdr\App\Helpers\Helper::hasPro();
30
  value="<?php echo (isset($cart_adjustment->value)) ? $cart_adjustment->value : ''; ?>"
31
  placeholder="0.00" min="0" step="any"
32
  style="width: 100%;">
33
- <span class="wdr_desc_text awdr-clear"><?php _e('Value', WDR_TEXT_DOMAIN); ?></span>
34
  </div>
35
  <div class="cart_discount_lable wdr-input-filed-hight">
36
  <input name="cart_adjustments[label]"
37
  type="text"
38
  class="awdr-left-align"
39
  value="<?php echo (isset($cart_adjustment->label)) ? $cart_adjustment->label : ''; ?>"
40
- placeholder="<?php _e('Discount label', WDR_TEXT_DOMAIN); ?>"
41
  style="width: 100%;">
42
- <span class="wdr_desc_text awdr-clear"><?php _e('Discount Label', WDR_TEXT_DOMAIN); ?></span>
43
  </div>
44
  </div>
45
  </div>
11
  <div class="cart_discount_option wdr-select-filed-hight">
12
  <select class="cart_free_shipping awdr-left-align"
13
  name="cart_adjustments[type]">
14
+ <option value="percentage" <?php echo (!empty($cart_adjustment) && isset($cart_adjustment->type) && $cart_adjustment->type == 'percentage') ? 'selected' : ''; ?>><?php _e('Percentage discount', 'woo-discount-rules'); ?></option>
15
+ <option value="flat_in_subtotal" <?php echo (!empty($cart_adjustment) && isset($cart_adjustment->type) && $cart_adjustment->type == 'flat_in_subtotal') ? 'selected' : ''; ?>><?php _e('Fixed discount', 'woo-discount-rules'); ?></option>
16
  <?php if($is_pro){ ?>
17
+ <option value="flat" <?php echo (!empty($cart_adjustment) && isset($cart_adjustment->type) && $cart_adjustment->type == 'flat') ? 'selected' : ''; ?>><?php _e('Fixed discount per product', 'woo-discount-rules'); ?></option>
18
  <?php } else {
19
  ?>
20
+ <option disabled><?php _e('Fixed discount per product -PRO-', 'woo-discount-rules'); ?></option>
21
  <?php
22
  }?>
23
  </select>
24
+ <span class="wdr_desc_text awdr-clear"><?php _e('Discount Type', 'woo-discount-rules'); ?></span>
25
  </div>
26
  <div class="cart_discount_value wdr-input-filed-hight">
27
  <input name="cart_adjustments[value]"
30
  value="<?php echo (isset($cart_adjustment->value)) ? $cart_adjustment->value : ''; ?>"
31
  placeholder="0.00" min="0" step="any"
32
  style="width: 100%;">
33
+ <span class="wdr_desc_text awdr-clear"><?php _e('Value', 'woo-discount-rules'); ?></span>
34
  </div>
35
  <div class="cart_discount_lable wdr-input-filed-hight">
36
  <input name="cart_adjustments[label]"
37
  type="text"
38
  class="awdr-left-align"
39
  value="<?php echo (isset($cart_adjustment->label)) ? $cart_adjustment->label : ''; ?>"
40
+ placeholder="<?php _e('Discount label', 'woo-discount-rules'); ?>"
41
  style="width: 100%;">
42
+ <span class="wdr_desc_text awdr-clear"><?php _e('Discount Label', 'woo-discount-rules'); ?></span>
43
  </div>
44
  </div>
45
  </div>
v2/App/Views/Admin/Rules/Discounts/Main.php CHANGED
@@ -14,7 +14,7 @@ if (!defined('ABSPATH')) {
14
  <div class="wdr-simple-discount-main wdr-bulk-discount-main">
15
  <div class="wdr-simple-discount-inner">
16
  <div class="bulk_general_adjustment wdr-select-filed-hight">
17
- <label class="label_font_weight"><?php _e('Count Quantities by:', WDR_TEXT_DOMAIN); ?> <span style="" class="woocommerce-help-tip" title="<?php _e("Filter set above :
18
  This will count the quantities of products set in the “Filter” section.
19
  Example: If you selected a few categories there, it will count the quantities of products in those categories added in cart. If you selected a few products in the filters section, then it will count the quantities together.
20
 
@@ -36,7 +36,7 @@ Useful when applying discounts based on variable products and you want the quant
36
  Example:
37
  Say, you have Product A - Small, Medium, Large.
38
  If a customer buys 2 of Product A - Small, 4 of Product A - Medium, 6 of Product A - Large, then the count will be: 6+4+2 = 12
39
- ", WDR_TEXT_DOMAIN); ?>"></span></label>
40
  <select name="bulk_adjustments[operator]"
41
  class="wdr-bulk-type bulk_discount_select awdr_mode_of_operator">
42
  <option value="product_cumulative" title="<?php _e('This will count the quantities of products set in the “Filter” section.
@@ -44,24 +44,24 @@ Example: If you selected a few categories there, it will count the quantities of
44
 
45
  Example: Let’s say, you wanted to offer a Bulk Quantity discount for Category A and chosen Category A in the filters.
46
 
47
- So when a customer adds 1 quantity each of X, Y and Z from Category A, then the count here is 3.', WDR_TEXT_DOMAIN) ?>" <?php if ($bulk_adj_operator == 'product_cumulative') {
48
  echo 'selected';
49
- } ?>><?php _e('Filters set above', WDR_TEXT_DOMAIN) ?></option>
50
  <option title="<?php _e('This counts the total quantity of each product / line item separately.
51
  Example : If a customer wanted to buy 2 quantities of Product A, 3 quantities of Product B, then count will be maintained at the product level.
52
  2 - count of Product A
53
  3 - Count of Product B
54
 
55
  In case of variable products, the count will be based on each variant because WooCommerce considers a variant as a product itself.
56
- ', WDR_TEXT_DOMAIN) ?>" value="product" <?php if ($bulk_adj_operator == 'product') {
57
  echo 'selected';
58
- } ?>><?php _e('Individual product', WDR_TEXT_DOMAIN) ?></option>
59
  <option title="<?php _e('Useful when applying discounts based on variable products and you want the quantity to be counted based on the parent product.
60
  Example:
61
  Say, you have Product A - Small, Medium, Large.
62
- If a customer buys 2 of Product A - Small, 4 of Product A - Medium, 6 of Product A - Large, then the count will be: 6+4+2 = 12', WDR_TEXT_DOMAIN) ?>" value="variation" <?php if ($bulk_adj_operator == 'variation') {
63
  echo 'selected';
64
- } ?>><?php _e('All variants in each product together', WDR_TEXT_DOMAIN) ?></option>
65
  </select>
66
  </div>
67
  <div class="awdr-example"></div>
@@ -83,7 +83,7 @@ If a customer buys 2 of Product A - Small, 4 of Product A - Medium, 6 of Prod
83
  <button type="button" class="button add_discount_elements"
84
  data-discount-method="add_bulk_range"
85
  data-next-starting-value = ".wdr-discount-group"
86
- data-append="bulk_range_setter"><?php _e('Add Range', WDR_TEXT_DOMAIN) ?></button>
87
  </div>
88
  <div class="apply_discount_as_cart_section">
89
  <?php $is_enabled_rtl = \Wdr\App\Helpers\Woocommerce::isRTLEnable();?>
@@ -92,7 +92,7 @@ If a customer buys 2 of Product A - Small, 4 of Product A - Medium, 6 of Prod
92
  <input class="<?php echo (!$is_enabled_rtl) ? 'toggle__input' : ''; ?> apply_fee_coupon_checkbox" type="checkbox"
93
  name="bulk_adjustments[apply_as_cart_rule]" <?php echo (isset($bulk_adj_as_cart) && !empty($bulk_adj_as_cart)) ? 'checked' : '' ?> value="1">
94
  <span class="<?php echo (!$is_enabled_rtl) ? 'toggle__label' : ''; ?>"><span
95
- class="<?php echo (!$is_enabled_rtl) ? 'toggle__text toggle_tic' : ''; ?> "><?php _e('Show discount in cart as coupon instead of changing the product price ?', WDR_TEXT_DOMAIN); ?></span></span>
96
  </label>
97
  </div>
98
  <div class="simple_discount_value wdr-input-filed-hight apply_fee_coupon_label" style="<?php echo (isset($bulk_adj_as_cart) && !empty($bulk_adj_as_cart)) ? '' : 'display: none;' ?> <?php echo ($is_enabled_rtl) ? 'padding-top: 0px !important;' : ''; ?>">
14
  <div class="wdr-simple-discount-main wdr-bulk-discount-main">
15
  <div class="wdr-simple-discount-inner">
16
  <div class="bulk_general_adjustment wdr-select-filed-hight">
17
+ <label class="label_font_weight"><?php _e('Count Quantities by:', 'woo-discount-rules'); ?> <span style="" class="woocommerce-help-tip" title="<?php _e("Filter set above :
18
  This will count the quantities of products set in the “Filter” section.
19
  Example: If you selected a few categories there, it will count the quantities of products in those categories added in cart. If you selected a few products in the filters section, then it will count the quantities together.
20
 
36
  Example:
37
  Say, you have Product A - Small, Medium, Large.
38
  If a customer buys 2 of Product A - Small, 4 of Product A - Medium, 6 of Product A - Large, then the count will be: 6+4+2 = 12
39
+ ", 'woo-discount-rules'); ?>"></span></label>
40
  <select name="bulk_adjustments[operator]"
41
  class="wdr-bulk-type bulk_discount_select awdr_mode_of_operator">
42
  <option value="product_cumulative" title="<?php _e('This will count the quantities of products set in the “Filter” section.
44
 
45
  Example: Let’s say, you wanted to offer a Bulk Quantity discount for Category A and chosen Category A in the filters.
46
 
47
+ So when a customer adds 1 quantity each of X, Y and Z from Category A, then the count here is 3.', 'woo-discount-rules') ?>" <?php if ($bulk_adj_operator == 'product_cumulative') {
48
  echo 'selected';
49
+ } ?>><?php _e('Filters set above', 'woo-discount-rules') ?></option>
50
  <option title="<?php _e('This counts the total quantity of each product / line item separately.
51
  Example : If a customer wanted to buy 2 quantities of Product A, 3 quantities of Product B, then count will be maintained at the product level.
52
  2 - count of Product A
53
  3 - Count of Product B
54
 
55
  In case of variable products, the count will be based on each variant because WooCommerce considers a variant as a product itself.
56
+ ', 'woo-discount-rules') ?>" value="product" <?php if ($bulk_adj_operator == 'product') {
57
  echo 'selected';
58
+ } ?>><?php _e('Individual product', 'woo-discount-rules') ?></option>
59
  <option title="<?php _e('Useful when applying discounts based on variable products and you want the quantity to be counted based on the parent product.
60
  Example:
61
  Say, you have Product A - Small, Medium, Large.
62
+ If a customer buys 2 of Product A - Small, 4 of Product A - Medium, 6 of Product A - Large, then the count will be: 6+4+2 = 12', 'woo-discount-rules') ?>" value="variation" <?php if ($bulk_adj_operator == 'variation') {
63
  echo 'selected';
64
+ } ?>><?php _e('All variants in each product together', 'woo-discount-rules') ?></option>
65
  </select>
66
  </div>
67
  <div class="awdr-example"></div>
83
  <button type="button" class="button add_discount_elements"
84
  data-discount-method="add_bulk_range"
85
  data-next-starting-value = ".wdr-discount-group"
86
+ data-append="bulk_range_setter"><?php _e('Add Range', 'woo-discount-rules') ?></button>
87
  </div>
88
  <div class="apply_discount_as_cart_section">
89
  <?php $is_enabled_rtl = \Wdr\App\Helpers\Woocommerce::isRTLEnable();?>
92
  <input class="<?php echo (!$is_enabled_rtl) ? 'toggle__input' : ''; ?> apply_fee_coupon_checkbox" type="checkbox"
93
  name="bulk_adjustments[apply_as_cart_rule]" <?php echo (isset($bulk_adj_as_cart) && !empty($bulk_adj_as_cart)) ? 'checked' : '' ?> value="1">
94
  <span class="<?php echo (!$is_enabled_rtl) ? 'toggle__label' : ''; ?>"><span
95
+ class="<?php echo (!$is_enabled_rtl) ? 'toggle__text toggle_tic' : ''; ?> "><?php _e('Show discount in cart as coupon instead of changing the product price ?', 'woo-discount-rules'); ?></span></span>
96
  </label>
97
  </div>
98
  <div class="simple_discount_value wdr-input-filed-hight apply_fee_coupon_label" style="<?php echo (isset($bulk_adj_as_cart) && !empty($bulk_adj_as_cart)) ? '' : 'display: none;' ?> <?php echo ($is_enabled_rtl) ? 'padding-top: 0px !important;' : ''; ?>">
v2/App/Views/Admin/Rules/Discounts/simple.php CHANGED
@@ -10,17 +10,17 @@ $is_pro = \Wdr\App\Helpers\Helper::hasPro();
10
  <div class="wdr-simple-discount-inner">
11
  <div class="simple_discount_option wdr-select-filed-hight">
12
  <select name="product_adjustments[type]" class="product_discount_option awdr-left-align">
13
- <option value="percentage" <?php echo (isset($product_adjustments->type) && $product_adjustments->type == 'percentage') ? 'selected' : ''; ?>><?php _e('Percentage discount', WDR_TEXT_DOMAIN); ?></option>
14
- <option value="flat" <?php echo (isset($product_adjustments->type) && $product_adjustments->type == 'flat') ? 'selected' : ''; ?>><?php _e('Fixed discount', WDR_TEXT_DOMAIN); ?></option>
15
  <?php if($is_pro){ ?>
16
- <option value="fixed_price" <?php echo (isset($product_adjustments->type) && $product_adjustments->type == 'fixed_price') ? 'selected' : ''; ?>><?php _e('Fixed price per item', WDR_TEXT_DOMAIN); ?></option>
17
  <?php } else {
18
  ?>
19
- <option disabled><?php _e('Fixed price per item -PRO-', WDR_TEXT_DOMAIN); ?></option>
20
  <?php
21
  }?>
22
  </select>
23
- <span class="wdr_desc_text awdr-clear-both"><?php _e('Discount Type', WDR_TEXT_DOMAIN); ?></span>
24
  </div>
25
  <div class="simple_discount_value wdr-input-filed-hight">
26
  <input name="product_adjustments[value]"
@@ -28,7 +28,7 @@ $is_pro = \Wdr\App\Helpers\Helper::hasPro();
28
  class="product_discount_value"
29
  value="<?php echo (isset($product_adjustments->value)) ? $product_adjustments->value : ''; ?>"
30
  placeholder="0.00" min="0" step="any" style="width: 100%;">
31
- <span class="wdr_desc_text"><?php _e('Value', WDR_TEXT_DOMAIN); ?></span>
32
  </div>
33
  </div><?php
34
  $is_enabled_rtl = \Wdr\App\Helpers\Woocommerce::isRTLEnable();?>
@@ -38,7 +38,7 @@ $is_pro = \Wdr\App\Helpers\Helper::hasPro();
38
  <input class="<?php echo (!$is_enabled_rtl) ? 'toggle__input' : ''; ?> apply_fee_coupon_checkbox" type="checkbox"
39
  name="product_adjustments[apply_as_cart_rule]" <?php echo (isset($product_adjustments->apply_as_cart_rule) && !empty($product_adjustments->apply_as_cart_rule)) ? 'checked' : '' ?> value="1">
40
  <span class="<?php echo (!$is_enabled_rtl) ? 'toggle__label' : ''; ?>"><span
41
- class="<?php echo (!$is_enabled_rtl) ? 'toggle__text toggle_tic' : ''; ?> "><?php _e('Show discount in cart as coupon instead of changing the product price ?', WDR_TEXT_DOMAIN); ?></span></span>
42
  </label>
43
  </div>
44
  <div class="simple_discount_value wdr-input-filed-hight apply_fee_coupon_label" style="<?php echo (isset($product_adjustments->apply_as_cart_rule) && !empty($product_adjustments->apply_as_cart_rule)) ? '' : 'display: none;' ?> <?php echo ($is_enabled_rtl) ? 'padding-top: 0px !important;' : ''; ?>">
10
  <div class="wdr-simple-discount-inner">
11
  <div class="simple_discount_option wdr-select-filed-hight">
12
  <select name="product_adjustments[type]" class="product_discount_option awdr-left-align">
13
+ <option value="percentage" <?php echo (isset($product_adjustments->type) && $product_adjustments->type == 'percentage') ? 'selected' : ''; ?>><?php _e('Percentage discount', 'woo-discount-rules'); ?></option>
14
+ <option value="flat" <?php echo (isset($product_adjustments->type) && $product_adjustments->type == 'flat') ? 'selected' : ''; ?>><?php _e('Fixed discount', 'woo-discount-rules'); ?></option>
15
  <?php if($is_pro){ ?>
16
+ <option value="fixed_price" <?php echo (isset($product_adjustments->type) && $product_adjustments->type == 'fixed_price') ? 'selected' : ''; ?>><?php _e('Fixed price per item', 'woo-discount-rules'); ?></option>
17
  <?php } else {
18
  ?>
19
+ <option disabled><?php _e('Fixed price per item -PRO-', 'woo-discount-rules'); ?></option>
20
  <?php
21
  }?>
22
  </select>
23
+ <span class="wdr_desc_text awdr-clear-both"><?php _e('Discount Type', 'woo-discount-rules'); ?></span>
24
  </div>
25
  <div class="simple_discount_value wdr-input-filed-hight">
26
  <input name="product_adjustments[value]"
28
  class="product_discount_value"
29
  value="<?php echo (isset($product_adjustments->value)) ? $product_adjustments->value : ''; ?>"
30
  placeholder="0.00" min="0" step="any" style="width: 100%;">
31
+ <span class="wdr_desc_text"><?php _e('Value', 'woo-discount-rules'); ?></span>
32
  </div>
33
  </div><?php
34
  $is_enabled_rtl = \Wdr\App\Helpers\Woocommerce::isRTLEnable();?>
38
  <input class="<?php echo (!$is_enabled_rtl) ? 'toggle__input' : ''; ?> apply_fee_coupon_checkbox" type="checkbox"
39
  name="product_adjustments[apply_as_cart_rule]" <?php echo (isset($product_adjustments->apply_as_cart_rule) && !empty($product_adjustments->apply_as_cart_rule)) ? 'checked' : '' ?> value="1">
40
  <span class="<?php echo (!$is_enabled_rtl) ? 'toggle__label' : ''; ?>"><span
41
+ class="<?php echo (!$is_enabled_rtl) ? 'toggle__text toggle_tic' : ''; ?> "><?php _e('Show discount in cart as coupon instead of changing the product price ?', 'woo-discount-rules'); ?></span></span>
42
  </label>
43
  </div>
44
  <div class="simple_discount_value wdr-input-filed-hight apply_fee_coupon_label" style="<?php echo (isset($product_adjustments->apply_as_cart_rule) && !empty($product_adjustments->apply_as_cart_rule)) ? '' : 'display: none;' ?> <?php echo ($is_enabled_rtl) ? 'padding-top: 0px !important;' : ''; ?>">
v2/App/Views/Admin/Rules/Filters/AllProducts.php CHANGED
@@ -7,8 +7,8 @@ if (!defined('ABSPATH')) {
7
  <!--<div class="all_products_group">
8
  <div class="wdr-product_filter_method">
9
  <select name="filters[{i}][method]" style="cursor: none;" disabled>
10
- <option value="in_list" selected><?php /*_e('In List', WDR_TEXT_DOMAIN); */ ?></option>
11
- <option value="not_in_list"><?php /*_e('Not In List', WDR_TEXT_DOMAIN); */ ?></option>
12
  </select>
13
  </div>
14
  <div class="wdr-product-selector">
7
  <!--<div class="all_products_group">
8
  <div class="wdr-product_filter_method">
9
  <select name="filters[{i}][method]" style="cursor: none;" disabled>
10
+ <option value="in_list" selected><?php /*_e('In List', 'woo-discount-rules'); */ ?></option>
11
+ <option value="not_in_list"><?php /*_e('Not In List', 'woo-discount-rules'); */ ?></option>
12
  </select>
13
  </div>
14
  <div class="wdr-product-selector">
v2/App/Views/Admin/Rules/Filters/Main.php CHANGED
@@ -22,7 +22,7 @@ if (!defined('ABSPATH')) {
22
  if (isset($product_filters) && !empty($product_filters)) {
23
  foreach ($product_filters as $wdr_filter_key => $wdr_filter_value) {
24
  ?>
25
- <optgroup label="<?php _e($wdr_filter_key, WDR_TEXT_DOMAIN); ?>" ><?php
26
  foreach ($wdr_filter_value as $key => $value) {
27
  ?>
28
  <option
@@ -37,7 +37,7 @@ if (!defined('ABSPATH')) {
37
  <?php
38
  }
39
  ?>
40
- <?php echo ($filter->type == $key) ? 'selected' : ''; ?>><?php _e($value['label'], WDR_TEXT_DOMAIN); ?></option><?php
41
  } ?>
42
  </optgroup><?php
43
  }
@@ -51,8 +51,8 @@ if (!defined('ABSPATH')) {
51
  <div class="wdr-product_filter_method">
52
  <select name="filters[<?php echo $filter_row_count; ?>][method]">
53
  <option value="in_list"
54
- <?php echo (isset($filter->method) && $filter->method == 'in_list') ? 'selected' : ''; ?>><?php _e('In List', WDR_TEXT_DOMAIN); ?></option>
55
- <option value="not_in_list" <?php echo (isset($filter->method) && $filter->method == 'not_in_list') ? 'selected' : ''; ?>><?php _e('Not In List', WDR_TEXT_DOMAIN); ?></option>
56
  </select>
57
  </div>
58
  <div class="awdr-product-selector">
@@ -79,7 +79,7 @@ if (!defined('ABSPATH')) {
79
  class="edit-filters awdr_validation"
80
  data-list="<?php echo $filter->type; ?>"
81
  data-field="autocomplete"
82
- data-placeholder="<?php _e('Select ' . $placeholder, WDR_TEXT_DOMAIN); ?>"
83
  name="filters[<?php echo $filter_row_count; ?>][value][]">
84
  <?php echo $selected_options; ?>
85
  </select>
@@ -95,29 +95,29 @@ if (!defined('ABSPATH')) {
95
  </div><?php
96
  switch($filter->type) {
97
  case "products": ?>
98
- <div class="wdr_filter_desc_text"><span><?php _e('Choose products that get the discount using "In List". If you want to exclude a few products, choose "Not In List" and select the products you wanted to exclude from discount. (You can add multiple filters)', WDR_TEXT_DOMAIN); ?></span></div>
99
  <?php break;
100
  case "product_category": ?>
101
- <div class="wdr_filter_desc_text"><span><?php _e('Choose categories that get the discount using "In List". If you want to exclude a few categories, choose "Not In List" and select the categories you wanted to exclude from discount. (You can add multiple filters of same type)', WDR_TEXT_DOMAIN); ?></span></div>
102
  <?php break;
103
  case "product_attributes": ?>
104
- <div class="wdr_filter_desc_text"><span><?php _e('Choose attributes that get the discount using "In List". If you want to exclude a few attributes, choose "Not In List" and select the attributes you wanted to exclude from discount. (You can add multiple filters of same type)', WDR_TEXT_DOMAIN); ?></span></div>
105
  <?php break;
106
  case "product_tags": ?>
107
- <div class="wdr_filter_desc_text"><span><?php _e('Choose tags that get the discount using "In List". If you want to exclude a few tags, choose "Not In List" and select the tags you wanted to exclude from discount. (You can add multiple filters of same type)', WDR_TEXT_DOMAIN); ?></span></div>
108
  <?php break;
109
  case "product_sku": ?>
110
- <div class="wdr_filter_desc_text"><span><?php _e('Choose SKUs that get the discount using "In List". If you want to exclude a few SKUs, choose "Not In List" and select the SKUs you wanted to exclude from discount. (You can add multiple filters of same type)', WDR_TEXT_DOMAIN); ?></span></div>
111
  <?php break;
112
  case "product_on_sale": ?>
113
- <div class="wdr_filter_desc_text"><span><?php _e('Choose whether you want to include (or exclude) products on sale (those having a sale price) for the discount ', WDR_TEXT_DOMAIN); ?></span></div>
114
  <?php break;
115
  case "all_products": ?>
116
- <div class="wdr_filter_desc_text"><span><?php _e('Discount applies to all eligible products in the store', WDR_TEXT_DOMAIN); ?></span></div>
117
  <?php break;
118
  default:
119
  ?>
120
- <div class="wdr_filter_desc_text"><span><?php _e('Discount applies to custom taxonomy', WDR_TEXT_DOMAIN); ?></span></div>
121
  <?php break;
122
  }
123
  ?>
@@ -132,7 +132,7 @@ if (!defined('ABSPATH')) {
132
  if (isset($product_filters) && !empty($product_filters)) {
133
  foreach ($product_filters as $wdr_filter_key => $wdr_filter_value) {
134
  ?>
135
- <optgroup label="<?php _e($wdr_filter_key, WDR_TEXT_DOMAIN); ?>"><?php
136
  foreach ($wdr_filter_value as $key => $value) {
137
  ?>
138
  <option
@@ -147,7 +147,7 @@ if (!defined('ABSPATH')) {
147
  <?php
148
  }
149
  ?>
150
- ><?php _e($value['label'], WDR_TEXT_DOMAIN); ?></option><?php
151
  } ?>
152
  </optgroup><?php
153
  }
@@ -159,7 +159,7 @@ if (!defined('ABSPATH')) {
159
  </div>
160
  <div class="wdr_filter_desc_text">
161
  <span>
162
- <?php _e('Discount applies to all eligible products in the store', WDR_TEXT_DOMAIN); ?>
163
  </span>
164
  </div>
165
  </div>
@@ -170,7 +170,7 @@ if (!defined('ABSPATH')) {
170
  </div>
171
  <div class="wdr-add-condition add-condition-and-filters">
172
  <button type="button"
173
- class="button add-product-filter"><?php _e('Add filter', WDR_TEXT_DOMAIN); ?></button>
174
  </div>
175
  </div>
176
  </div>
22
  if (isset($product_filters) && !empty($product_filters)) {
23
  foreach ($product_filters as $wdr_filter_key => $wdr_filter_value) {
24
  ?>
25
+ <optgroup label="<?php _e($wdr_filter_key, 'woo-discount-rules'); ?>" ><?php
26
  foreach ($wdr_filter_value as $key => $value) {
27
  ?>
28
  <option
37
  <?php
38
  }
39
  ?>
40
+ <?php echo ($filter->type == $key) ? 'selected' : ''; ?>><?php _e($value['label'], 'woo-discount-rules'); ?></option><?php
41
  } ?>
42
  </optgroup><?php
43
  }
51
  <div class="wdr-product_filter_method">
52
  <select name="filters[<?php echo $filter_row_count; ?>][method]">
53
  <option value="in_list"
54
+ <?php echo (isset($filter->method) && $filter->method == 'in_list') ? 'selected' : ''; ?>><?php _e('In List', 'woo-discount-rules'); ?></option>
55
+ <option value="not_in_list" <?php echo (isset($filter->method) && $filter->method == 'not_in_list') ? 'selected' : ''; ?>><?php _e('Not In List', 'woo-discount-rules'); ?></option>
56
  </select>
57
  </div>
58
  <div class="awdr-product-selector">
79
  class="edit-filters awdr_validation"
80
  data-list="<?php echo $filter->type; ?>"
81
  data-field="autocomplete"
82
+ data-placeholder="<?php _e('Select ' . $placeholder, 'woo-discount-rules'); ?>"
83
  name="filters[<?php echo $filter_row_count; ?>][value][]">
84
  <?php echo $selected_options; ?>
85
  </select>
95
  </div><?php
96
  switch($filter->type) {
97
  case "products": ?>
98
+ <div class="wdr_filter_desc_text"><span><?php _e('Choose products that get the discount using "In List". If you want to exclude a few products, choose "Not In List" and select the products you wanted to exclude from discount. (You can add multiple filters)', 'woo-discount-rules'); ?></span></div>
99
  <?php break;
100
  case "product_category": ?>
101
+ <div class="wdr_filter_desc_text"><span><?php _e('Choose categories that get the discount using "In List". If you want to exclude a few categories, choose "Not In List" and select the categories you wanted to exclude from discount. (You can add multiple filters of same type)', 'woo-discount-rules'); ?></span></div>
102
  <?php break;
103
  case "product_attributes": ?>
104
+ <div class="wdr_filter_desc_text"><span><?php _e('Choose attributes that get the discount using "In List". If you want to exclude a few attributes, choose "Not In List" and select the attributes you wanted to exclude from discount. (You can add multiple filters of same type)', 'woo-discount-rules'); ?></span></div>
105
  <?php break;
106
  case "product_tags": ?>
107
+ <div class="wdr_filter_desc_text"><span><?php _e('Choose tags that get the discount using "In List". If you want to exclude a few tags, choose "Not In List" and select the tags you wanted to exclude from discount. (You can add multiple filters of same type)', 'woo-discount-rules'); ?></span></div>
108
  <?php break;
109
  case "product_sku": ?>
110
+ <div class="wdr_filter_desc_text"><span><?php _e('Choose SKUs that get the discount using "In List". If you want to exclude a few SKUs, choose "Not In List" and select the SKUs you wanted to exclude from discount. (You can add multiple filters of same type)', 'woo-discount-rules'); ?></span></div>
111
  <?php break;
112
  case "product_on_sale": ?>
113
+ <div class="wdr_filter_desc_text"><span><?php _e('Choose whether you want to include (or exclude) products on sale (those having a sale price) for the discount ', 'woo-discount-rules'); ?></span></div>
114
  <?php break;
115
  case "all_products": ?>
116
+ <div class="wdr_filter_desc_text"><span><?php _e('Discount applies to all eligible products in the store', 'woo-discount-rules'); ?></span></div>
117
  <?php break;
118
  default:
119
  ?>
120
+ <div class="wdr_filter_desc_text"><span><?php _e('Discount applies to custom taxonomy', 'woo-discount-rules'); ?></span></div>
121
  <?php break;
122
  }
123
  ?>
132
  if (isset($product_filters) && !empty($product_filters)) {
133
  foreach ($product_filters as $wdr_filter_key => $wdr_filter_value) {
134
  ?>
135
+ <optgroup label="<?php _e($wdr_filter_key, 'woo-discount-rules'); ?>"><?php
136
  foreach ($wdr_filter_value as $key => $value) {
137
  ?>
138
  <option
147
  <?php
148
  }
149
  ?>
150
+ ><?php _e($value['label'], 'woo-discount-rules'); ?></option><?php
151
  } ?>
152
  </optgroup><?php
153
  }
159
  </div>
160
  <div class="wdr_filter_desc_text">
161
  <span>
162
+ <?php _e('Discount applies to all eligible products in the store', 'woo-discount-rules'); ?>
163
  </span>
164
  </div>
165
  </div>
170
  </div>
171
  <div class="wdr-add-condition add-condition-and-filters">
172
  <button type="button"
173
+ class="button add-product-filter"><?php _e('Add filter', 'woo-discount-rules'); ?></button>
174
  </div>
175
  </div>
176
  </div>
v2/App/Views/Admin/Rules/Filters/Products.php CHANGED
@@ -7,15 +7,15 @@ if (!defined('ABSPATH')) {
7
  <div class="products_group wdr-products_group">
8
  <div class="wdr-product_filter_method">
9
  <select name="filters[{i}][method]">
10
- <option value="in_list" selected><?php _e('In List', WDR_TEXT_DOMAIN); ?></option>
11
- <option value="not_in_list"><?php _e('Not In List', WDR_TEXT_DOMAIN); ?></option>
12
- <!--<option value="exclude"><?php /*_e('Exclude Product', WDR_TEXT_DOMAIN); */?></option>-->
13
  </select>
14
  </div>
15
  <div class="awdr-product-selector">
16
  <select multiple="" name="filters[{i}][value][]"
17
  class="awdr_validation"
18
- data-placeholder="<?php _e('Select Products', WDR_TEXT_DOMAIN);?>"
19
  data-list="products"
20
  data-field="autocomplete"
21
  style="width: 100%; max-width: 400px; min-width: 180px;">
7
  <div class="products_group wdr-products_group">
8
  <div class="wdr-product_filter_method">
9
  <select name="filters[{i}][method]">
10
+ <option value="in_list" selected><?php _e('In List', 'woo-discount-rules'); ?></option>
11
+ <option value="not_in_list"><?php _e('Not In List', 'woo-discount-rules'); ?></option>
12
+ <!--<option value="exclude"><?php /*_e('Exclude Product', 'woo-discount-rules'); */?></option>-->
13
  </select>
14
  </div>
15
  <div class="awdr-product-selector">
16
  <select multiple="" name="filters[{i}][value][]"
17
  class="awdr_validation"
18
+ data-placeholder="<?php _e('Select Products', 'woo-discount-rules');?>"
19
  data-list="products"
20
  data-field="autocomplete"
21
  style="width: 100%; max-width: 400px; min-width: 180px;">
v2/App/Views/Admin/Rules/Manage.php CHANGED
@@ -17,11 +17,11 @@
17
  if ($rule_status == 'in_future') { ?>
18
  <div class="notice inline notice notice-warning notice-alt awdr-rule-limit-disabled">
19
  <p class="rule_limit_msg_future">
20
- <b><?php esc_html_e('This rule is not running currently: ', WDR_TEXT_DOMAIN); ?></b><?php esc_html_e(' Start date and time is set in the future date', WDR_TEXT_DOMAIN); ?>
21
  </p><?php
22
  if ($check_rule_limit == 'Disabled') {?>
23
  <p class="rule_limit_msg">
24
- <b><?php esc_html_e('This rule is not running currently: ', WDR_TEXT_DOMAIN); ?></b><?php esc_html_e(' Rule reached maximum usage limit ', WDR_TEXT_DOMAIN); ?>
25
  </p><?php
26
  } ?>
27
  </div><?php
@@ -29,11 +29,11 @@
29
  ?>
30
  <div class="notice inline notice notice-warning notice-alt awdr-rule-limit-disabled">
31
  <p class="rule_limit_msg_expired">
32
- <b><?php esc_html_e('This rule is not running currently: ', WDR_TEXT_DOMAIN); ?></b><?php esc_html_e(' Validity expired', WDR_TEXT_DOMAIN); ?>
33
  </p><?php
34
  if ($check_rule_limit == 'Disabled') {?>
35
  <p class="rule_limit_msg">
36
- <b><?php esc_html_e('This rule is not running currently: ', WDR_TEXT_DOMAIN); ?></b><?php esc_html_e(' Rule reached maximum usage limit ', WDR_TEXT_DOMAIN); ?>
37
  </p><?php
38
  } ?>
39
  </div><?php
@@ -41,7 +41,7 @@
41
  if($check_rule_limit == 'Disabled') {?>
42
  <div class="notice inline notice notice-warning notice-alt awdr-rule-limit-disabled">
43
  <p class="rule_limit_msg">
44
- <b><?php esc_html_e('This rule is not running currently: ', WDR_TEXT_DOMAIN); ?></b><?php esc_html_e(' Rule reached maximum usage limit ', WDR_TEXT_DOMAIN); ?>
45
  </p>
46
  </div><?php
47
  }
@@ -63,7 +63,7 @@
63
  <input class="toggle__input" type="checkbox"
64
  name="enabled" <?php echo ($rule->isEnabled()) ? 'checked' : '' ?> value="1">
65
  <span class="toggle__label"><span
66
- class="toggle__text"><?php _e('Enable?', WDR_TEXT_DOMAIN); ?></span></span>
67
  </label>
68
 
69
  </div>
@@ -72,38 +72,38 @@
72
  <input class="toggle__input" type="checkbox"
73
  name="exclusive" <?php echo ($rule->isExclusive()) ? 'checked' : '' ?> value="1">
74
  <span class="toggle__label"><span
75
- class="toggle__text"><?php _e('Apply this rule if matched and ignore all other rules', WDR_TEXT_DOMAIN); ?></span></span>
76
  </label>
77
 
78
  </div><?php
79
  }else{?>
80
  <div class="awdr_normal_enable_check_box">
81
  <label>
82
- <input type="checkbox" name="enabled" class="awdr_enable_check_box_html" <?php echo ($rule->isEnabled()) ? 'checked' : '' ?> value="1"><?php _e('Enable?', WDR_TEXT_DOMAIN); ?>
83
  </label>
84
 
85
  </div>
86
  <div class="awdr_normal_exclusive_check_box">
87
  <label>
88
  <input class="awdr_exclusive_check_box_html" type="checkbox"name="exclusive" <?php echo ($rule->isExclusive()) ? 'checked' : '' ?> value="1">
89
- <?php _e('Apply this rule if matched and ignore all other rules', WDR_TEXT_DOMAIN); ?>
90
  </label>
91
  </div><?php
92
  }
93
 
94
  if (isset($rule_id) && !empty($rule_id)) { ?>
95
  <span class="wdr_desc_text awdr_valide_date_in_desc">
96
- <?php esc_html_e('#Rule ID: ', WDR_TEXT_DOMAIN); ?><b><?php echo $rule_id; ?></b>
97
  </span><?php
98
  } ?>
99
  <div class="awdr-common-save">
100
  <button type="submit" class="btn btn-primary wdr_save_stay">
101
- <?php _e('Save', WDR_TEXT_DOMAIN); ?></button>
102
  <button type="button" class="btn btn-success wdr_save_close">
103
- <?php _e('Save & Close', WDR_TEXT_DOMAIN); ?></button>
104
  <a href="<?php echo admin_url("admin.php?" . http_build_query(array('page' => WDR_SLUG, 'tab' => 'rules'))); ?>"
105
  class="btn btn-danger" style="text-decoration: none">
106
- <?php _e('Cancel', WDR_TEXT_DOMAIN); ?></a>
107
  </div>
108
  </div>
109
  <div class="awdr_discount_type_section">
@@ -112,11 +112,11 @@
112
  $rule_discount_type = $rule->getRuleDiscountType();
113
  ?>
114
  <div class="wdr-discount-type">
115
- <b style="display: block;"><?php _e('Choose a discount type', WDR_TEXT_DOMAIN); ?></b>
116
  <select name="discount_type" class="awdr-product-discount-type wdr-discount-type-selector"
117
  data-placement="wdr-discount-template-placement">
118
  <optgroup label="">
119
- <option value="not_selected"><?php _e("Select Discount Type", WDR_TEXT_DOMAIN); ?></option>
120
  </optgroup><?php
121
  if (isset($wdr_product_discount_types) && !empty($wdr_product_discount_types)) {
122
  foreach ($wdr_product_discount_types as $wdr_discount_key => $wdr_discount_value) {
@@ -139,19 +139,19 @@
139
  disabled="disabled"
140
  <?php
141
  } ?>
142
- <?php echo ($rule_discount_type && $rule_discount_type == $key) ? 'selected' : ''; ?>><?php _e($value['label'], WDR_TEXT_DOMAIN); ?></option><?php
143
  } ?>
144
  </optgroup><?php
145
  }
146
  } ?>
147
  </select>
148
- <sub><a href="https://docs.flycart.org/en/articles/3788550-product-adjustment-discount-rules-2-0?utm_source=woo-discount-rules-v2&utm_campaign=doc&utm_medium=text-click&utm_content=product_adjustment_document" target="_blank" class="awdr_doc_wdr_simple_discount" style="<?php echo ($rule_discount_type != 'wdr_simple_discount') ? 'display: none' : '';?>"><?php _e("Read Docs", WDR_TEXT_DOMAIN); ?></a></sub>
149
- <sub><a href="https://docs.flycart.org/en/articles/3806593-cart-adjustment-discount-rules-2-0?utm_source=woo-discount-rules-v2&utm_campaign=doc&utm_medium=text-click&utm_content=cart_adjustment_document" target="_blank" class="awdr_doc_wdr_cart_discount" style="<?php echo ($rule_discount_type != 'wdr_cart_discount') ? 'display: none' : '';?>"><?php _e("Read Docs", WDR_TEXT_DOMAIN); ?></a></sub>
150
- <sub><a href="https://docs.flycart.org/en/articles/3807036-free-shipping-discount-rules-2-0?utm_source=woo-discount-rules-v2&utm_campaign=doc&utm_medium=text-click&utm_content=free_shipping_document" target="_blank" class="awdr_doc_wdr_free_shipping" style="<?php echo ($rule_discount_type != 'wdr_free_shipping') ? 'display: none' : '';?>"><?php _e("Read Docs", WDR_TEXT_DOMAIN); ?></a></sub>
151
- <sub><a href="https://docs.flycart.org/en/articles/3807208-bulk-discounts-or-tiered-pricings-discount-rules-2-0?utm_source=woo-discount-rules-v2&utm_campaign=doc&utm_medium=text-click&utm_content=bulk_adjustment_document" target="_blank" class="awdr_doc_wdr_bulk_discount" style="<?php echo ($rule_discount_type != 'wdr_bulk_discount') ? 'display: none' : '';?>"><?php _e("Read Docs", WDR_TEXT_DOMAIN); ?></a></sub>
152
- <sub><a href="https://docs.flycart.org/en/articles/3809899-bundle-set-discount-discount-rules-2-0?utm_source=woo-discount-rules-v2&utm_campaign=doc&utm_medium=text-click&utm_content=set_bundle_adjustment_document" target="_blank" class="awdr_doc_wdr_set_discount" style="<?php echo ($rule_discount_type != 'wdr_set_discount') ? 'display: none' : '';?>"><?php _e("Read Docs", WDR_TEXT_DOMAIN); ?></a></sub>
153
- <sub><a href="https://docs.flycart.org/en/articles/3810071-buy-one-get-one-free-buy-x-get-x-discount-rules-2-0?utm_source=woo-discount-rules-v2&utm_campaign=doc&utm_medium=text-click&utm_content=bxgx_adjustment" target="_blank" class="awdr_doc_wdr_buy_x_get_x_discount" style="<?php echo ($rule_discount_type != 'wdr_buy_x_get_x_discount') ? 'display: none' : '';?>"><?php _e("Read Docs", WDR_TEXT_DOMAIN); ?></a></sub>
154
- <sub><a href="https://docs.flycart.org/en/articles/3810570-buy-x-get-y-discount-rules-2-0?utm_source=woo-discount-rules-v2&utm_campaign=doc&utm_medium=text-click&utm_content=bxgy_adjustment_document" target="_blank" class="awdr_doc_wdr_buy_x_get_y_discount" style="<?php echo ($rule_discount_type != 'wdr_buy_x_get_y_discount') ? 'display: none' : '';?>"><?php _e("Read Docs", WDR_TEXT_DOMAIN); ?></a></sub>
155
  </div>
156
  </div>
157
  </div>
@@ -160,10 +160,10 @@
160
  <!-- ------------------------Rule Filter Section Start------------------------ -->
161
  <div class="wdr-rule-filters-and-options-con awdr-filter-section">
162
  <div class="wdr-rule-menu">
163
- <h2 class="awdr-filter-heading"><?php _e("Filter", WDR_TEXT_DOMAIN); ?></h2>
164
  <div class="awdr-filter-content">
165
- <p><?php _e("Choose which <b>gets</b> discount (products/categories/attributes/SKU and so on )", WDR_TEXT_DOMAIN); ?></p>
166
- <p><?php _e("Note : You can also exclude products/categories.", WDR_TEXT_DOMAIN); ?></p>
167
  </div>
168
  </div>
169
  <div class="wdr-rule-options-con">
@@ -206,9 +206,9 @@
206
  <div class="awdr-discount-row">
207
  <div class="wdr-rule-filters-and-options-con">
208
  <div class="wdr-rule-menu">
209
- <h2 class="awdr-discount-heading"><?php _e("Discount", WDR_TEXT_DOMAIN); ?></h2>
210
  <div class="awdr-discount-content">
211
- <p><?php _e("Select discount type and its value (percentage/price/fixed price)", WDR_TEXT_DOMAIN); ?></p>
212
  </div>
213
  </div>
214
  <div class="wdr-rule-options-con">
@@ -262,6 +262,7 @@
262
  <?php
263
  do_action('advanced_woo_discount_rules_admin_after_load_rule_fields', $rule);
264
  $discount_types = $base->discountElements();
 
265
  foreach ($discount_types as $type => $discount_type) {
266
  (isset($discount_type['template']) && !empty($discount_type['template'])) ? include $discount_type['template'] : '';
267
  }
17
  if ($rule_status == 'in_future') { ?>
18
  <div class="notice inline notice notice-warning notice-alt awdr-rule-limit-disabled">
19
  <p class="rule_limit_msg_future">
20
+ <b><?php esc_html_e('This rule is not running currently: ', 'woo-discount-rules'); ?></b><?php esc_html_e(' Start date and time is set in the future date', 'woo-discount-rules'); ?>
21
  </p><?php
22
  if ($check_rule_limit == 'Disabled') {?>
23
  <p class="rule_limit_msg">
24
+ <b><?php esc_html_e('This rule is not running currently: ', 'woo-discount-rules'); ?></b><?php esc_html_e(' Rule reached maximum usage limit ', 'woo-discount-rules'); ?>
25
  </p><?php
26
  } ?>
27
  </div><?php
29
  ?>
30
  <div class="notice inline notice notice-warning notice-alt awdr-rule-limit-disabled">
31
  <p class="rule_limit_msg_expired">
32
+ <b><?php esc_html_e('This rule is not running currently: ', 'woo-discount-rules'); ?></b><?php esc_html_e(' Validity expired', 'woo-discount-rules'); ?>
33
  </p><?php
34
  if ($check_rule_limit == 'Disabled') {?>
35
  <p class="rule_limit_msg">
36
+ <b><?php esc_html_e('This rule is not running currently: ', 'woo-discount-rules'); ?></b><?php esc_html_e(' Rule reached maximum usage limit ', 'woo-discount-rules'); ?>
37
  </p><?php
38
  } ?>
39
  </div><?php
41
  if($check_rule_limit == 'Disabled') {?>
42
  <div class="notice inline notice notice-warning notice-alt awdr-rule-limit-disabled">
43
  <p class="rule_limit_msg">
44
+ <b><?php esc_html_e('This rule is not running currently: ', 'woo-discount-rules'); ?></b><?php esc_html_e(' Rule reached maximum usage limit ', 'woo-discount-rules'); ?>
45
  </p>
46
  </div><?php
47
  }
63
  <input class="toggle__input" type="checkbox"
64
  name="enabled" <?php echo ($rule->isEnabled()) ? 'checked' : '' ?> value="1">
65
  <span class="toggle__label"><span
66
+ class="toggle__text"><?php _e('Enable?', 'woo-discount-rules'); ?></span></span>
67
  </label>
68
 
69
  </div>
72
  <input class="toggle__input" type="checkbox"
73
  name="exclusive" <?php echo ($rule->isExclusive()) ? 'checked' : '' ?> value="1">
74
  <span class="toggle__label"><span
75
+ class="toggle__text"><?php _e('Apply this rule if matched and ignore all other rules', 'woo-discount-rules'); ?></span></span>
76
  </label>
77
 
78
  </div><?php
79
  }else{?>
80
  <div class="awdr_normal_enable_check_box">
81
  <label>
82
+ <input type="checkbox" name="enabled" class="awdr_enable_check_box_html" <?php echo ($rule->isEnabled()) ? 'checked' : '' ?> value="1"><?php _e('Enable?', 'woo-discount-rules'); ?>
83
  </label>
84
 
85
  </div>
86
  <div class="awdr_normal_exclusive_check_box">
87
  <label>
88
  <input class="awdr_exclusive_check_box_html" type="checkbox"name="exclusive" <?php echo ($rule->isExclusive()) ? 'checked' : '' ?> value="1">
89
+ <?php _e('Apply this rule if matched and ignore all other rules', 'woo-discount-rules'); ?>
90
  </label>
91
  </div><?php
92
  }
93
 
94
  if (isset($rule_id) && !empty($rule_id)) { ?>
95
  <span class="wdr_desc_text awdr_valide_date_in_desc">
96
+ <?php esc_html_e('#Rule ID: ', 'woo-discount-rules'); ?><b><?php echo $rule_id; ?></b>
97
  </span><?php
98
  } ?>
99
  <div class="awdr-common-save">
100
  <button type="submit" class="btn btn-primary wdr_save_stay">
101
+ <?php _e('Save', 'woo-discount-rules'); ?></button>
102
  <button type="button" class="btn btn-success wdr_save_close">
103
+ <?php _e('Save & Close', 'woo-discount-rules'); ?></button>
104
  <a href="<?php echo admin_url("admin.php?" . http_build_query(array('page' => WDR_SLUG, 'tab' => 'rules'))); ?>"
105
  class="btn btn-danger" style="text-decoration: none">
106
+ <?php _e('Cancel', 'woo-discount-rules'); ?></a>
107
  </div>
108
  </div>
109
  <div class="awdr_discount_type_section">
112
  $rule_discount_type = $rule->getRuleDiscountType();
113
  ?>
114
  <div class="wdr-discount-type">
115
+ <b style="display: block;"><?php _e('Choose a discount type', 'woo-discount-rules'); ?></b>
116
  <select name="discount_type" class="awdr-product-discount-type wdr-discount-type-selector"
117
  data-placement="wdr-discount-template-placement">
118
  <optgroup label="">
119
+ <option value="not_selected"><?php _e("Select Discount Type", 'woo-discount-rules'); ?></option>
120
  </optgroup><?php
121
  if (isset($wdr_product_discount_types) && !empty($wdr_product_discount_types)) {
122
  foreach ($wdr_product_discount_types as $wdr_discount_key => $wdr_discount_value) {
139
  disabled="disabled"
140
  <?php
141
  } ?>
142
+ <?php echo ($rule_discount_type && $rule_discount_type == $key) ? 'selected' : ''; ?>><?php _e($value['label'], 'woo-discount-rules'); ?></option><?php
143
  } ?>
144
  </optgroup><?php
145
  }
146
  } ?>
147
  </select>
148
+ <sub><a href="https://docs.flycart.org/en/articles/3788550-product-adjustment-discount-rules-2-0?utm_source=woo-discount-rules-v2&utm_campaign=doc&utm_medium=text-click&utm_content=product_adjustment_document" target="_blank" class="awdr_doc_wdr_simple_discount" style="<?php echo ($rule_discount_type != 'wdr_simple_discount') ? 'display: none' : '';?>"><?php _e("Read Docs", 'woo-discount-rules'); ?></a></sub>
149
+ <sub><a href="https://docs.flycart.org/en/articles/3806593-cart-adjustment-discount-rules-2-0?utm_source=woo-discount-rules-v2&utm_campaign=doc&utm_medium=text-click&utm_content=cart_adjustment_document" target="_blank" class="awdr_doc_wdr_cart_discount" style="<?php echo ($rule_discount_type != 'wdr_cart_discount') ? 'display: none' : '';?>"><?php _e("Read Docs", 'woo-discount-rules'); ?></a></sub>
150
+ <sub><a href="https://docs.flycart.org/en/articles/3807036-free-shipping-discount-rules-2-0?utm_source=woo-discount-rules-v2&utm_campaign=doc&utm_medium=text-click&utm_content=free_shipping_document" target="_blank" class="awdr_doc_wdr_free_shipping" style="<?php echo ($rule_discount_type != 'wdr_free_shipping') ? 'display: none' : '';?>"><?php _e("Read Docs", 'woo-discount-rules'); ?></a></sub>
151
+ <sub><a href="https://docs.flycart.org/en/articles/3807208-bulk-discounts-or-tiered-pricings-discount-rules-2-0?utm_source=woo-discount-rules-v2&utm_campaign=doc&utm_medium=text-click&utm_content=bulk_adjustment_document" target="_blank" class="awdr_doc_wdr_bulk_discount" style="<?php echo ($rule_discount_type != 'wdr_bulk_discount') ? 'display: none' : '';?>"><?php _e("Read Docs", 'woo-discount-rules'); ?></a></sub>
152
+ <sub><a href="https://docs.flycart.org/en/articles/3809899-bundle-set-discount-discount-rules-2-0?utm_source=woo-discount-rules-v2&utm_campaign=doc&utm_medium=text-click&utm_content=set_bundle_adjustment_document" target="_blank" class="awdr_doc_wdr_set_discount" style="<?php echo ($rule_discount_type != 'wdr_set_discount') ? 'display: none' : '';?>"><?php _e("Read Docs", 'woo-discount-rules'); ?></a></sub>
153
+ <sub><a href="https://docs.flycart.org/en/articles/3810071-buy-one-get-one-free-buy-x-get-x-discount-rules-2-0?utm_source=woo-discount-rules-v2&utm_campaign=doc&utm_medium=text-click&utm_content=bxgx_adjustment" target="_blank" class="awdr_doc_wdr_buy_x_get_x_discount" style="<?php echo ($rule_discount_type != 'wdr_buy_x_get_x_discount') ? 'display: none' : '';?>"><?php _e("Read Docs", 'woo-discount-rules'); ?></a></sub>
154
+ <sub><a href="https://docs.flycart.org/en/articles/3810570-buy-x-get-y-discount-rules-2-0?utm_source=woo-discount-rules-v2&utm_campaign=doc&utm_medium=text-click&utm_content=bxgy_adjustment_document" target="_blank" class="awdr_doc_wdr_buy_x_get_y_discount" style="<?php echo ($rule_discount_type != 'wdr_buy_x_get_y_discount') ? 'display: none' : '';?>"><?php _e("Read Docs", 'woo-discount-rules'); ?></a></sub>
155
  </div>
156
  </div>
157
  </div>
160
  <!-- ------------------------Rule Filter Section Start------------------------ -->
161
  <div class="wdr-rule-filters-and-options-con awdr-filter-section">
162
  <div class="wdr-rule-menu">
163
+ <h2 class="awdr-filter-heading"><?php _e("Filter", 'woo-discount-rules'); ?></h2>
164
  <div class="awdr-filter-content">
165
+ <p><?php _e("Choose which <b>gets</b> discount (products/categories/attributes/SKU and so on )", 'woo-discount-rules'); ?></p>
166
+ <p><?php _e("Note : You can also exclude products/categories.", 'woo-discount-rules'); ?></p>
167
  </div>
168
  </div>
169
  <div class="wdr-rule-options-con">
206
  <div class="awdr-discount-row">
207
  <div class="wdr-rule-filters-and-options-con">
208
  <div class="wdr-rule-menu">
209
+ <h2 class="awdr-discount-heading"><?php _e("Discount", 'woo-discount-rules'); ?></h2>
210
  <div class="awdr-discount-content">
211
+ <p><?php _e("Select discount type and its value (percentage/price/fixed price)", 'woo-discount-rules'); ?></p>
212
  </div>
213
  </div>
214
  <div class="wdr-rule-options-con">
262
  <?php
263
  do_action('advanced_woo_discount_rules_admin_after_load_rule_fields', $rule);
264
  $discount_types = $base->discountElements();
265
+ //$i = '{i}';
266
  foreach ($discount_types as $type => $discount_type) {
267
  (isset($discount_type['template']) && !empty($discount_type['template'])) ? include $discount_type['template'] : '';
268
  }
v2/App/Views/Admin/Rules/Others/CommonTemplates.php CHANGED
@@ -39,7 +39,7 @@ if (!defined('ABSPATH')) {
39
  ?>
40
  <?php if ($key == 'products') {
41
  echo 'selected';
42
- } ?>><?php _e($value['label'], WDR_TEXT_DOMAIN); ?></option><?php
43
  } ?>
44
  </optgroup><?php
45
  }
@@ -78,13 +78,13 @@ if (!defined('ABSPATH')) {
78
  ?>
79
  <?php if ($key == 'products') {
80
  echo 'selected';
81
- } ?>><?php _e($value['label'], WDR_TEXT_DOMAIN); ?></option><?php
82
  } ?>
83
  </optgroup><?php
84
  }
85
  } ?>
86
  </select>
87
- <span class="wdr_desc_text awdr-clear-both"><?php _e('Condition Type', WDR_TEXT_DOMAIN); ?></span>
88
  </div>
89
  </div>
90
  <?php $wdr_product_conditions_templates = $base->getConditionsTemplatesContent();
@@ -94,5 +94,6 @@ if (!defined('ABSPATH')) {
94
  }
95
  }
96
  $render_saved_condition = false;
97
- include'SubtotalPromotion.php';?>
 
98
  </div>
39
  ?>
40
  <?php if ($key == 'products') {
41
  echo 'selected';
42
+ } ?>><?php _e($value['label'], 'woo-discount-rules'); ?></option><?php
43
  } ?>
44
  </optgroup><?php
45
  }
78
  ?>
79
  <?php if ($key == 'products') {
80
  echo 'selected';
81
+ } ?>><?php _e($value['label'], 'woo-discount-rules'); ?></option><?php
82
  } ?>
83
  </optgroup><?php
84
  }
85
  } ?>
86
  </select>
87
+ <span class="wdr_desc_text awdr-clear-both"><?php _e('Condition Type', 'woo-discount-rules'); ?></span>
88
  </div>
89
  </div>
90
  <?php $wdr_product_conditions_templates = $base->getConditionsTemplatesContent();
94
  }
95
  }
96
  $render_saved_condition = false;
97
+ include'SubtotalPromotion.php';
98
+ include'QuantityPromotion.php'; ?>
99
  </div>
v2/App/Views/Admin/Rules/Others/QuantityPromotion.php ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if (!defined('ABSPATH')) {
3
+ exit; // Exit if accessed directly
4
+ }
5
+
6
+ $operator = isset($options->operator) ? $options->operator : 'less_than';
7
+ $cart_quantity_promotion_from = isset($options->cart_quantity_promotion_from) ? $options->cart_quantity_promotion_from : false;
8
+ $cart_quantity_promotion_message = isset($options->cart_quantity_promotion_message) ? $options->cart_quantity_promotion_message : false;
9
+ echo ($render_saved_condition == true) ? '' : '<div class="wdr-cart-quantity-promo-messeage-main">';
10
+ if($render_saved_condition != true && isset($i)){
11
+ $i = '{i}';
12
+ }
13
+ ?>
14
+
15
+ <div class="wdr_cart_quantity_promotion_container" style="display: grid;">
16
+ <label style="padding-bottom: 20px;"><b><?php _e('Promotion Message', 'woo-discount-rules'); ?></b></label>
17
+ <div class="wdr_cart_cart_quantity_promo_from">
18
+ <label class="awdr-left-align wdr_cart_quantity_promo_filed_name" style="padding-right: 5px;"><?php _e('Quantity from', 'woo-discount-rules'); ?></label>
19
+ <input name="conditions[<?php echo (isset($i)) ? $i : '{i}' ?>][options][cart_quantity_promotion_from]"
20
+ type="text" class="float_only_field awdr-left-align"
21
+ value="<?php echo ($cart_quantity_promotion_from) ? $cart_quantity_promotion_from : '' ?>"
22
+ placeholder="<?php _e('0', 'woo-discount-rules');?>"
23
+ min="0">
24
+ <span class="wdr_desc_text awdr-clear-both"><?php _e('Set a threshold from which you want to start showing promotion message', 'woo-discount-rules'); ?></span>
25
+ <span class="wdr_desc_text awdr-clear-both"><?php _e("<b>Example:</b> Let's say you offer a 10% discount for 5 quantities and above. you may want to set 3 here. So that the customer can see the promo text when his cart quantities reaches 3", 'woo-discount-rules'); ?></span>
26
+ </div>
27
+ <div class="wdr_cart_quantity_promo_msg">
28
+ <p class="wdr_cart_quantity_promo_filed_name"><?php _e('Message', 'woo-discount-rules'); ?></p>
29
+ <textarea
30
+ name="conditions[<?php echo (isset($i)) ? $i : '{i}' ?>][options][cart_quantity_promotion_message]"
31
+ style="height: 60px;"
32
+ placeholder="<?php _e('Buy {{difference_quantity}} more products and get 10% discount', 'woo-discount-rules'); ?>"><?php echo ($cart_quantity_promotion_message) ? $cart_quantity_promotion_message : ''; ?></textarea>
33
+ <span class="wdr_desc_text awdr-clear-both"><?php _e('{{difference_quantity}} -> Difference amount to get discount', 'woo-discount-rules'); ?></span>
34
+ <span class="wdr_desc_text awdr-clear-both"><?php _e('<b>Eg:</b> Buy {{difference_quantity}} more products and get 10% discount', 'woo-discount-rules'); ?></span>
35
+ </div>
36
+ </div><?php
37
+ echo ($render_saved_condition == true) ? '' : '</div>'; ?>
38
+
v2/App/Views/Admin/Rules/Others/SubtotalPromotion.php CHANGED
@@ -7,28 +7,32 @@ $operator = isset($options->operator) ? $options->operator : 'less_than';
7
  $subtotal_promotion_from = isset($options->subtotal_promotion_from) ? $options->subtotal_promotion_from : false;
8
  $subtotal_promotion_message = isset($options->subtotal_promotion_message) ? $options->subtotal_promotion_message : false;
9
  echo ($render_saved_condition == true) ? '' : '<div class="wdr-subtotal-promo-messeage-main">';
 
 
 
 
10
  ?>
11
 
12
  <div class="wdr_subtotal_promotion_container" style="display: grid;">
13
- <label style="padding-bottom: 20px;"><b><?php _e('Promotion Message', WDR_TEXT_DOMAIN); ?></b></label>
14
  <div class="wdr_cart_subtotal_promo_from">
15
- <label class="awdr-left-align wdr_subtotal_promo_filed_name" style="padding-right: 5px;"><?php _e('Subtotal from', WDR_TEXT_DOMAIN); ?></label>
16
  <input name="conditions[<?php echo (isset($i)) ? $i : '{i}' ?>][options][subtotal_promotion_from]"
17
  type="text" class="float_only_field awdr-left-align"
18
  value="<?php echo ($subtotal_promotion_from) ? $subtotal_promotion_from : '' ?>"
19
- placeholder="<?php _e('0.00', WDR_TEXT_DOMAIN);?>"
20
  min="0">
21
- <span class="wdr_desc_text awdr-clear-both"><?php _e('Set a threshold from which you want to start showing promotion message', WDR_TEXT_DOMAIN); ?></span>
22
- <span class="wdr_desc_text awdr-clear-both"><?php _e("<b>Example:</b> Let's say you offer a 10% discount for 1000 and above. you may want to set 900 here. So that the customer can see the promo text when his cart subtotal reaches 900", WDR_TEXT_DOMAIN); ?></span>
23
  </div>
24
  <div class="wdr_cart_subtotal_promo_msg">
25
- <p class="wdr_subtotal_promo_filed_name"><?php _e('Message', WDR_TEXT_DOMAIN); ?></p>
26
  <textarea
27
  name="conditions[<?php echo (isset($i)) ? $i : '{i}' ?>][options][subtotal_promotion_message]"
28
  style="height: 60px;"
29
- placeholder="<?php _e('Spent {{difference_amount}} more and get 10% discount', WDR_TEXT_DOMAIN); ?>"><?php echo ($subtotal_promotion_message) ? $subtotal_promotion_message : ''; ?></textarea>
30
- <span class="wdr_desc_text awdr-clear-both"><?php _e('{{difference_amount}} -> Difference amount to get discount', WDR_TEXT_DOMAIN); ?></span>
31
- <span class="wdr_desc_text awdr-clear-both"><?php _e('<b>Eg:</b> Spent {{difference_amount}} more and get 10% discount', WDR_TEXT_DOMAIN); ?></span>
32
  </div>
33
  </div><?php
34
  echo ($render_saved_condition == true) ? '' : '</div>'; ?>
7
  $subtotal_promotion_from = isset($options->subtotal_promotion_from) ? $options->subtotal_promotion_from : false;
8
  $subtotal_promotion_message = isset($options->subtotal_promotion_message) ? $options->subtotal_promotion_message : false;
9
  echo ($render_saved_condition == true) ? '' : '<div class="wdr-subtotal-promo-messeage-main">';
10
+ if($render_saved_condition != true && isset($i)){
11
+ $i = '{i}';
12
+ }
13
+
14
  ?>
15
 
16
  <div class="wdr_subtotal_promotion_container" style="display: grid;">
17
+ <label style="padding-bottom: 20px;"><b><?php _e('Promotion Message', 'woo-discount-rules'); ?></b></label>
18
  <div class="wdr_cart_subtotal_promo_from">
19
+ <label class="awdr-left-align wdr_subtotal_promo_filed_name" style="padding-right: 5px;"><?php _e('Subtotal from', 'woo-discount-rules'); ?></label>
20
  <input name="conditions[<?php echo (isset($i)) ? $i : '{i}' ?>][options][subtotal_promotion_from]"
21
  type="text" class="float_only_field awdr-left-align"
22
  value="<?php echo ($subtotal_promotion_from) ? $subtotal_promotion_from : '' ?>"
23
+ placeholder="<?php _e('0.00', 'woo-discount-rules');?>"
24
  min="0">
25
+ <span class="wdr_desc_text awdr-clear-both"><?php _e('Set a threshold from which you want to start showing promotion message', 'woo-discount-rules'); ?></span>
26
+ <span class="wdr_desc_text awdr-clear-both"><?php _e("<b>Example:</b> Let's say you offer a 10% discount for 1000 and above. you may want to set 900 here. So that the customer can see the promo text when his cart subtotal reaches 900", 'woo-discount-rules'); ?></span>
27
  </div>
28
  <div class="wdr_cart_subtotal_promo_msg">
29
+ <p class="wdr_subtotal_promo_filed_name"><?php _e('Message', 'woo-discount-rules'); ?></p>
30
  <textarea
31
  name="conditions[<?php echo (isset($i)) ? $i : '{i}' ?>][options][subtotal_promotion_message]"
32
  style="height: 60px;"
33
+ placeholder="<?php _e('Spent {{difference_amount}} more and get 10% discount', 'woo-discount-rules'); ?>"><?php echo ($subtotal_promotion_message) ? $subtotal_promotion_message : ''; ?></textarea>
34
+ <span class="wdr_desc_text awdr-clear-both"><?php _e('{{difference_amount}} -> Difference amount to get discount', 'woo-discount-rules'); ?></span>
35
+ <span class="wdr_desc_text awdr-clear-both"><?php _e('<b>Eg:</b> Spent {{difference_amount}} more and get 10% discount', 'woo-discount-rules'); ?></span>
36
  </div>
37
  </div><?php
38
  echo ($render_saved_condition == true) ? '' : '</div>'; ?>
v2/App/Views/Admin/Tabs/DiscountRule.php CHANGED
@@ -8,39 +8,39 @@ $is_pro = \Wdr\App\Helpers\Helper::hasPro();
8
  <div id="wpbody-content" class="awdr-container">
9
  <div class="" style ="<?php if(!$is_pro){ echo "width: 71%; float: left;"; }?>" >
10
  <div class="col-md-6 col-lg-6 text-left awdr-list-header-btn" <?php if(!$is_pro){ echo 'style="width:100%; float: left"'; }?>>
11
- <h1 class="wp-heading-inline"><?php _e('Discount Rules', WDR_TEXT_DOMAIN); ?></h1>
12
  <a href="<?php echo admin_url("admin.php?" . http_build_query(array('page' => WDR_SLUG, 'tab' => 'rules', 'task' => 'create'))); ?>"
13
- class="btn btn-primary"><?php _e('Add New Rule', WDR_TEXT_DOMAIN); ?></a>
14
  <?php if($has_migration == true) {
15
  ?>
16
- <a class="wdr-popup-link btn btn-primary"><span class="modal-trigger" data-modal="wdr_migration_popup"><?php _e("Migrate rules from v1", WDR_TEXT_DOMAIN); ?></a>
17
 
18
  <div class="modal" id="wdr_migration_popup">
19
  <div class="modal-sandbox"></div>
20
  <div class="modal-box">
21
  <div class="modal-header">
22
  <div class="close-modal"><span class="wdr-close-modal-box">&#10006;</span></div>
23
- <h1 class="wdr-modal-header-title"><?php _e("Migration", WDR_TEXT_DOMAIN); ?></h1>
24
  </div>
25
  <div class="modal-body">
26
  <h2 class="wdr_tabs_container nav-tab-wrapper">
27
- <?php esc_html_e('Migrate rules from v1 to v2', WDR_TEXT_DOMAIN); ?>
28
  </h2>
29
  <div class="wdr_migration_text_con">
30
  <p>
31
- <b><?php esc_html_e('Available price rules', WDR_TEXT_DOMAIN); ?>:</b> <?php echo isset($migration_rule_count['price_rules'])? $migration_rule_count['price_rules']: 0;?>
32
  </p>
33
  <p>
34
- <b><?php esc_html_e('Available cart rules', WDR_TEXT_DOMAIN); ?>:</b> <?php echo isset($migration_rule_count['cart_rules'])? $migration_rule_count['cart_rules']: 0?>
35
  </p>
36
  <p>
37
- <?php _e('Once migration is completed, please open the rules and check their configuration once again to make sure it meets your discount scenario. If required, please adjust the rule configuration. If you need any help, just open a ticket at <a href="https://www.flycart.org/support" target="_blank">https://www.flycart.org/support</a>', WDR_TEXT_DOMAIN); ?>
38
  </p>
39
  </div>
40
  <div class="wdr_settings">
41
  <div class="wdr_migration_container">
42
- <button class="btn btn-primary" type="button" data-awdr_nonce="<?php echo \Wdr\App\Helpers\Helper::create_nonce('awdr_v2_migration'); ?>" id="awdr_do_v1_v2_migration"><?php esc_html_e('Migrate', WDR_TEXT_DOMAIN); ?></button>
43
- <span class="close-modal"><button class="btn btn-warning wdr-close-modal-box" type="button"><?php esc_html_e('Skip', WDR_TEXT_DOMAIN); ?></button></span>
44
  <div class="wdr_migration_process">
45
  </div>
46
  <div class="wdr_migration_process_status">
@@ -53,9 +53,9 @@ $is_pro = \Wdr\App\Helpers\Helper::hasPro();
53
  <?php
54
  }?>
55
  <a href="https://www.flycart.org/woocommerce-discount-rules-examples?utm_source=woo-discount-rules-v2&utm_campaign=doc&utm_medium=text-click&utm_content=examples#commonly-asked-scenarios" target="_blank"
56
- class="btn btn-info text-right" style="float: right"><?php _e('View Examples', WDR_TEXT_DOMAIN); ?></a>
57
  <a href="https://docs.flycart.org/en/collections/2195266-discount-rules-2-0?utm_source=woo-discount-rules-v2&utm_campaign=doc&utm_medium=text-click&utm_content=documentation" target="_blank"
58
- class="btn btn-info text-right" style="float: right"><?php _e('Documentation', WDR_TEXT_DOMAIN); ?></a>
59
  </div>
60
 
61
  <br/>
@@ -65,28 +65,28 @@ $is_pro = \Wdr\App\Helpers\Helper::hasPro();
65
  <input type="hidden" name="name" value="" class="wdr-rule-search-key">
66
  <input type="hidden" name="awdr_nonce" value="<?php echo \Wdr\App\Helpers\Helper::create_nonce('awdr_ajax_search_rule'); ?>">
67
  <input type="submit" class="button" class="wdr-trigger-search-key"
68
- value="<?php _e('Search Rules', WDR_TEXT_DOMAIN); ?>">
69
  </form>
70
  <form id="wdr-bulk-action-top" method="post">
71
  <div class="tablenav top">
72
  <div class="alignleft actions bulkactions">
73
  <label for="bulk-action-selector-top"
74
- class="screen-reader-text"><?php _e('Search Rules', WDR_TEXT_DOMAIN); ?></label>
75
  <select name="wdr_bulk_action" id="bulk-action-selector-top">
76
- <option value="-1"><?php _e('Bulk Actions', WDR_TEXT_DOMAIN); ?></option>
77
- <option value="enable"><?php _e('Enable', WDR_TEXT_DOMAIN); ?></option>
78
- <option value="disable"><?php _e('Disable', WDR_TEXT_DOMAIN); ?></option>
79
- <option value="delete"><?php _e('Delete', WDR_TEXT_DOMAIN); ?></option>
80
  </select>
81
- <input type="submit" id="doaction" class="button action" value="<?php _e('Apply', WDR_TEXT_DOMAIN);?>">
82
  <input type="search" name="awdr-hidden-name" class="awdr-hidden-name" value="<?php echo $input->get('name'); ?>">
83
  <input type="hidden" name="awdr_nonce" value="<?php echo \Wdr\App\Helpers\Helper::create_nonce('awdr_ajax_rule_bulk_actions'); ?>">
84
  <input type="button" class="button awdr-hidden-search"
85
- value="<?php _e('Search Rules', WDR_TEXT_DOMAIN); ?>">
86
  </div>
87
  <div class="tablenav-pages one-page">
88
  <span class="displaying-num"><?php echo $rules_count . ' ';
89
- ($rules_count == 0 || $rules_count == 1) ? _e('item', WDR_TEXT_DOMAIN) : _e('items', WDR_TEXT_DOMAIN); ?></span>
90
  </div>
91
  <br class="clear">
92
  </div>
@@ -102,31 +102,31 @@ $is_pro = \Wdr\App\Helpers\Helper::hasPro();
102
 
103
  <th scope="col" id="title" class="manage-column column-title column-primary sortable desc">
104
  <a href="javascript:void(0);">
105
- <span><?php _e('Title', WDR_TEXT_DOMAIN); ?></span>
106
  <span class="sorting-indicator"></span>
107
  </a>
108
  </th>
109
  <th scope="col" id="author"
110
- class="manage-column column-author"><?php _e('Discount Type', WDR_TEXT_DOMAIN); ?></th>
111
  <th scope="col" id="author"
112
- class="manage-column column-author"><?php _e('Start Date', WDR_TEXT_DOMAIN); ?></th>
113
  <th scope="col" id="tags"
114
- class="manage-column column-tags"><?php _e('Expired On', WDR_TEXT_DOMAIN); ?></th>
115
  <?php
116
  if (count($site_languages) > 1) {
117
  ?>
118
  <th scope="col" id="tags"
119
- class="manage-column column-tags"><?php _e('Language(s)', WDR_TEXT_DOMAIN); ?></th>
120
  <?php
121
  }
122
  ?>
123
  <!--<th scope="col" id="tags" class="manage-column column-tags">
124
- <?php /*_e('Priority',WDR_TEXT_DOMAIN) */?>
125
  </th>-->
126
  <th scope="col" id="status"
127
- class="manage-column column-tags"><?php _e('Status', WDR_TEXT_DOMAIN); ?></th>
128
  <th scope="col" id="title"
129
- class="manage-column column-title"><?php _e('Action', WDR_TEXT_DOMAIN); ?></th>
130
  </tr>
131
  </thead>
132
  <tbody class="wdr-ruleboard" id="sortable"><?php
@@ -148,7 +148,7 @@ $is_pro = \Wdr\App\Helpers\Helper::hasPro();
148
  href="<?php echo admin_url("admin.php?" . http_build_query(array('page' => WDR_SLUG, 'tab' => 'rules', 'task' => 'view', 'id' => $rule_row->getId()))); ?>"
149
  aria-label="“<?php echo $rule_row->getTitle(); ?>” (Edit)"><?php echo $rule_row->getTitle();
150
  if($rule_row->isExclusive()) {?>
151
- <span class="awdr-exclusive-disable-listing"><?php _e('Exclusive', WDR_TEXT_DOMAIN); ?></span> <?php
152
  }?></a>
153
  </strong>
154
  <div class="awdr_created_date_html">
@@ -177,9 +177,9 @@ $is_pro = \Wdr\App\Helpers\Helper::hasPro();
177
  }
178
  $modified_on = $rule_row->getRuleModifiedOn();
179
  if($created_by && !empty($created_by) && !empty($created_on)){ ?>
180
- <span class="wdr_desc_text"><?php _e('Created by: ' .$created_by.'' , WDR_TEXT_DOMAIN);?>,<?php _e(' On: ' . $created_on , WDR_TEXT_DOMAIN); ?> &nbsp;</span><?php }
181
  if($modified_by && !empty($modified_by) && !empty($modified_on)){?>
182
- <span class="wdr_desc_text"><?php _e('Modified by: ' .$modified_by.'' , WDR_TEXT_DOMAIN);?>,<?php _e(' On: ' . $modified_on , WDR_TEXT_DOMAIN); ?> </span><?php
183
  }?>
184
  </div>
185
  </td>
@@ -188,25 +188,25 @@ $is_pro = \Wdr\App\Helpers\Helper::hasPro();
188
  $discount_type_name = '-';
189
  switch ($get_discount_type){
190
  case'wdr_simple_discount':
191
- $discount_type_name = __('Product Adjustment', WDR_TEXT_DOMAIN);
192
  break;
193
  case'wdr_cart_discount':
194
- $discount_type_name = __('Cart Adjustment', WDR_TEXT_DOMAIN);
195
  break;
196
  case'wdr_free_shipping':
197
- $discount_type_name = __('Free Shipping', WDR_TEXT_DOMAIN);
198
  break;
199
  case'wdr_bulk_discount':
200
- $discount_type_name = __('Bulk Discount', WDR_TEXT_DOMAIN);
201
  break;
202
  case'wdr_set_discount':
203
- $discount_type_name = __('Set Discount', WDR_TEXT_DOMAIN);
204
  break;
205
  case'wdr_buy_x_get_x_discount':
206
- $discount_type_name = __('Buy X get X', WDR_TEXT_DOMAIN);
207
  break;
208
  case'wdr_buy_x_get_y_discount':
209
- $discount_type_name = __('Buy X get Y', WDR_TEXT_DOMAIN);
210
  break;
211
  }
212
  ?>
@@ -249,7 +249,7 @@ $is_pro = \Wdr\App\Helpers\Helper::hasPro();
249
  <td class="date column-tag" data-colname="wdr-rule-status">
250
  <label class="switch switch-left-right">
251
  <input class="switch-input wdr_manage_status" name="toogle_action" type="checkbox" data-awdr_="<?php echo $rule_row->getId(); ?>" data-awdr_nonce="<?php echo \Wdr\App\Helpers\Helper::create_nonce('wdr_ajax_manage_status'.$rule_row->getId()); ?>" data-manage-status="<?php echo $rule_row->getId(); ?>" <?php echo ($rule_row->isEnabled()) ? 'checked' : '';?>/>
252
- <span class="switch-label" data-on="<?php _e('Enabled', WDR_TEXT_DOMAIN); ?>" data-off="<?php _e('Disabled', WDR_TEXT_DOMAIN); ?>"></span>
253
  <span class="switch-handle"></span>
254
  </label>
255
  <span class="awdr-enabled-status" style="<?php echo (!$rule_row->isEnabled()) ? 'display:none' : '';?>">
@@ -260,38 +260,38 @@ $is_pro = \Wdr\App\Helpers\Helper::hasPro();
260
  $current_time = $rule_row->formatDate($current_time_stamp, $format = "Y-m-d H:i", false);
261
  if($rule_status == 'in_future'){
262
  if ($check_rule_limit == 'Disabled') { ?>
263
- <span class="awdr-listing-status-text"><?php _e(' - ( Not running )', WDR_TEXT_DOMAIN);?></span><br>
264
- <span class="awdr-text-warning"><b><?php _e('Rule reached maximum usage limit', WDR_TEXT_DOMAIN);?> </b>
265
  </span><?php
266
 
267
  } else{ ?>
268
- <span class="awdr-listing-status-text"><?php _e(' - ( Will run in future)', WDR_TEXT_DOMAIN);?></span><br><?php
269
  if(isset($current_time) && !empty($current_time)) {
270
  ?>
271
- <span class="awdr-text-warning"><b><?php _e('Your server current date and time:', WDR_TEXT_DOMAIN);?> </b><?php echo $current_time; ?>
272
  </span><?php
273
  }
274
  }
275
  }elseif ($rule_status == 'expired'){
276
  if ($check_rule_limit == 'Disabled') { ?>
277
- <span class="awdr-listing-status-text"><?php _e(' - ( Not running )', WDR_TEXT_DOMAIN);?></span><br>
278
- <span class="awdr-text-warning"><b><?php _e('Rule reached maximum usage limit', WDR_TEXT_DOMAIN);?> </b>
279
  </span><?php
280
  } else{ ?>
281
- <span class="awdr-listing-status-text"><?php _e(' - ( Not running - validity expired)', WDR_TEXT_DOMAIN);?></span><br><?php
282
  if(isset($current_time) && !empty($current_time)) {
283
  ?>
284
- <span class="awdr-text-warning"><b><?php _e('Your server current date and time:', WDR_TEXT_DOMAIN);?> </b><?php echo $current_time; ?>
285
  </span><?php
286
  }
287
  }
288
  }else{
289
  if ($check_rule_limit == 'Disabled') { ?>
290
- <span class="awdr-listing-status-text"><?php _e(' - ( Not running )', WDR_TEXT_DOMAIN);?></span><br>
291
- <span class="awdr-text-warning"><b><?php _e('Rule reached maximum usage limit', WDR_TEXT_DOMAIN);?> </b>
292
  </span><?php
293
  } else{ ?>
294
- <span class="awdr-listing-status-text"><?php _e(' - (Running)', WDR_TEXT_DOMAIN);?></span><?php
295
  }
296
  }?>
297
  </span>
@@ -299,12 +299,12 @@ $is_pro = \Wdr\App\Helpers\Helper::hasPro();
299
  <td class="awdr-rule-buttons">
300
  <a class="btn btn-primary"
301
  href="<?php echo admin_url("admin.php?" . http_build_query(array('page' => WDR_SLUG, 'tab' => 'rules', 'task' => 'view', 'id' => $rule_row->getId()))); ?>">
302
- <?php _e('Edit', WDR_TEXT_DOMAIN); ?></a>
303
  <a class="btn btn-primary wdr_duplicate_rule"
304
- data-duplicate-rule="<?php echo $rule_row->getId(); ?>" data-awdr_nonce="<?php echo \Wdr\App\Helpers\Helper::create_nonce('wdr_ajax_duplicate_rule'.$rule_row->getId()); ?>"><?php _e('Duplicate', WDR_TEXT_DOMAIN); ?></a>
305
  <a class="btn btn-danger wdr_delete_rule"
306
  data-delete-rule="<?php echo $rule_row->getId(); ?>" data-awdr_nonce="<?php echo \Wdr\App\Helpers\Helper::create_nonce('wdr_ajax_delete_rule'.$rule_row->getId()); ?>">
307
- <?php _e('Delete', WDR_TEXT_DOMAIN); ?></a>
308
  </td>
309
  </tr>
310
 
@@ -315,7 +315,7 @@ $is_pro = \Wdr\App\Helpers\Helper::hasPro();
315
  <tr class="no-items">
316
  <td></td>
317
  <td></td>
318
- <td class="colspanchange" colspan="2"><?php _e('No rules found.', WDR_TEXT_DOMAIN);?></td>
319
  </tr>
320
  <?php } ?>
321
  </tbody>
@@ -328,31 +328,31 @@ $is_pro = \Wdr\App\Helpers\Helper::hasPro();
328
  </td>
329
  <th scope="col" id="title" class="manage-column column-title column-primary sortable desc">
330
  <a href="javascript:void(0);">
331
- <span><?php _e('Title', WDR_TEXT_DOMAIN); ?></span>
332
  <span class="sorting-indicator"></span>
333
  </a>
334
  </th>
335
  <th scope="col" id="author"
336
- class="manage-column column-author"><?php _e('Discount Type', WDR_TEXT_DOMAIN); ?></th>
337
  <th scope="col" id="author"
338
- class="manage-column column-author"><?php _e('Start Date', WDR_TEXT_DOMAIN); ?></th>
339
  <th scope="col" id="tags"
340
- class="manage-column column-tags"><?php _e('Expired On', WDR_TEXT_DOMAIN); ?></th>
341
  <?php
342
  if (count($site_languages) > 1) {
343
  ?>
344
  <th scope="col" id="tags"
345
- class="manage-column column-tags"><?php _e('Language(s)', WDR_TEXT_DOMAIN); ?></th>
346
  <?php
347
  }
348
  ?>
349
  <!--<th scope="col" id="tags" class="manage-column column-tags">
350
- <?php /*_e('Priority',WDR_TEXT_DOMAIN) */?>
351
  </th>-->
352
  <th scope="col" id="status"
353
- class="manage-column column-tags"><?php _e('Status', WDR_TEXT_DOMAIN); ?></th>
354
  <th scope="col" id="title"
355
- class="manage-column column-title"><?php _e('Action', WDR_TEXT_DOMAIN); ?></th>
356
  </tr>
357
  </tfoot>
358
  </table>
@@ -371,7 +371,7 @@ $is_pro = \Wdr\App\Helpers\Helper::hasPro();
371
  <div class="alignleft actions">
372
  </div>
373
  <div class="tablenav-pages one-page"><span class="displaying-num"><?php echo $rules_count . ' ';
374
- ($rules_count == 0 || $rules_count == 1) ? _e('item', WDR_TEXT_DOMAIN) : _e('items', WDR_TEXT_DOMAIN); ?></span></span>
375
  </div>
376
  <br class="clear">
377
  </div>
@@ -386,26 +386,26 @@ $is_pro = \Wdr\App\Helpers\Helper::hasPro();
386
  if(!$is_pro){ ?>
387
  <div class="col-md-6 col-lg-6 text-right" style="width: 27%; float: right;">
388
  <div class="col-md-12">
389
- <a href="https://www.flycart.org/products/wordpress/woocommerce-discount-rules?utm_source=wpwoodiscountrules&utm_medium=plugin&utm_campaign=inline&utm_content=woo-discount-rules" target="_blank" class="btn btn-success"><?php esc_html_e('Looking for more features? Upgrade to PRO', WDR_TEXT_DOMAIN); ?></a>
390
  </div>
391
  <div class="woo-side-panel">
392
  <div class="panel">
393
  <div class="panel-body">
394
- <h3><?php esc_html_e('With PRO version, you can create:', WDR_TEXT_DOMAIN)?></h3>
395
- <p><?php esc_html_e('- Categories based discounts', WDR_TEXT_DOMAIN)?></p>
396
- <p><?php esc_html_e('- User roles based discounts', WDR_TEXT_DOMAIN)?></p>
397
- <p><?php esc_html_e('- Buy One Get One Free deals', WDR_TEXT_DOMAIN)?></p>
398
- <p><?php esc_html_e('- Buy X Get Y deals', WDR_TEXT_DOMAIN)?></p>
399
- <p><?php esc_html_e('- Buy 2, get 1 at 50% discount', WDR_TEXT_DOMAIN)?></p>
400
- <p><?php esc_html_e('- Buy 3 for $10 (Package / Bundle [Set] Discount)', WDR_TEXT_DOMAIN)?></p>
401
- <p><?php esc_html_e('- Different discounts with one coupon code', WDR_TEXT_DOMAIN)?></p>
402
- <p><?php esc_html_e('- Purchase history based discounts', WDR_TEXT_DOMAIN)?></p>
403
- <p><?php esc_html_e('- Free product / gift', WDR_TEXT_DOMAIN)?></p>
404
- <p><?php esc_html_e('- Discount for variants', WDR_TEXT_DOMAIN)?></p>
405
- <p><?php esc_html_e('- Conditional discounts', WDR_TEXT_DOMAIN)?></p>
406
- <p><?php esc_html_e('- Fixed cost discounts', WDR_TEXT_DOMAIN)?></p>
407
- <p><?php esc_html_e('- Offer fixed price on certain conditions', WDR_TEXT_DOMAIN)?></p>
408
- <p><a href="https://www.flycart.org/products/wordpress/woocommerce-discount-rules?utm_source=wpwoodiscountrules&amp;utm_medium=plugin&amp;utm_campaign=inline&amp;utm_content=woo-discount-rules" class="btn btn-success" target="_blank"><?php esc_html_e('Go PRO', WDR_TEXT_DOMAIN); ?></a></p>
409
  </div>
410
  </div>
411
  </div>
8
  <div id="wpbody-content" class="awdr-container">
9
  <div class="" style ="<?php if(!$is_pro){ echo "width: 71%; float: left;"; }?>" >
10
  <div class="col-md-6 col-lg-6 text-left awdr-list-header-btn" <?php if(!$is_pro){ echo 'style="width:100%; float: left"'; }?>>
11
+ <h1 class="wp-heading-inline"><?php _e('Discount Rules', 'woo-discount-rules'); ?></h1>
12
  <a href="<?php echo admin_url("admin.php?" . http_build_query(array('page' => WDR_SLUG, 'tab' => 'rules', 'task' => 'create'))); ?>"
13
+ class="btn btn-primary"><?php _e('Add New Rule', 'woo-discount-rules'); ?></a>
14
  <?php if($has_migration == true) {
15
  ?>
16
+ <a class="wdr-popup-link btn btn-primary"><span class="modal-trigger" data-modal="wdr_migration_popup"><?php _e("Migrate rules from v1", 'woo-discount-rules'); ?></a>
17
 
18
  <div class="modal" id="wdr_migration_popup">
19
  <div class="modal-sandbox"></div>
20
  <div class="modal-box">
21
  <div class="modal-header">
22
  <div class="close-modal"><span class="wdr-close-modal-box">&#10006;</span></div>
23
+ <h1 class="wdr-modal-header-title"><?php _e("Migration", 'woo-discount-rules'); ?></h1>
24
  </div>
25
  <div class="modal-body">
26
  <h2 class="wdr_tabs_container nav-tab-wrapper">
27
+ <?php esc_html_e('Migrate rules from v1 to v2', 'woo-discount-rules'); ?>
28
  </h2>
29
  <div class="wdr_migration_text_con">
30
  <p>
31
+ <b><?php esc_html_e('Available price rules', 'woo-discount-rules'); ?>:</b> <?php echo isset($migration_rule_count['price_rules'])? $migration_rule_count['price_rules']: 0;?>
32
  </p>
33
  <p>
34
+ <b><?php esc_html_e('Available cart rules', 'woo-discount-rules'); ?>:</b> <?php echo isset($migration_rule_count['cart_rules'])? $migration_rule_count['cart_rules']: 0?>
35
  </p>
36
  <p>
37
+ <?php _e('Once migration is completed, please open the rules and check their configuration once again to make sure it meets your discount scenario. If required, please adjust the rule configuration. If you need any help, just open a ticket at <a href="https://www.flycart.org/support" target="_blank">https://www.flycart.org/support</a>', 'woo-discount-rules'); ?>
38
  </p>
39
  </div>
40
  <div class="wdr_settings">
41
  <div class="wdr_migration_container">
42
+ <button class="btn btn-primary" type="button" data-awdr_nonce="<?php echo \Wdr\App\Helpers\Helper::create_nonce('awdr_v2_migration'); ?>" id="awdr_do_v1_v2_migration"><?php esc_html_e('Migrate', 'woo-discount-rules'); ?></button>
43
+ <span class="close-modal"><button class="btn btn-warning wdr-close-modal-box" type="button"><?php esc_html_e('Skip', 'woo-discount-rules'); ?></button></span>
44
  <div class="wdr_migration_process">
45
  </div>
46
  <div class="wdr_migration_process_status">
53
  <?php
54
  }?>
55
  <a href="https://www.flycart.org/woocommerce-discount-rules-examples?utm_source=woo-discount-rules-v2&utm_campaign=doc&utm_medium=text-click&utm_content=examples#commonly-asked-scenarios" target="_blank"
56
+ class="btn btn-info text-right" style="float: right"><?php _e('View Examples', 'woo-discount-rules'); ?></a>
57
  <a href="https://docs.flycart.org/en/collections/2195266-discount-rules-2-0?utm_source=woo-discount-rules-v2&utm_campaign=doc&utm_medium=text-click&utm_content=documentation" target="_blank"
58
+ class="btn btn-info text-right" style="float: right"><?php _e('Documentation', 'woo-discount-rules'); ?></a>
59
  </div>
60
 
61
  <br/>
65
  <input type="hidden" name="name" value="" class="wdr-rule-search-key">
66
  <input type="hidden" name="awdr_nonce" value="<?php echo \Wdr\App\Helpers\Helper::create_nonce('awdr_ajax_search_rule'); ?>">
67
  <input type="submit" class="button" class="wdr-trigger-search-key"
68
+ value="<?php _e('Search Rules', 'woo-discount-rules'); ?>">
69
  </form>
70
  <form id="wdr-bulk-action-top" method="post">
71
  <div class="tablenav top">
72
  <div class="alignleft actions bulkactions">
73
  <label for="bulk-action-selector-top"
74
+ class="screen-reader-text"><?php _e('Search Rules', 'woo-discount-rules'); ?></label>
75
  <select name="wdr_bulk_action" id="bulk-action-selector-top">
76
+ <option value="-1"><?php _e('Bulk Actions', 'woo-discount-rules'); ?></option>
77
+ <option value="enable"><?php _e('Enable', 'woo-discount-rules'); ?></option>
78
+ <option value="disable"><?php _e('Disable', 'woo-discount-rules'); ?></option>
79
+ <option value="delete"><?php _e('Delete', 'woo-discount-rules'); ?></option>
80
  </select>
81
+ <input type="submit" id="doaction" class="button action" value="<?php _e('Apply', 'woo-discount-rules');?>">
82
  <input type="search" name="awdr-hidden-name" class="awdr-hidden-name" value="<?php echo $input->get('name'); ?>">
83
  <input type="hidden" name="awdr_nonce" value="<?php echo \Wdr\App\Helpers\Helper::create_nonce('awdr_ajax_rule_bulk_actions'); ?>">
84
  <input type="button" class="button awdr-hidden-search"
85
+ value="<?php _e('Search Rules', 'woo-discount-rules'); ?>">
86
  </div>
87
  <div class="tablenav-pages one-page">
88
  <span class="displaying-num"><?php echo $rules_count . ' ';
89
+ ($rules_count == 0 || $rules_count == 1) ? _e('item', 'woo-discount-rules') : _e('items', 'woo-discount-rules'); ?></span>
90
  </div>
91
  <br class="clear">
92
  </div>
102
 
103
  <th scope="col" id="title" class="manage-column column-title column-primary sortable desc">
104
  <a href="javascript:void(0);">
105
+ <span><?php _e('Title', 'woo-discount-rules'); ?></span>
106
  <span class="sorting-indicator"></span>
107
  </a>
108
  </th>
109
  <th scope="col" id="author"
110
+ class="manage-column column-author"><?php _e('Discount Type', 'woo-discount-rules'); ?></th>
111
  <th scope="col" id="author"
112
+ class="manage-column column-author"><?php _e('Start Date', 'woo-discount-rules'); ?></th>
113
  <th scope="col" id="tags"
114
+ class="manage-column column-tags"><?php _e('Expired On', 'woo-discount-rules'); ?></th>
115
  <?php
116
  if (count($site_languages) > 1) {
117
  ?>
118
  <th scope="col" id="tags"
119
+ class="manage-column column-tags"><?php _e('Language(s)', 'woo-discount-rules'); ?></th>
120
  <?php
121
  }
122
  ?>
123
  <!--<th scope="col" id="tags" class="manage-column column-tags">
124
+ <?php /*_e('Priority','woo-discount-rules') */?>
125
  </th>-->
126
  <th scope="col" id="status"
127
+ class="manage-column column-tags"><?php _e('Status', 'woo-discount-rules'); ?></th>
128
  <th scope="col" id="title"
129
+ class="manage-column column-title"><?php _e('Action', 'woo-discount-rules'); ?></th>
130
  </tr>
131
  </thead>
132
  <tbody class="wdr-ruleboard" id="sortable"><?php
148
  href="<?php echo admin_url("admin.php?" . http_build_query(array('page' => WDR_SLUG, 'tab' => 'rules', 'task' => 'view', 'id' => $rule_row->getId()))); ?>"
149
  aria-label="“<?php echo $rule_row->getTitle(); ?>” (Edit)"><?php echo $rule_row->getTitle();
150
  if($rule_row->isExclusive()) {?>
151
+ <span class="awdr-exclusive-disable-listing"><?php _e('Exclusive', 'woo-discount-rules'); ?></span> <?php
152
  }?></a>
153
  </strong>
154
  <div class="awdr_created_date_html">
177
  }
178
  $modified_on = $rule_row->getRuleModifiedOn();
179
  if($created_by && !empty($created_by) && !empty($created_on)){ ?>
180
+ <span class="wdr_desc_text"><?php _e('Created by: ' .$created_by.'' , 'woo-discount-rules');?>,<?php _e(' On: ' . $created_on , 'woo-discount-rules'); ?> &nbsp;</span><?php }
181
  if($modified_by && !empty($modified_by) && !empty($modified_on)){?>
182
+ <span class="wdr_desc_text"><?php _e('Modified by: ' .$modified_by.'' , 'woo-discount-rules');?>,<?php _e(' On: ' . $modified_on , 'woo-discount-rules'); ?> </span><?php
183
  }?>
184
  </div>
185
  </td>
188
  $discount_type_name = '-';
189
  switch ($get_discount_type){
190
  case'wdr_simple_discount':
191
+ $discount_type_name = __('Product Adjustment', 'woo-discount-rules');
192
  break;
193
  case'wdr_cart_discount':
194
+ $discount_type_name = __('Cart Adjustment', 'woo-discount-rules');
195
  break;
196
  case'wdr_free_shipping':
197
+ $discount_type_name = __('Free Shipping', 'woo-discount-rules');
198
  break;
199
  case'wdr_bulk_discount':
200
+ $discount_type_name = __('Bulk Discount', 'woo-discount-rules');
201
  break;
202
  case'wdr_set_discount':
203
+ $discount_type_name = __('Set Discount', 'woo-discount-rules');
204
  break;
205
  case'wdr_buy_x_get_x_discount':
206
+ $discount_type_name = __('Buy X get X', 'woo-discount-rules');
207
  break;
208
  case'wdr_buy_x_get_y_discount':
209
+ $discount_type_name = __('Buy X get Y', 'woo-discount-rules');
210
  break;
211
  }
212
  ?>
249
  <td class="date column-tag" data-colname="wdr-rule-status">
250
  <label class="switch switch-left-right">
251
  <input class="switch-input wdr_manage_status" name="toogle_action" type="checkbox" data-awdr_="<?php echo $rule_row->getId(); ?>" data-awdr_nonce="<?php echo \Wdr\App\Helpers\Helper::create_nonce('wdr_ajax_manage_status'.$rule_row->getId()); ?>" data-manage-status="<?php echo $rule_row->getId(); ?>" <?php echo ($rule_row->isEnabled()) ? 'checked' : '';?>/>
252
+ <span class="switch-label" data-on="<?php _e('Enabled', 'woo-discount-rules'); ?>" data-off="<?php _e('Disabled', 'woo-discount-rules'); ?>"></span>
253
  <span class="switch-handle"></span>
254
  </label>
255
  <span class="awdr-enabled-status" style="<?php echo (!$rule_row->isEnabled()) ? 'display:none' : '';?>">
260
  $current_time = $rule_row->formatDate($current_time_stamp, $format = "Y-m-d H:i", false);
261
  if($rule_status == 'in_future'){
262
  if ($check_rule_limit == 'Disabled') { ?>
263
+ <span class="awdr-listing-status-text"><?php _e(' - ( Not running )', 'woo-discount-rules');?></span><br>
264
+ <span class="awdr-text-warning"><b><?php _e('Rule reached maximum usage limit', 'woo-discount-rules');?> </b>
265
  </span><?php
266
 
267
  } else{ ?>
268
+ <span class="awdr-listing-status-text"><?php _e(' - ( Will run in future)', 'woo-discount-rules');?></span><br><?php
269
  if(isset($current_time) && !empty($current_time)) {
270
  ?>
271
+ <span class="awdr-text-warning"><b><?php _e('Your server current date and time:', 'woo-discount-rules');?> </b><?php echo $current_time; ?>
272
  </span><?php
273
  }
274
  }
275
  }elseif ($rule_status == 'expired'){
276
  if ($check_rule_limit == 'Disabled') { ?>
277
+ <span class="awdr-listing-status-text"><?php _e(' - ( Not running )', 'woo-discount-rules');?></span><br>
278
+ <span class="awdr-text-warning"><b><?php _e('Rule reached maximum usage limit', 'woo-discount-rules');?> </b>
279
  </span><?php
280
  } else{ ?>
281
+ <span class="awdr-listing-status-text"><?php _e(' - ( Not running - validity expired)', 'woo-discount-rules');?></span><br><?php
282
  if(isset($current_time) && !empty($current_time)) {
283
  ?>
284
+ <span class="awdr-text-warning"><b><?php _e('Your server current date and time:', 'woo-discount-rules');?> </b><?php echo $current_time; ?>
285
  </span><?php
286
  }
287
  }
288
  }else{
289
  if ($check_rule_limit == 'Disabled') { ?>
290
+ <span class="awdr-listing-status-text"><?php _e(' - ( Not running )', 'woo-discount-rules');?></span><br>
291
+ <span class="awdr-text-warning"><b><?php _e('Rule reached maximum usage limit', 'woo-discount-rules');?> </b>
292
  </span><?php
293
  } else{ ?>
294
+ <span class="awdr-listing-status-text"><?php _e(' - (Running)', 'woo-discount-rules');?></span><?php
295
  }
296
  }?>
297
  </span>
299
  <td class="awdr-rule-buttons">
300
  <a class="btn btn-primary"
301
  href="<?php echo admin_url("admin.php?" . http_build_query(array('page' => WDR_SLUG, 'tab' => 'rules', 'task' => 'view', 'id' => $rule_row->getId()))); ?>">
302
+ <?php _e('Edit', 'woo-discount-rules'); ?></a>
303
  <a class="btn btn-primary wdr_duplicate_rule"
304
+ data-duplicate-rule="<?php echo $rule_row->getId(); ?>" data-awdr_nonce="<?php echo \Wdr\App\Helpers\Helper::create_nonce('wdr_ajax_duplicate_rule'.$rule_row->getId()); ?>"><?php _e('Duplicate', 'woo-discount-rules'); ?></a>
305
  <a class="btn btn-danger wdr_delete_rule"
306
  data-delete-rule="<?php echo $rule_row->getId(); ?>" data-awdr_nonce="<?php echo \Wdr\App\Helpers\Helper::create_nonce('wdr_ajax_delete_rule'.$rule_row->getId()); ?>">
307
+ <?php _e('Delete', 'woo-discount-rules'); ?></a>
308
  </td>
309
  </tr>
310
 
315
  <tr class="no-items">
316
  <td></td>
317
  <td></td>
318
+ <td class="colspanchange" colspan="2"><?php _e('No rules found.', 'woo-discount-rules');?></td>
319
  </tr>
320
  <?php } ?>
321
  </tbody>
328
  </td>
329
  <th scope="col" id="title" class="manage-column column-title column-primary sortable desc">
330
  <a href="javascript:void(0);">
331
+ <span><?php _e('Title', 'woo-discount-rules'); ?></span>
332
  <span class="sorting-indicator"></span>
333
  </a>
334
  </th>
335
  <th scope="col" id="author"
336
+ class="manage-column column-author"><?php _e('Discount Type', 'woo-discount-rules'); ?></th>
337
  <th scope="col" id="author"
338
+ class="manage-column column-author"><?php _e('Start Date', 'woo-discount-rules'); ?></th>
339
  <th scope="col" id="tags"
340
+ class="manage-column column-tags"><?php _e('Expired On', 'woo-discount-rules'); ?></th>
341
  <?php
342
  if (count($site_languages) > 1) {
343
  ?>
344
  <th scope="col" id="tags"
345
+ class="manage-column column-tags"><?php _e('Language(s)', 'woo-discount-rules'); ?></th>
346
  <?php
347
  }
348
  ?>
349
  <!--<th scope="col" id="tags" class="manage-column column-tags">
350
+ <?php /*_e('Priority','woo-discount-rules') */?>
351
  </th>-->
352
  <th scope="col" id="status"
353
+ class="manage-column column-tags"><?php _e('Status', 'woo-discount-rules'); ?></th>
354
  <th scope="col" id="title"
355
+ class="manage-column column-title"><?php _e('Action', 'woo-discount-rules'); ?></th>
356
  </tr>
357
  </tfoot>
358
  </table>
371
  <div class="alignleft actions">
372
  </div>
373
  <div class="tablenav-pages one-page"><span class="displaying-num"><?php echo $rules_count . ' ';
374
+ ($rules_count == 0 || $rules_count == 1) ? _e('item', 'woo-discount-rules') : _e('items', 'woo-discount-rules'); ?></span></span>
375
  </div>
376
  <br class="clear">
377
  </div>
386
  if(!$is_pro){ ?>
387
  <div class="col-md-6 col-lg-6 text-right" style="width: 27%; float: right;">
388
  <div class="col-md-12">
389
+ <a href="https://www.flycart.org/products/wordpress/woocommerce-discount-rules?utm_source=wpwoodiscountrules&utm_medium=plugin&utm_campaign=inline&utm_content=woo-discount-rules" target="_blank" class="btn btn-success"><?php esc_html_e('Looking for more features? Upgrade to PRO', 'woo-discount-rules'); ?></a>
390
  </div>
391
  <div class="woo-side-panel">
392
  <div class="panel">
393
  <div class="panel-body">
394
+ <h3><?php esc_html_e('With PRO version, you can create:', 'woo-discount-rules')?></h3>
395
+ <p><?php esc_html_e('- Categories based discounts', 'woo-discount-rules')?></p>
396
+ <p><?php esc_html_e('- User roles based discounts', 'woo-discount-rules')?></p>
397
+ <p><?php esc_html_e('- Buy One Get One Free deals', 'woo-discount-rules')?></p>
398
+ <p><?php esc_html_e('- Buy X Get Y deals', 'woo-discount-rules')?></p>
399
+ <p><?php esc_html_e('- Buy 2, get 1 at 50% discount', 'woo-discount-rules')?></p>
400
+ <p><?php esc_html_e('- Buy 3 for $10 (Package / Bundle [Set] Discount)', 'woo-discount-rules')?></p>
401
+ <p><?php esc_html_e('- Different discounts with one coupon code', 'woo-discount-rules')?></p>
402
+ <p><?php esc_html_e('- Purchase history based discounts', 'woo-discount-rules')?></p>
403
+ <p><?php esc_html_e('- Free product / gift', 'woo-discount-rules')?></p>
404
+ <p><?php esc_html_e('- Discount for variants', 'woo-discount-rules')?></p>
405
+ <p><?php esc_html_e('- Conditional discounts', 'woo-discount-rules')?></p>
406
+ <p><?php esc_html_e('- Fixed cost discounts', 'woo-discount-rules')?></p>
407
+ <p><?php esc_html_e('- Offer fixed price on certain conditions', 'woo-discount-rules')?></p>
408
+ <p><a href="https://www.flycart.org/products/wordpress/woocommerce-discount-rules?utm_source=wpwoodiscountrules&amp;utm_medium=plugin&amp;utm_campaign=inline&amp;utm_content=woo-discount-rules" class="btn btn-success" target="_blank"><?php esc_html_e('Go PRO', 'woo-discount-rules'); ?></a></p>
409
  </div>
410
  </div>
411
  </div>
v2/App/Views/Admin/Tabs/ImportExport.php CHANGED
@@ -10,13 +10,13 @@ $is_pro_activated = isset($is_pro_activated) ? $is_pro_activated : false;
10
  <div class="wdr_settings ui-page-theme-a awdr-container">
11
  <div class="wdr_settings_container" style="border-bottom: 1px solid black; padding-bottom: 10px;">
12
  <div>
13
- <h3><?php _e('Export tool', WDR_TEXT_DOMAIN); ?></h3>
14
  <div>
15
  <p>
16
  <form method="post">
17
  <input type="hidden" name="security" value="<?php echo wp_create_nonce('awdr_export_rules') ?>">
18
  <button type="submit" id="wdr-export" name="wdr-export" class="button button-primary">
19
- <?php _e('Export', WDR_TEXT_DOMAIN); ?>
20
  </button>
21
  </form>
22
  </p>
@@ -26,7 +26,7 @@ $is_pro_activated = isset($is_pro_activated) ? $is_pro_activated : false;
26
  <?php if ($is_pro_activated) { ?>
27
  <div class="wdr_settings_container">
28
  <div>
29
- <h3><?php _e('Import Tool', WDR_TEXT_DOMAIN); ?></h3>
30
  <div><?php
31
  $message = '';
32
  if (isset($_POST['wdr-import']) && isset($_FILES["awdr_import_rule"]) && isset($_POST['security'])) {
@@ -96,7 +96,7 @@ $is_pro_activated = isset($is_pro_activated) ? $is_pro_activated : false;
96
  'enabled' => $enabled,
97
  'deleted' => $deleted,
98
  'exclusive' => $exclusive,
99
- 'title' => (empty($title)) ? esc_html__('Untitled Rule', WDR_TEXT_DOMAIN) : $title,
100
  'priority' => $priority,
101
  'apply_to' => $apply_to,
102
  'filters' => $filters,
@@ -127,10 +127,10 @@ $is_pro_activated = isset($is_pro_activated) ? $is_pro_activated : false;
127
  $rule_id = DBTable::saveRule($column_format, $arg);
128
  if (!empty($rule_id)) {
129
  $type = "success";
130
- $message = __('<b style="color: green;">Rules Imported successfully</b>', WDR_TEXT_DOMAIN);
131
  } else {
132
  $type = "error";
133
- $message = __('<b style="color: red;">Problem in Importing CSV Data</b>', WDR_TEXT_DOMAIN);
134
  break;
135
  }
136
  }
@@ -143,7 +143,7 @@ $is_pro_activated = isset($is_pro_activated) ? $is_pro_activated : false;
143
  <input type="file" name="awdr_import_rule" id="awdr-file-uploader" accept=".csv"><br>
144
  <span id="awdr-upload-response"><?php echo $message; ?></span></br>
145
  <button type="submit" id="wdr-import" name="wdr-import" class="button button-primary">
146
- <?php _e('Import', WDR_TEXT_DOMAIN); ?>
147
  </button>
148
  </form>
149
  </div>
@@ -152,8 +152,8 @@ $is_pro_activated = isset($is_pro_activated) ? $is_pro_activated : false;
152
  } else { ?>
153
  <div class="wdr_settings_container">
154
  <div>
155
- <h3><?php _e('Import Tool', WDR_TEXT_DOMAIN); ?></h3>
156
- <p><?php _e('Unlock this feature by <a href="https://www.flycart.org/products/wordpress/woocommerce-discount-rules" target="_blank">Upgrading to Pro</a>', WDR_TEXT_DOMAIN); ?> </p>
157
  </div>
158
  </div><?php
159
  }
10
  <div class="wdr_settings ui-page-theme-a awdr-container">
11
  <div class="wdr_settings_container" style="border-bottom: 1px solid black; padding-bottom: 10px;">
12
  <div>
13
+ <h3><?php _e('Export tool', 'woo-discount-rules'); ?></h3>
14
  <div>
15
  <p>
16
  <form method="post">
17
  <input type="hidden" name="security" value="<?php echo wp_create_nonce('awdr_export_rules') ?>">
18
  <button type="submit" id="wdr-export" name="wdr-export" class="button button-primary">
19
+ <?php _e('Export', 'woo-discount-rules'); ?>
20
  </button>
21
  </form>
22
  </p>
26
  <?php if ($is_pro_activated) { ?>
27
  <div class="wdr_settings_container">
28
  <div>
29
+ <h3><?php _e('Import Tool', 'woo-discount-rules'); ?></h3>
30
  <div><?php
31
  $message = '';
32
  if (isset($_POST['wdr-import']) && isset($_FILES["awdr_import_rule"]) && isset($_POST['security'])) {
96
  'enabled' => $enabled,
97
  'deleted' => $deleted,
98
  'exclusive' => $exclusive,
99
+ 'title' => (empty($title)) ? esc_html__('Untitled Rule', 'woo-discount-rules') : $title,
100
  'priority' => $priority,
101
  'apply_to' => $apply_to,
102
  'filters' => $filters,
127
  $rule_id = DBTable::saveRule($column_format, $arg);
128
  if (!empty($rule_id)) {
129
  $type = "success";
130
+ $message = __('<b style="color: green;">Rules Imported successfully</b>', 'woo-discount-rules');
131
  } else {
132
  $type = "error";
133
+ $message = __('<b style="color: red;">Problem in Importing CSV Data</b>', 'woo-discount-rules');
134
  break;
135
  }
136
  }
143
  <input type="file" name="awdr_import_rule" id="awdr-file-uploader" accept=".csv"><br>
144
  <span id="awdr-upload-response"><?php echo $message; ?></span></br>
145
  <button type="submit" id="wdr-import" name="wdr-import" class="button button-primary">
146
+ <?php _e('Import', 'woo-discount-rules'); ?>
147
  </button>
148
  </form>
149
  </div>
152
  } else { ?>
153
  <div class="wdr_settings_container">
154
  <div>
155
+ <h3><?php _e('Import Tool', 'woo-discount-rules'); ?></h3>
156
+ <p><?php _e('Unlock this feature by <a href="https://www.flycart.org/products/wordpress/woocommerce-discount-rules" target="_blank">Upgrading to Pro</a>', 'woo-discount-rules'); ?> </p>
157
  </div>
158
  </div><?php
159
  }
v2/App/Views/Admin/Tabs/Statistics.php CHANGED
@@ -36,33 +36,33 @@ if (!defined('ABSPATH')) {
36
  <div class="wdr-rule-statistics">
37
  <div class="statistics_date_range">
38
  <select name="period" class="chart-period" style="height: 33px">
39
- <option value="this_week"><?php _e('This Week', WDR_TEXT_DOMAIN); ?></option>
40
- <option value="this_month"><?php _e('This Month', WDR_TEXT_DOMAIN); ?></option>
41
- <option value="custom"><?php _e('Custom Range', WDR_TEXT_DOMAIN); ?></option>
42
  </select>
43
- <!-- <span class="wdr_desc_text"><?php /*_e('Report Period', WDR_TEXT_DOMAIN); */?></span>-->
44
  </div>
45
  <div class="wdr-dateandtime-value">
46
  <input type="text"
47
  name="from"
48
  class="wdr-condition-date wdr-title chart-period-start" data-class="start_dateonly"
49
- placeholder="<?php _e('From: yyyy/mm/dd', WDR_TEXT_DOMAIN); ?>" data-field="date"
50
  autocomplete="off"
51
  id="rule_datetime_from" value="<?php if (isset($date[0]) && !empty($date[0])) {
52
  echo $date[0];
53
  } ?>" style="height: 34px;">
54
- <!--<span class="wdr_desc_text"><?php /*_e('From', WDR_TEXT_DOMAIN); */?></span>-->
55
  </div>
56
  <div class="wdr-dateandtime-value">
57
  <input type="text"
58
  name="to"
59
  class="wdr-condition-date wdr-title chart-period-end" data-class="end_dateonly"
60
- placeholder="<?php _e('To: yyyy/mm/dd', WDR_TEXT_DOMAIN); ?>"
61
  data-field="date" autocomplete="off"
62
  id="rule_datetime_to" value="<?php if (isset($date[1]) && !empty($date[1])) {
63
  echo $date[1];
64
  } ?>" style="height: 34px;">
65
- <!--<span class="wdr_desc_text"><?php /*_e('To', WDR_TEXT_DOMAIN); */?></span>-->
66
  </div>
67
  <div class="awdr-report-type" >
68
  <select name="type" class="chart-type awdr-show-report-limit" style="height: 33px">
@@ -74,26 +74,26 @@ if (!defined('ABSPATH')) {
74
  </optgroup>
75
  <?php endforeach; ?>
76
  </select>
77
- <!--<span class="wdr_desc_text"><?php /*_e('Select Rule', WDR_TEXT_DOMAIN); */?></span>-->
78
  </div>
79
  <!--<div class="show_hide_awdr_report_limit">
80
  <input type="number"
81
  name="limit"
82
  class="number_only_field"
83
  min="1"
84
- placeholder="<?php /*_e('5', WDR_TEXT_DOMAIN); */?>"
85
  autocomplete="off"
86
  value="" style="height: 34px;">
87
- <span class="wdr_desc_text"><?php /*_e('Report Limit (Eg: Top 5)', WDR_TEXT_DOMAIN); */?></span>
88
  </div>-->
89
  <div> <!--class="awdr-toggle-report-update"--> <!--style="display: none;>"-->
90
  <input type="hidden" name="awdr_nonce" value="<?php echo \Wdr\App\Helpers\Helper::create_nonce('wdr_ajax_report'); ?>">
91
- <button type="submit" class="update-chart btn btn-success"><?php _e('Update Chart', WDR_TEXT_DOMAIN); ?></button>
92
  </div>
93
  </div>
94
  <!-- <div class="wdr-rule-statistics awdr-report-update">
95
  <div class="">
96
- <button type="submit" class="btn btn-success"><?php /*_e('Update Chart', WDR_TEXT_DOMAIN); */?></button>
97
  </div>
98
  </div>-->
99
  </form>
36
  <div class="wdr-rule-statistics">
37
  <div class="statistics_date_range">
38
  <select name="period" class="chart-period" style="height: 33px">
39
+ <option value="this_week"><?php _e('This Week', 'woo-discount-rules'); ?></option>
40
+ <option value="this_month"><?php _e('This Month', 'woo-discount-rules'); ?></option>
41
+ <option value="custom"><?php _e('Custom Range', 'woo-discount-rules'); ?></option>
42
  </select>
43
+ <!-- <span class="wdr_desc_text"><?php /*_e('Report Period', 'woo-discount-rules'); */?></span>-->
44
  </div>
45
  <div class="wdr-dateandtime-value">
46
  <input type="text"
47
  name="from"
48
  class="wdr-condition-date wdr-title chart-period-start" data-class="start_dateonly"
49
+ placeholder="<?php _e('From: yyyy/mm/dd', 'woo-discount-rules'); ?>" data-field="date"
50
  autocomplete="off"
51
  id="rule_datetime_from" value="<?php if (isset($date[0]) && !empty($date[0])) {
52
  echo $date[0];
53
  } ?>" style="height: 34px;">
54
+ <!--<span class="wdr_desc_text"><?php /*_e('From', 'woo-discount-rules'); */?></span>-->
55
  </div>
56
  <div class="wdr-dateandtime-value">
57
  <input type="text"
58
  name="to"
59
  class="wdr-condition-date wdr-title chart-period-end" data-class="end_dateonly"
60
+ placeholder="<?php _e('To: yyyy/mm/dd', 'woo-discount-rules'); ?>"
61
  data-field="date" autocomplete="off"
62
  id="rule_datetime_to" value="<?php if (isset($date[1]) && !empty($date[1])) {
63
  echo $date[1];
64
  } ?>" style="height: 34px;">
65
+ <!--<span class="wdr_desc_text"><?php /*_e('To', 'woo-discount-rules'); */?></span>-->
66
  </div>
67
  <div class="awdr-report-type" >
68
  <select name="type" class="chart-type awdr-show-report-limit" style="height: 33px">
74
  </optgroup>
75
  <?php endforeach; ?>
76
  </select>
77
+ <!--<span class="wdr_desc_text"><?php /*_e('Select Rule', 'woo-discount-rules'); */?></span>-->
78
  </div>
79
  <!--<div class="show_hide_awdr_report_limit">
80
  <input type="number"
81
  name="limit"
82
  class="number_only_field"
83
  min="1"
84
+ placeholder="<?php /*_e('5', 'woo-discount-rules'); */?>"
85
  autocomplete="off"
86
  value="" style="height: 34px;">
87
+ <span class="wdr_desc_text"><?php /*_e('Report Limit (Eg: Top 5)', 'woo-discount-rules'); */?></span>
88
  </div>-->
89
  <div> <!--class="awdr-toggle-report-update"--> <!--style="display: none;>"-->
90
  <input type="hidden" name="awdr_nonce" value="<?php echo \Wdr\App\Helpers\Helper::create_nonce('wdr_ajax_report'); ?>">
91
+ <button type="submit" class="update-chart btn btn-success"><?php _e('Update Chart', 'woo-discount-rules'); ?></button>
92
  </div>
93
  </div>
94
  <!-- <div class="wdr-rule-statistics awdr-report-update">
95
  <div class="">
96
+ <button type="submit" class="btn btn-success"><?php /*_e('Update Chart', 'woo-discount-rules'); */?></button>
97
  </div>
98
  </div>-->
99
  </form>
v2/App/Views/Admin/Tabs/compatible.php CHANGED
@@ -9,7 +9,7 @@
9
  <div class="awdr-compatible-form">
10
  <form name="compatible_form" id="compatible-form" method="post">
11
  <?php $has_compatibility_plugin = false; ?>
12
- <h1><?php _e('Compatibility for Woo Discount Rules', WDR_TEXT_DOMAIN) ?></h1>
13
  <div class="awdr-compatible-field-container">
14
  <?php
15
  $base->loadFields($has_compatibility_plugin);
@@ -21,14 +21,14 @@
21
  <div class="save-configuration">
22
  <p class="submit">
23
  <button type="submit" name="awdr_compatibility_submit" id="submit" class="button button-primary save-compatibility-submit"
24
- value="1"><?php esc_html_e('Save Changes', WDR_TEXT_DOMAIN); ?></button></p>
25
  </div>
26
  <?php
27
  } else{
28
  ?>
29
  <div class="">
30
  <?php esc_html_e('This section lists plugins that require a compatibility with discount rules to resolve conflicts.
31
- Please tick them (by checking the box) and then save. This will help discount rules to run smoothly along with these plugins', WDR_TEXT_DOMAIN); ?>
32
  </div>
33
  <?php
34
  }
9
  <div class="awdr-compatible-form">
10
  <form name="compatible_form" id="compatible-form" method="post">
11
  <?php $has_compatibility_plugin = false; ?>
12
+ <h1><?php _e('Compatibility for Woo Discount Rules', 'woo-discount-rules') ?></h1>
13
  <div class="awdr-compatible-field-container">
14
  <?php
15
  $base->loadFields($has_compatibility_plugin);
21
  <div class="save-configuration">
22
  <p class="submit">
23
  <button type="submit" name="awdr_compatibility_submit" id="submit" class="button button-primary save-compatibility-submit"
24
+ value="1"><?php esc_html_e('Save Changes', 'woo-discount-rules'); ?></button></p>
25
  </div>
26
  <?php
27
  } else{
28
  ?>
29
  <div class="">
30
  <?php esc_html_e('This section lists plugins that require a compatibility with discount rules to resolve conflicts.
31
+ Please tick them (by checking the box) and then save. This will help discount rules to run smoothly along with these plugins', 'woo-discount-rules'); ?>
32
  </div>
33
  <?php
34
  }
v2/App/Views/Admin/Tabs/help.php CHANGED
@@ -9,7 +9,7 @@ if (!defined('ABSPATH')) {
9
  <div class="row form-group">
10
  <div class="col-md-12">
11
  <br>
12
- <h4><?php _e('Documentation', WDR_TEXT_DOMAIN);?></h4>
13
  <hr>
14
  </div>
15
  </div>
@@ -17,8 +17,8 @@ if (!defined('ABSPATH')) {
17
  <div class="col-md-12">
18
  <div class="wdr_read_documentation_con"><a class="wdr_read_documentation"
19
  href="https://docs.flycart.org/woocommerce-discount-rules/introduction/getting-started?utm_source=woo-discount-rules&amp;utm_campaign=doc&amp;utm_medium=text-click&amp;getting_started"
20
- target="_blank"><?php _e('Getting started', WDR_TEXT_DOMAIN);?></a>
21
- <p class=""><?php _e('Welcome onboard', WDR_TEXT_DOMAIN);?></p></div>
22
  </div>
23
  <div class="col-md-12">
24
  <div class="wdr_read_documentation_con"><a class="wdr_read_documentation"
9
  <div class="row form-group">
10
  <div class="col-md-12">
11
  <br>
12
+ <h4><?php _e('Documentation', 'woo-discount-rules');?></h4>
13
  <hr>
14
  </div>
15
  </div>
17
  <div class="col-md-12">
18
  <div class="wdr_read_documentation_con"><a class="wdr_read_documentation"
19
  href="https://docs.flycart.org/woocommerce-discount-rules/introduction/getting-started?utm_source=woo-discount-rules&amp;utm_campaign=doc&amp;utm_medium=text-click&amp;getting_started"
20
+ target="_blank"><?php _e('Getting started', 'woo-discount-rules');?></a>
21
+ <p class=""><?php _e('Welcome onboard', 'woo-discount-rules');?></p></div>
22
  </div>
23
  <div class="col-md-12">
24
  <div class="wdr_read_documentation_con"><a class="wdr_read_documentation"
v2/App/Views/Admin/Tabs/settings.php CHANGED
@@ -12,7 +12,7 @@
12
  <div class="awdr-configuration-form">
13
  <form name="configuration_form" id="configuration-form" method="post">
14
 
15
- <h1><?php _e('General', WDR_TEXT_DOMAIN) ?></h1>
16
  <table class="wdr-general-setting form-table">
17
  <tbody style="background-color: #fff;">
18
  <?php
@@ -20,90 +20,90 @@
20
  ?>
21
  <tr>
22
  <td scope="row">
23
- <label for="calculate_discount_from" class="awdr-left-align"><?php _e('Calculate discount from', WDR_TEXT_DOMAIN) ?></label>
24
- <span class="wdr_settings_desc_text awdr-clear-both"><?php esc_attr_e('sale price or regular price', WDR_TEXT_DOMAIN); ?> - <a href="https://docs.flycart.org/en/articles/4167066-discount-based-on-regular-price-sale-price-discount-rules-2-0?utm_source=woo-discount-rules-v2&utm_campaign=doc&utm_medium=text-click&utm_content=sale_regular_price_settings" target="_blank"><?php esc_html_e('Read Docs', WDR_TEXT_DOMAIN); ?></a></span>
25
  </td>
26
  <td>
27
  <select name="calculate_discount_from">
28
- <option value="sale_price" <?php echo ($configuration->getConfig('calculate_discount_from', 'sale_price') == 'sale_price') ? 'selected' : ''; ?>><?php _e('Sale price', WDR_TEXT_DOMAIN); ?></option>
29
- <option value="regular_price" <?php echo ($configuration->getConfig('calculate_discount_from', 'sale_price') == 'regular_price') ? 'selected' : ''; ?> ><?php _e('Regular price', WDR_TEXT_DOMAIN); ?></option>
30
  </select>
31
  </td>
32
  </tr>
33
  <tr>
34
  <td scope="row">
35
- <label for="apply_product_discount_to" class="awdr-left-align"><?php _e('Apply discount', WDR_TEXT_DOMAIN) ?></label>
36
- <span class="wdr_settings_desc_text awdr-clear-both"><?php esc_attr_e('Highest/Lowest/First/All matched rules', WDR_TEXT_DOMAIN); ?></span>
37
  </td>
38
  <td>
39
  <select name="apply_product_discount_to" class="apply_product_and_cart_discount_to" data-subsequent="apply_product_discount_subsequently_row">
40
- <option value="biggest_discount" <?php echo ($configuration->getConfig('apply_product_discount_to', 'biggest_discount') == 'biggest_discount') ? 'selected' : ''; ?>><?php _e('Biggest one from matched rules', WDR_TEXT_DOMAIN); ?></option>
41
- <option value="lowest_discount" <?php echo ($configuration->getConfig('apply_product_discount_to', 'biggest_discount') == 'lowest_discount') ? 'selected' : ''; ?>><?php _e('Lowest one from matched rules', WDR_TEXT_DOMAIN); ?></option>
42
- <option value="first" <?php echo ($configuration->getConfig('apply_product_discount_to', 'biggest_discount') == 'first') ? 'selected' : ''; ?> ><?php _e('First matched rules', WDR_TEXT_DOMAIN); ?></option>
43
- <option value="all" <?php echo ($configuration->getConfig('apply_product_discount_to', 'biggest_discount') == 'all') ? 'selected' : ''; ?>><?php _e('All matched rules', WDR_TEXT_DOMAIN); ?></option>
44
  </select>
45
  </td>
46
  </tr>
47
  <tr class="apply_product_discount_subsequently_row" style="<?php echo ($configuration->getConfig('apply_product_discount_to', 'biggest_discount') != 'all') ? 'display:none' : ''; ?>">
48
  <td scope="row">
49
- <label for="awdr_subsequent_discount" class="awdr-left-align"><?php _e('Apply discount subsequently', WDR_TEXT_DOMAIN) ?></label>
50
- <span class="wdr_settings_desc_text awdr-clear-both"><?php esc_attr_e('discounts applied subsequently', WDR_TEXT_DOMAIN); ?></span>
51
  </td>
52
  <td>
53
  <input type="radio" name="apply_discount_subsequently" id="do_apply_discount_subsequently"
54
  value="1" <?php echo($configuration->getConfig('apply_discount_subsequently', 0) ? 'checked' : '') ?>><label
55
- for="do_apply_discount_subsequently"><?php _e('Yes', WDR_TEXT_DOMAIN); ?></label>
56
  <input type="radio" name="apply_discount_subsequently"
57
  id="do_not_apply_discount_subsequently"
58
  value="0" <?php echo(!$configuration->getConfig('apply_discount_subsequently', 0) ? 'checked' : '') ?>><label
59
- for="do_not_apply_discount_subsequently"><?php _e('No', WDR_TEXT_DOMAIN); ?></label>
60
  </td>
61
  </tr>
62
  <tr>
63
  <td scope="row">
64
- <label for="disable_coupon_when_rule_applied" class="awdr-left-align"><?php _e('Choose how discount rules should work', WDR_TEXT_DOMAIN) ?> - <a href=" https://docs.flycart.org/en/articles/4178875-choose-how-discount-rules-should-work-when-woocommerce-coupons-are-used-2-0?utm_source=woo-discount-rules-v2&utm_campaign=doc&utm_medium=text-click&utm_content=choose_how_discount_rules_works_setting" target="_blank"><?php esc_html_e('Read Docs', WDR_TEXT_DOMAIN); ?></a></label>
65
- <span class="wdr_settings_desc_text awdr-clear-both"><?php esc_attr_e('Choose how discount rules should work when WooCommerce coupons (or third party) coupons are used?', WDR_TEXT_DOMAIN); ?></span>
66
  </td>
67
  <td>
68
  <?php
69
  $disable_coupon_when_rule_applied = $configuration->getConfig('disable_coupon_when_rule_applied', 'run_both');
70
  ?>
71
  <select name="disable_coupon_when_rule_applied" class="disable_coupon_when_rule_applied">
72
- <option value="run_both" <?php echo ($disable_coupon_when_rule_applied == 'run_both') ? 'selected' : ''; ?>><?php _e('Let both coupons and discount rules run together', WDR_TEXT_DOMAIN); ?></option>
73
- <option value="disable_coupon" <?php echo ($disable_coupon_when_rule_applied == 'disable_coupon') ? 'selected' : ''; ?>><?php _e('Disable the coupons (discount rules will work)', WDR_TEXT_DOMAIN); ?></option>
74
- <option value="disable_rules" <?php echo ($disable_coupon_when_rule_applied == 'disable_rules') ? 'selected' : ''; ?> ><?php _e('Disable the discount rules (coupons will work)', WDR_TEXT_DOMAIN); ?></option>
75
  </select>
76
  </td>
77
  </tr>
78
  <tr>
79
  <td scope="row">
80
- <label class="awdr-left-align"><?php _e('Refresh order review in checkout', WDR_TEXT_DOMAIN) ?></label>
81
- <span class="wdr_settings_desc_text awdr-clear-both"><?php esc_attr_e('Useful when you have purchase history/shipping address based discount.', WDR_TEXT_DOMAIN); ?></span>
82
  </td>
83
  <td>
84
  <input type="radio" name="refresh_order_review" id="refresh_order_review_enable"
85
  value="1" <?php echo($configuration->getConfig('refresh_order_review', 0) ? 'checked' : '') ?>><label
86
- for="refresh_order_review_enable"><?php _e('Yes', WDR_TEXT_DOMAIN); ?></label>
87
  <input type="radio" name="refresh_order_review"
88
  id="refresh_order_review_disable"
89
  value="0" <?php echo(!$configuration->getConfig('refresh_order_review', 0) ? 'checked' : '') ?>><label
90
- for="refresh_order_review_disable"><?php _e('No', WDR_TEXT_DOMAIN); ?></label>
91
  </td>
92
  </tr>
93
  <tr>
94
  <td scope="row">
95
- <label class="awdr-left-align"><?php _e('Suppress third party discount plugins', WDR_TEXT_DOMAIN) ?></label>
96
- <span class="wdr_settings_desc_text awdr-clear-both"><?php esc_attr_e('Suppress third party plugins from modifying the prices. other discount plugins may not works!', WDR_TEXT_DOMAIN); ?></span>
97
- <span class="wdr_settings_desc_text awdr-clear-both text-warning"><?php esc_attr_e('Change this option only if recommended.', WDR_TEXT_DOMAIN); ?></span>
98
  </td>
99
  <td>
100
  <input type="radio" name="suppress_other_discount_plugins" id="suppress_other_discount_plugins"
101
  value="1" <?php echo($configuration->getConfig('suppress_other_discount_plugins', 0) ? 'checked' : '') ?>><label
102
- for="suppress_other_discount_plugins"><?php _e('Yes', WDR_TEXT_DOMAIN); ?></label>
103
  <input type="radio" name="suppress_other_discount_plugins"
104
  id="do_not_suppress_other_discount_plugins"
105
  value="0" <?php echo(!$configuration->getConfig('suppress_other_discount_plugins', 0) ? 'checked' : '') ?>><label
106
- for="do_not_suppress_other_discount_plugins"><?php _e('No', WDR_TEXT_DOMAIN); ?></label>
107
  </td>
108
  </tr>
109
  <?php
@@ -112,30 +112,30 @@
112
  </tbody>
113
  </table>
114
 
115
- <h1><?php _e('Product', WDR_TEXT_DOMAIN) ?></h1>
116
 
117
  <table class="wdr-general-setting form-table">
118
  <tbody style="background-color: #fff;">
119
  <tr>
120
  <td scope="row">
121
- <label for="" class="awdr-left-align"><?php _e('On-sale badge', WDR_TEXT_DOMAIN) ?></label>
122
- <span class="wdr_settings_desc_text awdr-clear-both"><?php esc_attr_e('show on-sale badge', WDR_TEXT_DOMAIN); ?> - <a href="https://docs.flycart.org/en/articles/4098969-sale-page-discount-rules-2-0?utm_source=woo-discount-rules-v2&utm_campaign=doc&utm_medium=text-click&utm_content=show_on_sale_badge_setting" target="_blank"><?php esc_html_e('Read Docs', WDR_TEXT_DOMAIN); ?></a></span>
123
  </td>
124
  <td>
125
  <?php
126
  $show_on_sale_badge = $configuration->getConfig('show_on_sale_badge', 'disabled');
127
  ?>
128
  <select name="show_on_sale_badge" class="on_sale_badge_condition">
129
- <option value="when_condition_matches" <?php echo ($show_on_sale_badge == 'when_condition_matches') ? 'selected' : ''; ?> ><?php _e('Show only after a rule condition is matched exactly', WDR_TEXT_DOMAIN); ?></option>
130
- <option value="at_least_has_any_rules" <?php echo ($show_on_sale_badge == 'at_least_has_any_rules') ? 'selected' : ''; ?>><?php _e('Show on products that are covered under any discount rule in the plugin', WDR_TEXT_DOMAIN); ?></option>
131
- <option value="disabled" <?php echo ($show_on_sale_badge == 'disabled') ? 'selected' : ''; ?>><?php _e('Do not show', WDR_TEXT_DOMAIN); ?></option>
132
  </select>
133
  </td>
134
  </tr>
135
  <tr class="sale_badge_toggle" style="<?php echo ($show_on_sale_badge == 'disabled')? 'display:none;':''?>">
136
  <td scope="row">
137
- <label for="" class="awdr-left-align"><?php _e('Do you want to customize the sale badge?', WDR_TEXT_DOMAIN) ?></label>
138
- <span class="wdr_settings_desc_text awdr-clear-both"><?php esc_attr_e('Customize the sale badge', WDR_TEXT_DOMAIN); ?></span>
139
  </td>
140
  <td>
141
  <?php
@@ -144,17 +144,17 @@
144
  ?>
145
  <input type="checkbox" name="customize_on_sale_badge" id="customize_on_sale_badge"
146
  value="1" <?php echo ( $customize_on_sale_badge == 1 ? 'checked' : '') ?>><label
147
- for="customize_on_sale_badge" class="padding10"><?php _e('Yes, I would like to customize the sale badge', WDR_TEXT_DOMAIN); ?></label>
148
  <br>
149
  <input type="checkbox" name="force_override_on_sale_badge" id="force_override_on_sale_badge"
150
  value="1" <?php echo ( $force_override_on_sale_badge == 1 ? 'checked' : '') ?>><label
151
- for="force_override_on_sale_badge" class="padding10"><?php _e('Force override the label for sale badge (useful when your theme has override for sale badge).', WDR_TEXT_DOMAIN); ?></label>
152
  </td>
153
  </tr>
154
  <tr class="sale_badge_customizer" style="<?php echo ($show_on_sale_badge != 'disabled' && $customize_on_sale_badge == 1) ? '':'display:none;'?>">
155
  <td scope="row">
156
- <label for="" class="awdr-left-align"><?php _e('Sale badge content', WDR_TEXT_DOMAIN) ?></label>
157
- <span class="wdr_settings_desc_text awdr-clear-both"><?php _e('You can use HTML inside. <br><b>IMPORTANT NOTE:</b> This customized sale badge will be applicable only for products that are part of the discount rules configured in this plugin <b>Eg:</b><span class="onsale">Sale!</span>', WDR_TEXT_DOMAIN); ?></span>
158
  </td>
159
  <td>
160
  <textarea name="on_sale_badge_html"
@@ -165,85 +165,85 @@
165
  </tr>
166
  <tr>
167
  <td scope="row">
168
- <label for="" class="awdr-left-align"><?php _e('Show discount table ', WDR_TEXT_DOMAIN) ?></label>
169
- <span class="wdr_settings_desc_text awdr-clear-both"><?php esc_attr_e('Show discount table on product page', WDR_TEXT_DOMAIN); ?> - <a href="https://docs.flycart.org/en/articles/4230405-all-about-discount-table-2-0?utm_source=woo-discount-rules-v2&utm_campaign=doc&utm_medium=text-click&utm_content=show_discount_table_setting" target="_blank"><?php esc_html_e('Read Docs', WDR_TEXT_DOMAIN); ?></a></span>
170
  </td>
171
  <td>
172
  <input type="radio" name="show_bulk_table" id="show_bulk_table_layout" class="bulk_table_layout settings_option_show_hide"
173
  value="1" <?php echo($configuration->getConfig('show_bulk_table', 0) ? 'checked' : '') ?> data-name="hide_table_position"><label
174
- for="show_bulk_table_layout"><?php _e('Yes', WDR_TEXT_DOMAIN); ?></label>
175
  <input type="radio" name="show_bulk_table" id="dont_show_bulk_table_layout" class="bulk_table_layout settings_option_show_hide"
176
  value="0" <?php echo(!$configuration->getConfig('show_bulk_table', 0) ? 'checked' : '') ?> data-name="hide_table_position"><label
177
- for="dont_show_bulk_table_layout"><?php _e('No', WDR_TEXT_DOMAIN); ?></label>
178
- <a class="wdr-popup-link" style="<?php echo (!$configuration->getConfig('show_bulk_table', 0)) ? 'display:none' : ''; ?>"><span class="modal-trigger" data-modal="modal-name"><?php _e("Customize Discount Table", WDR_TEXT_DOMAIN); ?></a>
179
  </td>
180
 
181
  </tr>
182
  <tr class="hide_table_position"
183
  style="<?php echo (!$configuration->getConfig('show_bulk_table', 0) ? 'display:none' : ''); ?>">
184
  <td scope="row">
185
- <label for="position_to_show_bulk_table" class="awdr-left-align"><?php _e('Position to show discount table', WDR_TEXT_DOMAIN) ?></label>
186
- <span class="wdr_settings_desc_text awdr-clear-both"><?php esc_attr_e('Position to show discount table on product page', WDR_TEXT_DOMAIN); ?></span>
187
  </td>
188
  <td>
189
  <select name="position_to_show_bulk_table">
190
- <option value="woocommerce_before_add_to_cart_form" <?php echo ($configuration->getConfig('position_to_show_bulk_table', 'woocommerce_before_add_to_cart_form') == 'woocommerce_before_add_to_cart_form') ? 'selected' : ''; ?> ><?php _e('Woocommerce before add to cart form', WDR_TEXT_DOMAIN); ?></option>
191
- <option value="woocommerce_product_meta_end" <?php echo ($configuration->getConfig('position_to_show_bulk_table', 'woocommerce_before_add_to_cart_form') == 'woocommerce_product_meta_end') ? 'selected' : ''; ?>><?php _e('Woocommerce product meta end', WDR_TEXT_DOMAIN); ?></option>
192
- <option value="woocommerce_product_meta_start" <?php echo ($configuration->getConfig('position_to_show_bulk_table', 'woocommerce_before_add_to_cart_form') == 'woocommerce_product_meta_start') ? 'selected' : ''; ?>><?php _e('Woocommerce product meta start', WDR_TEXT_DOMAIN); ?></option>
193
- <option value="woocommerce_after_add_to_cart_form" <?php echo ($configuration->getConfig('position_to_show_bulk_table', 'woocommerce_before_add_to_cart_form') == 'woocommerce_after_add_to_cart_form') ? 'selected' : ''; ?>><?php _e('Woocommerce after add to cart form', WDR_TEXT_DOMAIN); ?></option>
194
- <option value="woocommerce_after_single_product" <?php echo ($configuration->getConfig('position_to_show_bulk_table', 'woocommerce_before_add_to_cart_form') == 'woocommerce_after_single_product') ? 'selected' : ''; ?>><?php _e('Woocommerce after single product', WDR_TEXT_DOMAIN); ?></option>
195
- <option value="woocommerce_before_single_product" <?php echo ($configuration->getConfig('position_to_show_bulk_table', 'woocommerce_before_add_to_cart_form') == 'woocommerce_before_single_product') ? 'selected' : ''; ?>><?php _e('Woocommerce before single product', WDR_TEXT_DOMAIN); ?></option>
196
- <option value="woocommerce_after_single_product_summary" <?php echo ($configuration->getConfig('position_to_show_bulk_table', 'woocommerce_before_add_to_cart_form') == 'woocommerce_after_single_product_summary') ? 'selected' : ''; ?>><?php _e('Woocommerce after single product summary', WDR_TEXT_DOMAIN); ?></option>
197
- <option value="woocommerce_before_single_product_summary" <?php echo ($configuration->getConfig('position_to_show_bulk_table', 'woocommerce_before_add_to_cart_form') == 'woocommerce_before_single_product_summary') ? 'selected' : ''; ?>><?php _e('Woocommerce before single product summary', WDR_TEXT_DOMAIN); ?></option>
198
  </select>
199
  </td>
200
  </tr>
201
  <tr>
202
  <td scope="row">
203
- <label for="position_to_show_discount_bar" class="awdr-left-align"><?php _e('Position to show discount bar', WDR_TEXT_DOMAIN) ?></label>
204
- <span class="wdr_settings_desc_text awdr-clear-both"><?php esc_attr_e('Position to show discount bar on product page', WDR_TEXT_DOMAIN); ?></span>
205
  </td>
206
  <td>
207
  <select name="position_to_show_discount_bar">
208
- <option value="woocommerce_before_add_to_cart_form" <?php echo ($configuration->getConfig('position_to_show_discount_bar', 'woocommerce_before_add_to_cart_form') == 'woocommerce_before_add_to_cart_form') ? 'selected' : ''; ?> ><?php _e('Woocommerce before add to cart form', WDR_TEXT_DOMAIN); ?></option>
209
- <option value="woocommerce_product_meta_end" <?php echo ($configuration->getConfig('position_to_show_discount_bar', 'woocommerce_before_add_to_cart_form') == 'woocommerce_product_meta_end') ? 'selected' : ''; ?>><?php _e('Woocommerce product meta end', WDR_TEXT_DOMAIN); ?></option>
210
- <option value="woocommerce_product_meta_start" <?php echo ($configuration->getConfig('position_to_show_discount_bar', 'woocommerce_before_add_to_cart_form') == 'woocommerce_product_meta_start') ? 'selected' : ''; ?>><?php _e('Woocommerce product meta start', WDR_TEXT_DOMAIN); ?></option>
211
- <option value="woocommerce_after_add_to_cart_form" <?php echo ($configuration->getConfig('position_to_show_discount_bar', 'woocommerce_before_add_to_cart_form') == 'woocommerce_after_add_to_cart_form') ? 'selected' : ''; ?>><?php _e('Woocommerce after add to cart form', WDR_TEXT_DOMAIN); ?></option>
212
- <option value="woocommerce_after_single_product" <?php echo ($configuration->getConfig('position_to_show_discount_bar', 'woocommerce_before_add_to_cart_form') == 'woocommerce_after_single_product') ? 'selected' : ''; ?>><?php _e('Woocommerce after single product', WDR_TEXT_DOMAIN); ?></option>
213
- <option value="woocommerce_before_single_product" <?php echo ($configuration->getConfig('position_to_show_discount_bar', 'woocommerce_before_add_to_cart_form') == 'woocommerce_before_single_product') ? 'selected' : ''; ?>><?php _e('Woocommerce before single product', WDR_TEXT_DOMAIN); ?></option>
214
- <option value="woocommerce_after_single_product_summary" <?php echo ($configuration->getConfig('position_to_show_discount_bar', 'woocommerce_before_add_to_cart_form') == 'woocommerce_after_single_product_summary') ? 'selected' : ''; ?>><?php _e('Woocommerce after single product summary', WDR_TEXT_DOMAIN); ?></option>
215
- <option value="woocommerce_before_single_product_summary" <?php echo ($configuration->getConfig('position_to_show_discount_bar', 'woocommerce_before_add_to_cart_form') == 'woocommerce_before_single_product_summary') ? 'selected' : ''; ?>><?php _e('Woocommerce before single product summary', WDR_TEXT_DOMAIN); ?></option>
216
  </select>
217
  </td>
218
  </tr>
219
  <tr>
220
  <td scope="row">
221
- <label for="" class="awdr-left-align"><?php _e('Show strikeout price', WDR_TEXT_DOMAIN) ?></label>
222
- <span class="wdr_settings_desc_text awdr-clear-both"><?php esc_attr_e('Show product strikeout price on', WDR_TEXT_DOMAIN); ?></span>
223
  </td>
224
  <td>
225
  <input type="checkbox" name="modify_price_at_shop_page" id="modify_price_at_shop_page"
226
  value="1" <?php echo($configuration->getConfig('modify_price_at_shop_page', 1) ? 'checked' : '') ?>><label
227
- for="modify_price_at_shop_page" class="padding10"><?php _e('On shop page?', WDR_TEXT_DOMAIN); ?></label>
228
  <input type="checkbox" name="modify_price_at_product_page" id="modify_price_at_product_page"
229
  value="1" <?php echo($configuration->getConfig('modify_price_at_product_page', 1) ? 'checked' : '') ?>><label
230
- for="modify_price_at_product_page" class="padding10"><?php _e('On product page?', WDR_TEXT_DOMAIN); ?></label>
231
  <input type="checkbox" name="modify_price_at_category_page" id="modify_price_at_category_page"
232
  value="1" <?php echo($configuration->getConfig('modify_price_at_category_page', 1) ? 'checked' : '') ?>><label
233
- for="modify_price_at_category_page" class="padding10"><?php _e('On category page?', WDR_TEXT_DOMAIN); ?></label>
234
 
235
  </td>
236
  </tr>
237
  <tr>
238
  <td scope="row">
239
- <label for="" class="awdr-left-align"><?php _e('Show Strikeout when', WDR_TEXT_DOMAIN) ?></label>
240
- <span class="wdr_settings_desc_text awdr-clear-both"><?php esc_attr_e('Show Strikeout when this option is matched', WDR_TEXT_DOMAIN); ?> - <a href="https://docs.flycart.org/en/articles/4178894-display-discounted-price-with-strikethrough-on-default-prices-2-0?utm_source=woo-discount-rules-v2&utm_campaign=doc&utm_medium=text-click&utm_content=show_strike_out_setting" target="_blank"><?php esc_html_e('Read Docs', WDR_TEXT_DOMAIN); ?></a></span>
241
  </td>
242
  <td>
243
  <select name="show_strikeout_when">
244
- <option value="show_when_matched" <?php echo ($configuration->getConfig('show_strikeout_when', 'show_when_matched') == 'show_when_matched') ? 'selected' : ''; ?> ><?php _e('Show when a rule condition is matched', WDR_TEXT_DOMAIN); ?></option>
245
- <option value="show_after_matched" <?php echo ($configuration->getConfig('show_strikeout_when', 'show_when_matched') == 'show_after_matched') ? 'selected' : ''; ?>><?php _e('Show after a rule condition is matched', WDR_TEXT_DOMAIN); ?></option>
246
- <option value="show_dynamically" <?php echo ($configuration->getConfig('show_strikeout_when', 'show_when_matched') == 'show_dynamically') ? 'selected' : ''; ?>><?php _e('Shown on quantity update (dynamic)', WDR_TEXT_DOMAIN); ?></option>
247
  </select>
248
  </td>
249
  </tr>
@@ -254,61 +254,61 @@
254
  </tbody>
255
  </table>
256
 
257
- <h1><?php _e('Cart', WDR_TEXT_DOMAIN); ?></h1>
258
 
259
  <table class="wdr-general-setting form-table">
260
  <tbody style="background-color: #fff;">
261
  <tr>
262
  <td scope="row">
263
- <label for="" class="awdr-left-align"><?php _e('Show strikeout on cart', WDR_TEXT_DOMAIN) ?></label>
264
- <span class="wdr_settings_desc_text awdr-clear-both"><?php esc_attr_e('Show price strikeout on cart', WDR_TEXT_DOMAIN); ?></span>
265
  </td>
266
  <td>
267
  <input type="radio" name="show_strikeout_on_cart" id="show_strikeout_on_cart"
268
  value="1" <?php echo($configuration->getConfig('show_strikeout_on_cart', 1) ? 'checked' : '') ?>><label
269
- for="show_strikeout_on_cart"><?php _e('Yes', WDR_TEXT_DOMAIN); ?></label>
270
 
271
  <input type="radio" name="show_strikeout_on_cart" id="dont_show_strikeout_on_cart"
272
  value="0" <?php echo(!$configuration->getConfig('show_strikeout_on_cart', 1) ? 'checked' : '') ?>><label
273
- for="dont_show_strikeout_on_cart"><?php _e('No', WDR_TEXT_DOMAIN); ?></label>
274
  </td>
275
  </tr>
276
  <tr>
277
  <td scope="row">
278
- <label for="" class="awdr-left-align"><?php _e('Apply cart discount as', WDR_TEXT_DOMAIN) ?></label>
279
- <span class="wdr_settings_desc_text awdr-clear-both"><?php esc_attr_e('Apply cart discount as fee/coupon', WDR_TEXT_DOMAIN); ?></span>
280
  </td>
281
  <td>
282
  <select name="apply_cart_discount_as">
283
- <option value="fee" <?php echo ($configuration->getConfig('apply_cart_discount_as', 'fee') == 'fee') ? 'selected' : ''; ?> ><?php _e('Fee', WDR_TEXT_DOMAIN); ?></option>
284
- <option value="coupon" <?php echo ($configuration->getConfig('apply_cart_discount_as', 'fee') == 'coupon') ? 'selected' : ''; ?>><?php _e('Coupon', WDR_TEXT_DOMAIN); ?></option>
285
  </select>
286
  </td>
287
  </tr>
288
  <tr>
289
  <td scope="row">
290
- <label for="" class="awdr-left-align"><?php _e('Combine all cart discounts', WDR_TEXT_DOMAIN) ?></label>
291
- <span class="wdr_settings_desc_text awdr-clear-both"><?php esc_attr_e('Combine all cart discounts in single discount label', WDR_TEXT_DOMAIN); ?></span>
292
  </td>
293
  <td>
294
  <input type="radio" name="combine_all_cart_discounts" id="combine_all_cart_discounts"
295
  data-name="combine_all_cart_discounts"
296
  value="1"
297
  class="settings_option_show_hide" <?php echo($configuration->getConfig('combine_all_cart_discounts', 0) ? 'checked' : '') ?>><label
298
- for="combine_all_cart_discounts"><?php _e('Yes', WDR_TEXT_DOMAIN); ?></label>
299
 
300
  <input type="radio" name="combine_all_cart_discounts" id="dont_combine_all_cart_discounts"
301
  data-name="combine_all_cart_discounts"
302
  value="0"
303
  class="settings_option_show_hide" <?php echo(!$configuration->getConfig('combine_all_cart_discounts', 0) ? 'checked' : '') ?>><label
304
- for="dont_combine_all_cart_discounts"><?php _e('No', WDR_TEXT_DOMAIN); ?></label>
305
  </td>
306
  </tr>
307
  <tr class="combine_all_cart_discounts"
308
  style="<?php echo(!$configuration->getConfig('combine_all_cart_discounts', 0) ? 'display:none' : '') ?>">
309
  <td scope="row">
310
- <label for="discount_label_for_combined_discounts" class="awdr-left-align"><?php _e('Discount label for combined discounts', WDR_TEXT_DOMAIN) ?></label>
311
- <span class="wdr_settings_desc_text awdr-clear-both"><?php esc_attr_e('Discount label for combined discounts', WDR_TEXT_DOMAIN); ?></span>
312
  </td>
313
  <td>
314
  <input type="text" name="discount_label_for_combined_discounts"
@@ -320,62 +320,58 @@
320
  ?>
321
  </tbody>
322
  </table>
323
- <h1><?php _e('Promotion', WDR_TEXT_DOMAIN); ?></h1>
324
  <table class="wdr-general-setting form-table">
325
  <tbody style="background-color: #fff;">
326
  <tr>
327
  <td scope="row">
328
- <label for="" class="awdr-left-align"><?php _e('Subtotal based promotion', WDR_TEXT_DOMAIN) ?></label>
329
- <span class="wdr_settings_desc_text awdr-clear-both"><?php _e('Display subtotal based promotion messages in cart/product/shop pages<br>If enabled an option to add promotion message will displays on each rule(when subtotal condition is added)', WDR_TEXT_DOMAIN); ?></span>
330
  </td>
331
  <td>
332
- <input type="radio" name="show_subtotal_promotion" id="show_subtotal_promotion"
333
- data-name="show_promo_text_con"
334
- value="1"
335
- class="settings_option_show_hide" <?php echo($configuration->getConfig('show_subtotal_promotion', 0) ? 'checked' : '') ?>><label
336
- for="show_subtotal_promotion"><?php _e('Yes', WDR_TEXT_DOMAIN); ?></label>
337
-
338
- <input type="radio" name="show_subtotal_promotion" id="dont_show_subtotal_promotion"
339
- data-name="show_promo_text_con"
340
- value="0"
341
- class="settings_option_show_hide" <?php echo(!$configuration->getConfig('show_subtotal_promotion', 0) ? 'checked' : '') ?>><label
342
- for="dont_show_subtotal_promotion"><?php _e('No', WDR_TEXT_DOMAIN); ?></label>
343
  </td>
 
344
  </tr>
345
- <tr class="show_promo_text_con" style="<?php echo(!$configuration->getConfig('show_subtotal_promotion', 0) ? 'display:none' : '') ?>">
346
  <td scope="row">
347
- <label for="show_promo_text" class="awdr-left-align"><?php _e('Subtotal based promo text', WDR_TEXT_DOMAIN) ?></label>
348
- <span class="wdr_settings_desc_text awdr-clear-both"><?php esc_attr_e('Subtotal based promo text (available only for subtotal based discounts) ', WDR_TEXT_DOMAIN); ?></span>
349
  </td>
350
  <td>
351
  <?php $show_promo_text = $configuration->getConfig('show_promo_text', ''); ?>
352
- <select name="show_promo_text[]" multiple class="edit-all-loaded-values" id="show_promo_text" data-placeholder="<?php esc_attr_e("Select the page to display promotion message", WDR_TEXT_DOMAIN);?>">
353
- <option value="shop_page" <?php echo (!empty($show_promo_text) && is_array($show_promo_text) && in_array('shop_page', $show_promo_text)) ? 'selected' : ''; ?>><?php _e('Shop page', WDR_TEXT_DOMAIN); ?></option>
354
- <option value="product_page" <?php echo (!empty($show_promo_text) && is_array($show_promo_text) && in_array('product_page', $show_promo_text)) ? 'selected' : ''; ?> ><?php _e('Product page', WDR_TEXT_DOMAIN); ?></option>
355
- <option value="cart_page" <?php echo (!empty($show_promo_text) && is_array($show_promo_text) && in_array('cart_page', $show_promo_text)) ? 'selected' : ''; ?> ><?php _e('Cart page', WDR_TEXT_DOMAIN); ?></option>
356
- <option value="checkout_page" <?php echo (!empty($show_promo_text) && is_array($show_promo_text) && in_array('checkout_page', $show_promo_text)) ? 'selected' : ''; ?> ><?php _e('Checkout page', WDR_TEXT_DOMAIN); ?></option>
357
  </select>
358
  </td>
359
  </tr>
360
  <tr>
361
  <td scope="row">
362
- <label for="display_saving_text" class="awdr-left-align"><?php _e('Display you saved text', WDR_TEXT_DOMAIN) ?></label>
363
- <span class="wdr_settings_desc_text awdr-clear-both"><?php esc_attr_e('Display you saved text when rule applied', WDR_TEXT_DOMAIN); ?> - <a href="https://docs.flycart.org/en/articles/4129525-display-you-saved-message-2-0?utm_source=woo-discount-rules-v2&utm_campaign=doc&utm_medium=text-click&utm_content=display_you_saved_text" target="_blank"><?php esc_html_e('Read Docs', WDR_TEXT_DOMAIN); ?></a></span>
364
  </td>
365
  <td>
366
  <select name="display_saving_text" class="settings_option_show_hide_on_change">
367
- <option value="disabled" <?php echo ($configuration->getConfig('display_saving_text', 'disabled') == 'disabled') ? 'selected' : ''; ?>><?php _e('Disabled', WDR_TEXT_DOMAIN); ?></option>
368
- <option value="on_each_line_item" <?php echo ($configuration->getConfig('display_saving_text', 'disabled') == 'on_each_line_item') ? 'selected' : ''; ?> ><?php _e('On each line item', WDR_TEXT_DOMAIN); ?></option>
369
- <option value="after_total" <?php echo ($configuration->getConfig('display_saving_text', 'disabled') == 'after_total') ? 'selected' : ''; ?> ><?php _e('On after total', WDR_TEXT_DOMAIN); ?></option>
370
- <option value="both_line_item_and_after_total" <?php echo ($configuration->getConfig('display_saving_text', 'disabled') == 'both_line_item_and_after_total') ? 'selected' : ''; ?> ><?php _e('Both in line item and after total', WDR_TEXT_DOMAIN); ?></option>
371
  </select>
372
  </td>
373
  </tr>
374
  <tr class="display_you_saved_text"
375
  style="<?php echo ($configuration->getConfig('display_saving_text', 'disabled') == 'disabled') ? 'display:none' : ''; ?>">
376
  <td scope="row">
377
- <label for="you_saved_text" class="awdr-left-align"><?php _e('Savings text to show', WDR_TEXT_DOMAIN) ?></label>
378
- <span class="wdr_settings_desc_text awdr-clear-both"><?php esc_attr_e('You save text to show when rule applied', WDR_TEXT_DOMAIN); ?></span>
379
  </td>
380
  <td>
381
  <textarea name="you_saved_text" rows="5"
@@ -384,55 +380,58 @@
384
  </tr>
385
  <tr>
386
  <td scope="row">
387
- <label for="" class="awdr-left-align"><?php _e('Show a discount applied message on cart?', WDR_TEXT_DOMAIN) ?></label>
388
- <span class="wdr_settings_desc_text awdr-clear-both"><?php esc_attr_e('Show message in cart page on rule applied', WDR_TEXT_DOMAIN); ?></span>
389
  </td>
390
  <td>
391
  <input type="radio" name="show_applied_rules_message_on_cart" class="settings_option_show_hide"
392
  id="show_applied_rules_message_on_cart" data-name="hide_alert_message_text"
393
  value="1" <?php echo($configuration->getConfig('show_applied_rules_message_on_cart', 0) ? 'checked' : '') ?>><label
394
- for="show_applied_rules_message_on_cart"><?php _e('Yes', WDR_TEXT_DOMAIN); ?></label>
395
 
396
  <input type="radio" name="show_applied_rules_message_on_cart" class="settings_option_show_hide"
397
  id="dont_show_applied_rules_message_on_cart" data-name="hide_alert_message_text"
398
  value="0" <?php echo(!$configuration->getConfig('show_applied_rules_message_on_cart', 0) ? 'checked' : '') ?>><label
399
- for="dont_show_applied_rules_message_on_cart"><?php _e('No', WDR_TEXT_DOMAIN); ?></label>
400
  </td>
401
  </tr>
402
  <tr class="hide_alert_message_text" style="<?php echo (!$configuration->getConfig('show_applied_rules_message_on_cart', 0)) ? 'display:none' : ''; ?>">
403
  <td scope="row">
404
- <label for="applied_rule_message" class="awdr-left-align"><?php _e('Applied rule message text on cart', WDR_TEXT_DOMAIN) ?></label>
405
- <span class="wdr_settings_desc_text awdr-clear-both"><?php esc_attr_e('Text to show when rule applied', WDR_TEXT_DOMAIN); ?></span>
406
  </td>
407
  <td>
408
  <textarea name="applied_rule_message"
409
  rows="5"
410
- cols="30"><?php echo $configuration->getConfig('applied_rule_message', __('Discount <strong>{{title}}</strong> has been applied to your cart.', WDR_TEXT_DOMAIN)); ?></textarea>
411
  </td>
412
  </tr>
 
 
 
413
  </tbody>
414
  </table>
415
- <!--<h1><?php /*_e('Banner', WDR_TEXT_DOMAIN); */?></h1>
416
  <table class="wdr-general-setting form-table">
417
  <tbody style="background-color: #fff;">
418
  <?php /*if(!$is_pro) { */?>
419
  <tr class="" style="">
420
  <td scope="row">
421
  <label for="applied_rule_message"
422
- class="awdr-left-align"><?php /*_e('Banner Content', WDR_TEXT_DOMAIN) */?></label>
423
- <span class="wdr_desc_text awdr-clear-both"><?php /*_e('A static banner you that you want to display in your storefront. <br><br> <b>NOTE:</b> It is a static banner. You can use any content or html here.', WDR_TEXT_DOMAIN); */?></span>
424
  </td>
425
  <td>
426
- <?php /*_e("Unlock this feature by <a href='https://www.flycart.org/products/wordpress/woocommerce-discount-rules?utm_source=woo-discount-rules-v2&utm_campaign=doc&utm_medium=text-click&utm_content=unlock_pro' target='_blank'>Upgrading to Pro</a>", WDR_TEXT_DOMAIN); */?>
427
  </td>
428
  </tr>
429
  <tr class="" style="">
430
  <td scope="row">
431
  <label for="applied_rule_message"
432
- class="awdr-left-align"><?php /*_e('Banner Content display position', WDR_TEXT_DOMAIN) */?></label>
433
- <span class="wdr_desc_text awdr-clear-both"><?php /*_e('Choose a display position for the banner in your storefront', WDR_TEXT_DOMAIN); */?></span>
434
  </td>
435
- <td><?php /*_e("Unlock this feature by <a href='https://www.flycart.org/products/wordpress/woocommerce-discount-rules?utm_source=woo-discount-rules-v2&utm_campaign=doc&utm_medium=text-click&utm_content=unlock_pro' target='_blank'>Upgrading to Pro</a>", WDR_TEXT_DOMAIN); */?></td>
436
  </tr>
437
  <?php /*} */?>
438
 
@@ -441,13 +440,13 @@
441
  */?>
442
  </tbody>
443
  </table>-->
444
- <h1><?php _e('On-Sale page', WDR_TEXT_DOMAIN); ?> - <a href="https://docs.flycart.org/en/articles/4098969-sale-page-discount-rules-2-0?utm_source=woo-discount-rules-v2&utm_campaign=doc&utm_medium=text-click&utm_content=on_sale_page_settings" target="_blank"><?php esc_html_e('Read Docs', WDR_TEXT_DOMAIN); ?></a></h1>
445
  <table class="wdr-general-setting form-table">
446
  <tbody style="background-color: #fff;">
447
  <tr>
448
  <td scope="row">
449
  <?php
450
- _e('Select rules for the On Sale Page', WDR_TEXT_DOMAIN );
451
  ?>
452
  </td>
453
  <td scope="row">
@@ -461,7 +460,7 @@
461
  class="edit-all-loaded-values"
462
  data-list=""
463
  data-field="autoloaded"
464
- data-placeholder="<?php esc_attr_e("Type the name of the rule to select it", WDR_TEXT_DOMAIN);?>"
465
  style="">
466
  <option value="all"
467
  <?php if(!empty($awdr_rebuild_on_sale_rules) && is_array($awdr_rebuild_on_sale_rules)){
@@ -469,7 +468,7 @@
469
  echo ' selected ';
470
  }
471
  } ?>
472
- ><?php esc_attr_e("All active rules", WDR_TEXT_DOMAIN); ?></option>
473
  <?php
474
  $rules = \Wdr\App\Controllers\ManageDiscount::$available_rules;
475
  if(!empty($rules) && is_array($rules)){
@@ -493,9 +492,9 @@
493
  <div class="awdr_rebuild_on_sale_list_notice">
494
  </div>
495
  </div>
496
- <button type="button" class="btn btn-warning" id="awdr_rebuild_on_sale_list" data-awdr_nonce="<?php echo \Wdr\App\Helpers\Helper::create_nonce('wdr_ajax_rule_build_index'); ?>"><?php _e('Save and Build Index', WDR_TEXT_DOMAIN ); ?></button>
497
  <?php } else {
498
- _e("Unlock this feature by <a href='https://www.flycart.org/products/wordpress/woocommerce-discount-rules?utm_source=woo-discount-rules-v2&utm_campaign=doc&utm_medium=text-click&utm_content=unlock_pro' target='_blank'>Upgrading to Pro</a>", WDR_TEXT_DOMAIN);
499
  }?>
500
  </td>
501
  </tr>
@@ -503,10 +502,10 @@
503
  <tr>
504
  <td scope="row" colspan="2">
505
  <?php
506
- _e('ShortCode to load all products which has discount through Woo Discount Rules', WDR_TEXT_DOMAIN );
507
  ?>
508
  <span id="awdr_shortcode_text">[awdr_sale_items_list]</span>
509
- <button type="button" class="btn btn-warning" id="awdr_shortcode_copy_btn"><?php _e('Copy ShortCode', WDR_TEXT_DOMAIN ); ?></button>
510
  </td>
511
  </tr>
512
  <?php } ?>
@@ -523,12 +522,12 @@
523
  <div class="modal-box">
524
  <div class="modal-header">
525
  <div class="close-modal"><span class="wdr-close-modal-box">&#10006;</span></div>
526
- <h1 class="wdr-modal-header-title"><?php _e("Customize Discount Table", WDR_TEXT_DOMAIN); ?></h1>
527
  </div>
528
  <div class="modal-body">
529
- <p class="awdr-save-green wdr-alert-success" style="display: none;"><?php _e('Settings Saved', WDR_TEXT_DOMAIN) ?></p>
530
- <p class="awdr-error-red wdr-alert-error" style="display: none;"><?php _e('Oops! Something went wrong.', WDR_TEXT_DOMAIN) ?></p>
531
- <p class="wdr-customizer-notes"><b><?php _e('Note:', WDR_TEXT_DOMAIN) ?></b><?php _e(" This table contains sample content for design purpose.", WDR_TEXT_DOMAIN); ?></p>
532
  <div style="width: 100%">
533
  <div class="wdr-customizer-container">
534
  <div class="wdr-customizer-grid">
@@ -538,22 +537,22 @@
538
 
539
  <tr>
540
  <th scope="row">
541
- <label for="" class="awdr-left-align"><?php _e('Table Header', WDR_TEXT_DOMAIN) ?></label>
542
- <span class="wdr_settings_desc_text awdr-clear-both"><?php esc_attr_e('Show/Hide table header column names', WDR_TEXT_DOMAIN); ?></span>
543
  </th>
544
  <td >
545
  <input type="radio" name="table_column_header" id="show_table_header" class="bulk_table_customizer_preview"
546
  value="1" data-colname="wdr_bulk_table_thead" data-showhide="show" <?php echo($configuration->getConfig('table_column_header', 1) ? 'checked' : '') ?>><label
547
- for="show_table_header"><?php _e('Show', WDR_TEXT_DOMAIN); ?></label>
548
  <input type="radio" name="table_column_header" id="dont_show_table_header" class="bulk_table_customizer_preview"
549
  value="0" data-colname="wdr_bulk_table_thead" data-showhide="hide" <?php echo(!$configuration->getConfig('table_column_header', 1) ? 'checked' : '') ?>><label
550
- for="dont_show_table_header"><?php _e("Don't Show", WDR_TEXT_DOMAIN); ?></label>
551
  </td>
552
  </tr>
553
  <tr class="">
554
  <th scope="row">
555
- <label for="" class="awdr-left-align"><?php _e('Title column Name on table', WDR_TEXT_DOMAIN) ?></label>
556
- <span class="wdr_settings_desc_text awdr-clear-both"><?php esc_attr_e('Give name for rule title column', WDR_TEXT_DOMAIN); ?></span>
557
  </th>
558
  <td class="awdr_table_columns">
559
  <input type="checkbox" name="table_title_column" value="1" class="bulk_table_customizer_show_hide_column"
@@ -564,8 +563,8 @@
564
  </tr>
565
  <tr class="">
566
  <th scope="row">
567
- <label for="" class="awdr-left-align"><?php _e('Discount column Name on table', WDR_TEXT_DOMAIN) ?></label>
568
- <span class="wdr_settings_desc_text awdr-clear-both"><?php esc_attr_e('Give name for discount column', WDR_TEXT_DOMAIN); ?></span>
569
  </th>
570
  <td class="awdr_table_columns">
571
  <input type="checkbox" name="table_discount_column" value="1" class="bulk_table_customizer_show_hide_column"
@@ -576,8 +575,8 @@
576
  </tr>
577
  <tr class="">
578
  <th scope="row">
579
- <label for="" class="awdr-left-align"><?php _e('Range column Name on table', WDR_TEXT_DOMAIN) ?></label>
580
- <span class="wdr_settings_desc_text awdr-clear-both"><?php esc_attr_e('Give name for range column', WDR_TEXT_DOMAIN); ?></span>
581
  </th>
582
  <td class="awdr_table_columns">
583
  <input type="checkbox" name="table_range_column" value="1" class="bulk_table_customizer_show_hide_column"
@@ -588,23 +587,23 @@
588
  </tr>
589
  <tr class="">
590
  <th scope="row">
591
- <label for="" class="awdr-left-align"><?php _e('Discount column value on table', WDR_TEXT_DOMAIN) ?></label>
592
- <span class="wdr_settings_desc_text awdr-clear-both"><?php esc_attr_e('Show Discount value/price in table', WDR_TEXT_DOMAIN); ?></span>
593
  </th>
594
  <td>
595
  <p><input type="radio" name="table_discount_column_value" id="show_table_discount_column_value" class="popup_table_discount_column_value"
596
  value="1" <?php echo($configuration->getConfig('table_discount_column_value', 1) ? 'checked' : '') ?>><label
597
- for="show_table_discount_column_value"><?php _e('Discount Value', WDR_TEXT_DOMAIN); ?></label></p>
598
  <p><input type="radio" name="table_discount_column_value" id="dont_show_table_discount_column_value" class="popup_table_discount_column_value"
599
  value="0" <?php echo(!$configuration->getConfig('table_discount_column_value', 1) ? 'checked' : '') ?>><label
600
- for="dont_show_table_discount_column_value"><?php _e("Discounted Price", WDR_TEXT_DOMAIN); ?></label></p>
601
  </td>
602
  </tr>
603
  <!-- <tr>
604
  <th scope="row">
605
- <label for=""><?php /*_e('Color Picker', WDR_TEXT_DOMAIN) */?></label>
606
  <span style="float: right" class="wdr-tool-tip"
607
- title="<?php /*_e("Rule name / title", WDR_TEXT_DOMAIN); */?>"> &#63</span>
608
  </th>
609
  <td>
610
  <input type="color" id="colorpicker" name="color" pattern="^#+([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$" value="#bada55">
@@ -643,7 +642,7 @@
643
  echo 'display:none';
644
  }else{
645
  echo((!$configuration->getConfig('table_title_column', 0)) ? 'display:none' : '');
646
- } ?>"><span class="title_on_keyup"><?php _e($tbl_title_text, WDR_TEXT_DOMAIN) ?></span>
647
  </th><?php
648
  } elseif ($column == "tbl_discount") {
649
  ?>
@@ -652,7 +651,7 @@
652
  echo 'display:none';
653
  }else{
654
  echo((!$configuration->getConfig('table_discount_column', 0)) ? 'display:none' : '');
655
- } ?>"><span class="discount_on_keyup"><?php _e($tbl_discount_text, WDR_TEXT_DOMAIN) ?></span>
656
  </th><?php
657
  } else {
658
  ?>
@@ -661,7 +660,7 @@
661
  echo 'display:none';
662
  }else{
663
  echo((!$configuration->getConfig('table_range_column', 0)) ? 'display:none' : '');
664
- }?>"><span class="range_on_keyup"><?php _e($tbl_range_text, WDR_TEXT_DOMAIN) ?></span></th><?php
665
  }
666
  }?>
667
  </tr>
@@ -672,7 +671,7 @@
672
  if ($column == "tbl_title") {?>
673
  <td class="wdr_bulk_table_td wdr_bulk_title popup_table_title_column col_index_1" data-colindex="1"
674
  style="<?php echo (!$configuration->getConfig('table_title_column', 0)) ? 'display:none' : '';?>">
675
- <?php _e('Bulk Rule', WDR_TEXT_DOMAIN); ?>
676
  </td><?php
677
 
678
  } elseif ($column == "tbl_discount") {?>
@@ -680,13 +679,13 @@
680
  style="<?php echo (!$configuration->getConfig('table_discount_column', 0)) ? 'display:none' : '';?>">
681
  <span class="wdr_table_discounted_value" style="<?php echo ( !$configuration->getConfig('table_discount_column_value', 0)) ? 'display: none' : '';?>"><?php
682
  echo \Wdr\App\Helpers\Woocommerce::formatPrice(12);
683
- _e(' flat', WDR_TEXT_DOMAIN); ?></span>
684
  <span class="wdr_table_discounted_price" style="<?php echo ( $configuration->getConfig('table_discount_column_value', 0)) ? 'display: none' : '';?>"><?php
685
  echo \Wdr\App\Helpers\Woocommerce::formatPrice(33); ?></span>
686
  </td><?php
687
  } else {?>
688
  <td class="wdr_bulk_table_td wdr_bulk_range popup_table_range_column col_index_3" data-colindex="3"
689
- style="<?php echo (!$configuration->getConfig('table_range_column', 0)) ? 'display:none':'';?>"><?php _e('1 - 5', WDR_TEXT_DOMAIN); ?></td><?php
690
  }
691
  }?>
692
  </tr>
@@ -695,7 +694,7 @@
695
  if ($column == "tbl_title") {?>
696
  <td class="wdr_bulk_table_td wdr_bulk_title popup_table_title_column col_index_1" data-colindex="1"
697
  style="<?php echo (!$configuration->getConfig('table_title_column', 0)) ? 'display:none' : '';?>">
698
- <?php _e('Bulk Rule', WDR_TEXT_DOMAIN); ?>
699
  </td><?php
700
 
701
  } elseif ($column == "tbl_discount") {?>
@@ -709,7 +708,7 @@
709
  </td><?php
710
  } else {?>
711
  <td class="wdr_bulk_table_td wdr_bulk_range popup_table_range_column col_index_3" data-colindex="3"
712
- style="<?php echo (!$configuration->getConfig('table_range_column', 0)) ? 'display:none':'';?>"><?php _e('11 - 15', WDR_TEXT_DOMAIN); ?></td><?php
713
  }
714
  }?>
715
  </tr>
@@ -718,7 +717,7 @@
718
  if ($column == "tbl_title") {?>
719
  <td class="wdr_bulk_table_td wdr_bulk_title popup_table_title_column col_index_1" data-colindex="1"
720
  style="<?php echo (!$configuration->getConfig('table_title_column', 0)) ? 'display:none' : '';?>">
721
- <?php _e('Bulk Flat discount', WDR_TEXT_DOMAIN); ?>
722
  </td><?php
723
 
724
  } elseif ($column == "tbl_discount") {?>
@@ -726,13 +725,13 @@
726
  style="<?php echo (!$configuration->getConfig('table_discount_column', 0)) ? 'display:none' : '';?>">
727
  <span class="wdr_table_discounted_value" style="<?php echo ( !$configuration->getConfig('table_discount_column_value', 0)) ? 'display: none' : '';?>"><?php
728
  echo \Wdr\App\Helpers\Woocommerce::formatPrice(10);
729
- _e(' flat', WDR_TEXT_DOMAIN); ?> </span>
730
  <span class="wdr_table_discounted_price" style="<?php echo ( $configuration->getConfig('table_discount_column_value', 0)) ? 'display: none' : '';?>"><?php
731
  echo \Wdr\App\Helpers\Woocommerce::formatPrice(35); ?></span>
732
  </td><?php
733
  } else {?>
734
  <td class="wdr_bulk_table_td wdr_bulk_range popup_table_range_column col_index_3" data-colindex="3"
735
- style="<?php echo (!$configuration->getConfig('table_range_column', 0)) ? 'display:none':'';?>"><?php _e('50 - 60', WDR_TEXT_DOMAIN); ?></td><?php
736
  }
737
  }?>
738
  </tr>
@@ -741,7 +740,7 @@
741
  if ($column == "tbl_title") {?>
742
  <td class="wdr_bulk_table_td wdr_bulk_title popup_table_title_column col_index_1" data-colindex="1"
743
  style="<?php echo (!$configuration->getConfig('table_title_column', 0)) ? 'display:none' : '';?>">
744
- <?php _e('Bulk percentage discount', WDR_TEXT_DOMAIN); ?>
745
  </td><?php
746
 
747
  } elseif ($column == "tbl_discount") {?>
@@ -754,7 +753,7 @@
754
  </td><?php
755
  } else {?>
756
  <td class="wdr_bulk_table_td wdr_bulk_range popup_table_range_column col_index_3" data-colindex="3"
757
- style="<?php echo (!$configuration->getConfig('table_range_column', 0)) ? 'display:none':'';?>"><?php _e('70 - 80', WDR_TEXT_DOMAIN); ?></td><?php
758
  }
759
  }?>
760
  </tr>
@@ -763,7 +762,7 @@
763
  if ($column == "tbl_title") {?>
764
  <td class="wdr_bulk_table_td wdr_bulk_title popup_table_title_column col_index_1" data-colindex="1"
765
  style="<?php echo (!$configuration->getConfig('table_title_column', 0)) ? 'display:none' : '';?>">
766
- <?php _e('Bulk % discount', WDR_TEXT_DOMAIN); ?>
767
  </td><?php
768
 
769
  } elseif ($column == "tbl_discount") {?>
@@ -776,7 +775,7 @@
776
  </td><?php
777
  } else {?>
778
  <td class="wdr_bulk_table_td wdr_bulk_range popup_table_range_column col_index_3" data-colindex="3"
779
- style="<?php echo (!$configuration->getConfig('table_range_column', 0)) ? 'display:none':'';?>"><?php _e('450 - 500', WDR_TEXT_DOMAIN); ?></td><?php
780
  }
781
  }?>
782
  </tr>
@@ -785,7 +784,7 @@
785
  if ($column == "tbl_title") {?>
786
  <td class="wdr_bulk_table_td wdr_bulk_title popup_table_title_column col_index_1" data-colindex="1"
787
  style="<?php echo (!$configuration->getConfig('table_title_column', 0)) ? 'display:none' : '';?>">
788
- <?php _e('Bulk flat', WDR_TEXT_DOMAIN); ?>
789
  </td><?php
790
 
791
  } elseif ($column == "tbl_discount") {?>
@@ -793,13 +792,13 @@
793
  style="<?php echo (!$configuration->getConfig('table_discount_column', 0)) ? 'display:none' : '';?>">
794
  <span class="wdr_table_discounted_value" style="<?php echo ( !$configuration->getConfig('table_discount_column_value', 0)) ? 'display: none' : '';?>"><?php
795
  echo \Wdr\App\Helpers\Woocommerce::formatPrice(10);
796
- _e(' flat', WDR_TEXT_DOMAIN); ?></span>
797
  <span class="wdr_table_discounted_price" style="<?php echo ( $configuration->getConfig('table_discount_column_value', 0)) ? 'display: none' : '';?>"><?php
798
  echo \Wdr\App\Helpers\Woocommerce::formatPrice(35); ?></span>
799
  </td><?php
800
  } else {?>
801
  <td class="wdr_bulk_table_td wdr_bulk_range popup_table_range_column col_index_3" data-colindex="3"
802
- style="<?php echo (!$configuration->getConfig('table_range_column', 0)) ? 'display:none':'';?>"><?php _e('600 - 700', WDR_TEXT_DOMAIN); ?></td><?php
803
  }
804
  }?>
805
  </tr>
@@ -808,7 +807,7 @@
808
  if ($column == "tbl_title") {?>
809
  <td class="wdr_bulk_table_td wdr_bulk_title popup_table_title_column col_index_1" data-colindex="1"
810
  style="<?php echo (!$configuration->getConfig('table_title_column', 0)) ? 'display:none' : '';?>">
811
- <?php _e('set percentage discount', WDR_TEXT_DOMAIN); ?>
812
  </td><?php
813
 
814
  } elseif ($column == "tbl_discount") {?>
@@ -821,7 +820,7 @@
821
  </td><?php
822
  } else {?>
823
  <td class="wdr_bulk_table_td wdr_bulk_range popup_table_range_column col_index_3" data-colindex="3"
824
- style="<?php echo (!$configuration->getConfig('table_range_column', 0)) ? 'display:none':'';?>"><?php _e('5', WDR_TEXT_DOMAIN); ?></td><?php
825
  }
826
  }?>
827
  </tr>
@@ -830,7 +829,7 @@
830
  if ($column == "tbl_title") {?>
831
  <td class="wdr_bulk_table_td wdr_bulk_title popup_table_title_column col_index_1" data-colindex="1"
832
  style="<?php echo (!$configuration->getConfig('table_title_column', 0)) ? 'display:none' : '';?>">
833
- <?php _e('Fixed discount for set', WDR_TEXT_DOMAIN); ?>
834
  </td><?php
835
 
836
  } elseif ($column == "tbl_discount") {?>
@@ -843,7 +842,7 @@
843
  </td><?php
844
  } else {?>
845
  <td class="wdr_bulk_table_td wdr_bulk_range popup_table_range_column col_index_3" data-colindex="3"
846
- style="<?php echo (!$configuration->getConfig('table_range_column', 0)) ? 'display:none':'';?>"><?php _e('10', WDR_TEXT_DOMAIN); ?></td><?php
847
  }
848
  }?>
849
  </tr>
@@ -852,7 +851,7 @@
852
  if ($column == "tbl_title") {?>
853
  <td class="wdr_bulk_table_td wdr_bulk_title popup_table_title_column col_index_1" data-colindex="1"
854
  style="<?php echo (!$configuration->getConfig('table_title_column', 0)) ? 'display:none' : '';?>">
855
- <?php _e('set flat discount', WDR_TEXT_DOMAIN); ?>
856
  </td><?php
857
 
858
  } elseif ($column == "tbl_discount") {?>
@@ -865,7 +864,7 @@
865
  </td><?php
866
  } else {?>
867
  <td class="wdr_bulk_table_td wdr_bulk_range popup_table_range_column col_index_3" data-colindex="3"
868
- style="<?php echo (!$configuration->getConfig('table_range_column', 0)) ? 'display:none':'';?>"><?php _e('15', WDR_TEXT_DOMAIN); ?></td><?php
869
  }
870
  }?>
871
  </tr>
12
  <div class="awdr-configuration-form">
13
  <form name="configuration_form" id="configuration-form" method="post">
14
 
15
+ <h1><?php _e('General', 'woo-discount-rules') ?></h1>
16
  <table class="wdr-general-setting form-table">
17
  <tbody style="background-color: #fff;">
18
  <?php
20
  ?>
21
  <tr>
22
  <td scope="row">
23
+ <label for="calculate_discount_from" class="awdr-left-align"><?php _e('Calculate discount from', 'woo-discount-rules') ?></label>
24
+ <span class="wdr_settings_desc_text awdr-clear-both"><?php esc_attr_e('sale price or regular price', 'woo-discount-rules'); ?> - <a href="https://docs.flycart.org/en/articles/4167066-discount-based-on-regular-price-sale-price-discount-rules-2-0?utm_source=woo-discount-rules-v2&utm_campaign=doc&utm_medium=text-click&utm_content=sale_regular_price_settings" target="_blank"><?php esc_html_e('Read Docs', 'woo-discount-rules'); ?></a></span>
25
  </td>
26
  <td>
27
  <select name="calculate_discount_from">
28
+ <option value="sale_price" <?php echo ($configuration->getConfig('calculate_discount_from', 'sale_price') == 'sale_price') ? 'selected' : ''; ?>><?php _e('Sale price', 'woo-discount-rules'); ?></option>
29
+ <option value="regular_price" <?php echo ($configuration->getConfig('calculate_discount_from', 'sale_price') == 'regular_price') ? 'selected' : ''; ?> ><?php _e('Regular price', 'woo-discount-rules'); ?></option>
30
  </select>
31
  </td>
32
  </tr>
33
  <tr>
34
  <td scope="row">
35
+ <label for="apply_product_discount_to" class="awdr-left-align"><?php _e('Apply discount', 'woo-discount-rules') ?></label>
36
+ <span class="wdr_settings_desc_text awdr-clear-both"><?php esc_attr_e('Highest/Lowest/First/All matched rules', 'woo-discount-rules'); ?></span>
37
  </td>
38
  <td>
39
  <select name="apply_product_discount_to" class="apply_product_and_cart_discount_to" data-subsequent="apply_product_discount_subsequently_row">
40
+ <option value="biggest_discount" <?php echo ($configuration->getConfig('apply_product_discount_to', 'biggest_discount') == 'biggest_discount') ? 'selected' : ''; ?>><?php _e('Biggest one from matched rules', 'woo-discount-rules'); ?></option>
41
+ <option value="lowest_discount" <?php echo ($configuration->getConfig('apply_product_discount_to', 'biggest_discount') == 'lowest_discount') ? 'selected' : ''; ?>><?php _e('Lowest one from matched rules', 'woo-discount-rules'); ?></option>
42
+ <option value="first" <?php echo ($configuration->getConfig('apply_product_discount_to', 'biggest_discount') == 'first') ? 'selected' : ''; ?> ><?php _e('First matched rules', 'woo-discount-rules'); ?></option>
43
+ <option value="all" <?php echo ($configuration->getConfig('apply_product_discount_to', 'biggest_discount') == 'all') ? 'selected' : ''; ?>><?php _e('All matched rules', 'woo-discount-rules'); ?></option>
44
  </select>
45
  </td>
46
  </tr>
47
  <tr class="apply_product_discount_subsequently_row" style="<?php echo ($configuration->getConfig('apply_product_discount_to', 'biggest_discount') != 'all') ? 'display:none' : ''; ?>">
48
  <td scope="row">
49
+ <label for="awdr_subsequent_discount" class="awdr-left-align"><?php _e('Apply discount subsequently', 'woo-discount-rules') ?></label>
50
+ <span class="wdr_settings_desc_text awdr-clear-both"><?php esc_attr_e('discounts applied subsequently', 'woo-discount-rules'); ?></span>
51
  </td>
52
  <td>
53
  <input type="radio" name="apply_discount_subsequently" id="do_apply_discount_subsequently"
54
  value="1" <?php echo($configuration->getConfig('apply_discount_subsequently', 0) ? 'checked' : '') ?>><label
55
+ for="do_apply_discount_subsequently"><?php _e('Yes', 'woo-discount-rules'); ?></label>
56
  <input type="radio" name="apply_discount_subsequently"
57
  id="do_not_apply_discount_subsequently"
58
  value="0" <?php echo(!$configuration->getConfig('apply_discount_subsequently', 0) ? 'checked' : '') ?>><label
59
+ for="do_not_apply_discount_subsequently"><?php _e('No', 'woo-discount-rules'); ?></label>
60
  </td>
61
  </tr>
62
  <tr>
63
  <td scope="row">
64
+ <label for="disable_coupon_when_rule_applied" class="awdr-left-align"><?php _e('Choose how discount rules should work', 'woo-discount-rules') ?> - <a href=" https://docs.flycart.org/en/articles/4178875-choose-how-discount-rules-should-work-when-woocommerce-coupons-are-used-2-0?utm_source=woo-discount-rules-v2&utm_campaign=doc&utm_medium=text-click&utm_content=choose_how_discount_rules_works_setting" target="_blank"><?php esc_html_e('Read Docs', 'woo-discount-rules'); ?></a></label>
65
+ <span class="wdr_settings_desc_text awdr-clear-both"><?php esc_attr_e('Choose how discount rules should work when WooCommerce coupons (or third party) coupons are used?', 'woo-discount-rules'); ?></span>
66
  </td>
67
  <td>
68
  <?php
69
  $disable_coupon_when_rule_applied = $configuration->getConfig('disable_coupon_when_rule_applied', 'run_both');
70
  ?>
71
  <select name="disable_coupon_when_rule_applied" class="disable_coupon_when_rule_applied">
72
+ <option value="run_both" <?php echo ($disable_coupon_when_rule_applied == 'run_both') ? 'selected' : ''; ?>><?php _e('Let both coupons and discount rules run together', 'woo-discount-rules'); ?></option>
73
+ <option value="disable_coupon" <?php echo ($disable_coupon_when_rule_applied == 'disable_coupon') ? 'selected' : ''; ?>><?php _e('Disable the coupons (discount rules will work)', 'woo-discount-rules'); ?></option>
74
+ <option value="disable_rules" <?php echo ($disable_coupon_when_rule_applied == 'disable_rules') ? 'selected' : ''; ?> ><?php _e('Disable the discount rules (coupons will work)', 'woo-discount-rules'); ?></option>
75
  </select>
76
  </td>
77
  </tr>
78
  <tr>
79
  <td scope="row">
80
+ <label class="awdr-left-align"><?php _e('Refresh order review in checkout', 'woo-discount-rules') ?></label>
81
+ <span class="wdr_settings_desc_text awdr-clear-both"><?php esc_attr_e('Useful when you have purchase history/shipping address based discount.', 'woo-discount-rules'); ?></span>
82
  </td>
83
  <td>
84
  <input type="radio" name="refresh_order_review" id="refresh_order_review_enable"
85
  value="1" <?php echo($configuration->getConfig('refresh_order_review', 0) ? 'checked' : '') ?>><label
86
+ for="refresh_order_review_enable"><?php _e('Yes', 'woo-discount-rules'); ?></label>
87
  <input type="radio" name="refresh_order_review"
88
  id="refresh_order_review_disable"
89
  value="0" <?php echo(!$configuration->getConfig('refresh_order_review', 0) ? 'checked' : '') ?>><label
90
+ for="refresh_order_review_disable"><?php _e('No', 'woo-discount-rules'); ?></label>
91
  </td>
92
  </tr>
93
  <tr>
94
  <td scope="row">
95
+ <label class="awdr-left-align"><?php _e('Suppress third party discount plugins', 'woo-discount-rules') ?></label>
96
+ <span class="wdr_settings_desc_text awdr-clear-both"><?php esc_attr_e('Suppress third party plugins from modifying the prices. other discount plugins may not works!', 'woo-discount-rules'); ?></span>
97
+ <span class="wdr_settings_desc_text awdr-clear-both text-warning"><?php esc_attr_e('Change this option only if recommended.', 'woo-discount-rules'); ?></span>
98
  </td>
99
  <td>
100
  <input type="radio" name="suppress_other_discount_plugins" id="suppress_other_discount_plugins"
101
  value="1" <?php echo($configuration->getConfig('suppress_other_discount_plugins', 0) ? 'checked' : '') ?>><label
102
+ for="suppress_other_discount_plugins"><?php _e('Yes', 'woo-discount-rules'); ?></label>
103
  <input type="radio" name="suppress_other_discount_plugins"
104
  id="do_not_suppress_other_discount_plugins"
105
  value="0" <?php echo(!$configuration->getConfig('suppress_other_discount_plugins', 0) ? 'checked' : '') ?>><label
106
+ for="do_not_suppress_other_discount_plugins"><?php _e('No', 'woo-discount-rules'); ?></label>
107
  </td>
108
  </tr>
109
  <?php
112
  </tbody>
113
  </table>
114
 
115
+ <h1><?php _e('Product', 'woo-discount-rules') ?></h1>
116
 
117
  <table class="wdr-general-setting form-table">
118
  <tbody style="background-color: #fff;">
119
  <tr>
120
  <td scope="row">
121
+ <label for="" class="awdr-left-align"><?php _e('On-sale badge', 'woo-discount-rules') ?></label>
122
+ <span class="wdr_settings_desc_text awdr-clear-both"><?php esc_attr_e('show on-sale badge', 'woo-discount-rules'); ?> - <a href="https://docs.flycart.org/en/articles/4098969-sale-page-discount-rules-2-0?utm_source=woo-discount-rules-v2&utm_campaign=doc&utm_medium=text-click&utm_content=show_on_sale_badge_setting" target="_blank"><?php esc_html_e('Read Docs', 'woo-discount-rules'); ?></a></span>
123
  </td>
124
  <td>
125
  <?php
126
  $show_on_sale_badge = $configuration->getConfig('show_on_sale_badge', 'disabled');
127
  ?>
128
  <select name="show_on_sale_badge" class="on_sale_badge_condition">
129
+ <option value="when_condition_matches" <?php echo ($show_on_sale_badge == 'when_condition_matches') ? 'selected' : ''; ?> ><?php _e('Show only after a rule condition is matched exactly', 'woo-discount-rules'); ?></option>
130
+ <option value="at_least_has_any_rules" <?php echo ($show_on_sale_badge == 'at_least_has_any_rules') ? 'selected' : ''; ?>><?php _e('Show on products that are covered under any discount rule in the plugin', 'woo-discount-rules'); ?></option>
131
+ <option value="disabled" <?php echo ($show_on_sale_badge == 'disabled') ? 'selected' : ''; ?>><?php _e('Do not show', 'woo-discount-rules'); ?></option>
132
  </select>
133
  </td>
134
  </tr>
135
  <tr class="sale_badge_toggle" style="<?php echo ($show_on_sale_badge == 'disabled')? 'display:none;':''?>">
136
  <td scope="row">
137
+ <label for="" class="awdr-left-align"><?php _e('Do you want to customize the sale badge?', 'woo-discount-rules') ?></label>
138
+ <span class="wdr_settings_desc_text awdr-clear-both"><?php esc_attr_e('Customize the sale badge', 'woo-discount-rules'); ?></span>
139
  </td>
140
  <td>
141
  <?php
144
  ?>
145
  <input type="checkbox" name="customize_on_sale_badge" id="customize_on_sale_badge"
146
  value="1" <?php echo ( $customize_on_sale_badge == 1 ? 'checked' : '') ?>><label
147
+ for="customize_on_sale_badge" class="padding10"><?php _e('Yes, I would like to customize the sale badge', 'woo-discount-rules'); ?></label>
148
  <br>
149
  <input type="checkbox" name="force_override_on_sale_badge" id="force_override_on_sale_badge"
150
  value="1" <?php echo ( $force_override_on_sale_badge == 1 ? 'checked' : '') ?>><label
151
+ for="force_override_on_sale_badge" class="padding10"><?php _e('Force override the label for sale badge (useful when your theme has override for sale badge).', 'woo-discount-rules'); ?></label>
152
  </td>
153
  </tr>
154
  <tr class="sale_badge_customizer" style="<?php echo ($show_on_sale_badge != 'disabled' && $customize_on_sale_badge == 1) ? '':'display:none;'?>">
155
  <td scope="row">
156
+ <label for="" class="awdr-left-align"><?php _e('Sale badge content', 'woo-discount-rules') ?></label>
157
+ <span class="wdr_settings_desc_text awdr-clear-both"><?php _e('You can use HTML inside. <br><b>IMPORTANT NOTE:</b> This customized sale badge will be applicable only for products that are part of the discount rules configured in this plugin <b>Eg:</b><span class="onsale">Sale!</span>', 'woo-discount-rules'); ?></span>
158
  </td>
159
  <td>
160
  <textarea name="on_sale_badge_html"
165
  </tr>
166
  <tr>
167
  <td scope="row">
168
+ <label for="" class="awdr-left-align"><?php _e('Show discount table ', 'woo-discount-rules') ?></label>
169
+ <span class="wdr_settings_desc_text awdr-clear-both"><?php esc_attr_e('Show discount table on product page', 'woo-discount-rules'); ?> - <a href="https://docs.flycart.org/en/articles/4230405-all-about-discount-table-2-0?utm_source=woo-discount-rules-v2&utm_campaign=doc&utm_medium=text-click&utm_content=show_discount_table_setting" target="_blank"><?php esc_html_e('Read Docs', 'woo-discount-rules'); ?></a></span>
170
  </td>
171
  <td>
172
  <input type="radio" name="show_bulk_table" id="show_bulk_table_layout" class="bulk_table_layout settings_option_show_hide"
173
  value="1" <?php echo($configuration->getConfig('show_bulk_table', 0) ? 'checked' : '') ?> data-name="hide_table_position"><label
174
+ for="show_bulk_table_layout"><?php _e('Yes', 'woo-discount-rules'); ?></label>
175
  <input type="radio" name="show_bulk_table" id="dont_show_bulk_table_layout" class="bulk_table_layout settings_option_show_hide"
176
  value="0" <?php echo(!$configuration->getConfig('show_bulk_table', 0) ? 'checked' : '') ?> data-name="hide_table_position"><label
177
+ for="dont_show_bulk_table_layout"><?php _e('No', 'woo-discount-rules'); ?></label>
178
+ <a class="wdr-popup-link" style="<?php echo (!$configuration->getConfig('show_bulk_table', 0)) ? 'display:none' : ''; ?>"><span class="modal-trigger" data-modal="modal-name"><?php _e("Customize Discount Table", 'woo-discount-rules'); ?></a>
179
  </td>
180
 
181
  </tr>
182
  <tr class="hide_table_position"
183
  style="<?php echo (!$configuration->getConfig('show_bulk_table', 0) ? 'display:none' : ''); ?>">
184
  <td scope="row">
185
+ <label for="position_to_show_bulk_table" class="awdr-left-align"><?php _e('Position to show discount table', 'woo-discount-rules') ?></label>
186
+ <span class="wdr_settings_desc_text awdr-clear-both"><?php esc_attr_e('Position to show discount table on product page', 'woo-discount-rules'); ?></span>
187
  </td>
188
  <td>
189
  <select name="position_to_show_bulk_table">
190
+ <option value="woocommerce_before_add_to_cart_form" <?php echo ($configuration->getConfig('position_to_show_bulk_table', 'woocommerce_before_add_to_cart_form') == 'woocommerce_before_add_to_cart_form') ? 'selected' : ''; ?> ><?php _e('Woocommerce before add to cart form', 'woo-discount-rules'); ?></option>
191
+ <option value="woocommerce_product_meta_end" <?php echo ($configuration->getConfig('position_to_show_bulk_table', 'woocommerce_before_add_to_cart_form') == 'woocommerce_product_meta_end') ? 'selected' : ''; ?>><?php _e('Woocommerce product meta end', 'woo-discount-rules'); ?></option>
192
+ <option value="woocommerce_product_meta_start" <?php echo ($configuration->getConfig('position_to_show_bulk_table', 'woocommerce_before_add_to_cart_form') == 'woocommerce_product_meta_start') ? 'selected' : ''; ?>><?php _e('Woocommerce product meta start', 'woo-discount-rules'); ?></option>
193
+ <option value="woocommerce_after_add_to_cart_form" <?php echo ($configuration->getConfig('position_to_show_bulk_table', 'woocommerce_before_add_to_cart_form') == 'woocommerce_after_add_to_cart_form') ? 'selected' : ''; ?>><?php _e('Woocommerce after add to cart form', 'woo-discount-rules'); ?></option>
194
+ <option value="woocommerce_after_single_product" <?php echo ($configuration->getConfig('position_to_show_bulk_table', 'woocommerce_before_add_to_cart_form') == 'woocommerce_after_single_product') ? 'selected' : ''; ?>><?php _e('Woocommerce after single product', 'woo-discount-rules'); ?></option>
195
+ <option value="woocommerce_before_single_product" <?php echo ($configuration->getConfig('position_to_show_bulk_table', 'woocommerce_before_add_to_cart_form') == 'woocommerce_before_single_product') ? 'selected' : ''; ?>><?php _e('Woocommerce before single product', 'woo-discount-rules'); ?></option>
196
+ <option value="woocommerce_after_single_product_summary" <?php echo ($configuration->getConfig('position_to_show_bulk_table', 'woocommerce_before_add_to_cart_form') == 'woocommerce_after_single_product_summary') ? 'selected' : ''; ?>><?php _e('Woocommerce after single product summary', 'woo-discount-rules'); ?></option>
197
+ <option value="woocommerce_before_single_product_summary" <?php echo ($configuration->getConfig('position_to_show_bulk_table', 'woocommerce_before_add_to_cart_form') == 'woocommerce_before_single_product_summary') ? 'selected' : ''; ?>><?php _e('Woocommerce before single product summary', 'woo-discount-rules'); ?></option>
198
  </select>
199
  </td>
200
  </tr>
201
  <tr>
202
  <td scope="row">
203
+ <label for="position_to_show_discount_bar" class="awdr-left-align"><?php _e('Position to show discount bar', 'woo-discount-rules') ?></label>
204
+ <span class="wdr_settings_desc_text awdr-clear-both"><?php esc_attr_e('Position to show discount bar on product page', 'woo-discount-rules'); ?></span>
205
  </td>
206
  <td>
207
  <select name="position_to_show_discount_bar">
208
+ <option value="woocommerce_before_add_to_cart_form" <?php echo ($configuration->getConfig('position_to_show_discount_bar', 'woocommerce_before_add_to_cart_form') == 'woocommerce_before_add_to_cart_form') ? 'selected' : ''; ?> ><?php _e('Woocommerce before add to cart form', 'woo-discount-rules'); ?></option>
209
+ <option value="woocommerce_product_meta_end" <?php echo ($configuration->getConfig('position_to_show_discount_bar', 'woocommerce_before_add_to_cart_form') == 'woocommerce_product_meta_end') ? 'selected' : ''; ?>><?php _e('Woocommerce product meta end', 'woo-discount-rules'); ?></option>
210
+ <option value="woocommerce_product_meta_start" <?php echo ($configuration->getConfig('position_to_show_discount_bar', 'woocommerce_before_add_to_cart_form') == 'woocommerce_product_meta_start') ? 'selected' : ''; ?>><?php _e('Woocommerce product meta start', 'woo-discount-rules'); ?></option>
211
+ <option value="woocommerce_after_add_to_cart_form" <?php echo ($configuration->getConfig('position_to_show_discount_bar', 'woocommerce_before_add_to_cart_form') == 'woocommerce_after_add_to_cart_form') ? 'selected' : ''; ?>><?php _e('Woocommerce after add to cart form', 'woo-discount-rules'); ?></option>
212
+ <option value="woocommerce_after_single_product" <?php echo ($configuration->getConfig('position_to_show_discount_bar', 'woocommerce_before_add_to_cart_form') == 'woocommerce_after_single_product') ? 'selected' : ''; ?>><?php _e('Woocommerce after single product', 'woo-discount-rules'); ?></option>
213
+ <option value="woocommerce_before_single_product" <?php echo ($configuration->getConfig('position_to_show_discount_bar', 'woocommerce_before_add_to_cart_form') == 'woocommerce_before_single_product') ? 'selected' : ''; ?>><?php _e('Woocommerce before single product', 'woo-discount-rules'); ?></option>
214
+ <option value="woocommerce_after_single_product_summary" <?php echo ($configuration->getConfig('position_to_show_discount_bar', 'woocommerce_before_add_to_cart_form') == 'woocommerce_after_single_product_summary') ? 'selected' : ''; ?>><?php _e('Woocommerce after single product summary', 'woo-discount-rules'); ?></option>
215
+ <option value="woocommerce_before_single_product_summary" <?php echo ($configuration->getConfig('position_to_show_discount_bar', 'woocommerce_before_add_to_cart_form') == 'woocommerce_before_single_product_summary') ? 'selected' : ''; ?>><?php _e('Woocommerce before single product summary', 'woo-discount-rules'); ?></option>
216
  </select>
217
  </td>
218
  </tr>
219
  <tr>
220
  <td scope="row">
221
+ <label for="" class="awdr-left-align"><?php _e('Show strikeout price', 'woo-discount-rules') ?></label>
222
+ <span class="wdr_settings_desc_text awdr-clear-both"><?php esc_attr_e('Show product strikeout price on', 'woo-discount-rules'); ?></span>
223
  </td>
224
  <td>
225
  <input type="checkbox" name="modify_price_at_shop_page" id="modify_price_at_shop_page"
226
  value="1" <?php echo($configuration->getConfig('modify_price_at_shop_page', 1) ? 'checked' : '') ?>><label
227
+ for="modify_price_at_shop_page" class="padding10"><?php _e('On shop page?', 'woo-discount-rules'); ?></label>
228
  <input type="checkbox" name="modify_price_at_product_page" id="modify_price_at_product_page"
229
  value="1" <?php echo($configuration->getConfig('modify_price_at_product_page', 1) ? 'checked' : '') ?>><label
230
+ for="modify_price_at_product_page" class="padding10"><?php _e('On product page?', 'woo-discount-rules'); ?></label>
231
  <input type="checkbox" name="modify_price_at_category_page" id="modify_price_at_category_page"
232
  value="1" <?php echo($configuration->getConfig('modify_price_at_category_page', 1) ? 'checked' : '') ?>><label
233
+ for="modify_price_at_category_page" class="padding10"><?php _e('On category page?', 'woo-discount-rules'); ?></label>
234
 
235
  </td>
236
  </tr>
237
  <tr>
238
  <td scope="row">
239
+ <label for="" class="awdr-left-align"><?php _e('Show Strikeout when', 'woo-discount-rules') ?></label>
240
+ <span class="wdr_settings_desc_text awdr-clear-both"><?php esc_attr_e('Show Strikeout when this option is matched', 'woo-discount-rules'); ?> - <a href="https://docs.flycart.org/en/articles/4178894-display-discounted-price-with-strikethrough-on-default-prices-2-0?utm_source=woo-discount-rules-v2&utm_campaign=doc&utm_medium=text-click&utm_content=show_strike_out_setting" target="_blank"><?php esc_html_e('Read Docs', 'woo-discount-rules'); ?></a></span>
241
  </td>
242
  <td>
243
  <select name="show_strikeout_when">
244
+ <option value="show_when_matched" <?php echo ($configuration->getConfig('show_strikeout_when', 'show_when_matched') == 'show_when_matched') ? 'selected' : ''; ?> ><?php _e('Show when a rule condition is matched', 'woo-discount-rules'); ?></option>
245
+ <option value="show_after_matched" <?php echo ($configuration->getConfig('show_strikeout_when', 'show_when_matched') == 'show_after_matched') ? 'selected' : ''; ?>><?php _e('Show after a rule condition is matched', 'woo-discount-rules'); ?></option>
246
+ <option value="show_dynamically" <?php echo ($configuration->getConfig('show_strikeout_when', 'show_when_matched') == 'show_dynamically') ? 'selected' : ''; ?>><?php _e('Shown on quantity update (dynamic)', 'woo-discount-rules'); ?></option>
247
  </select>
248
  </td>
249
  </tr>
254
  </tbody>
255
  </table>
256
 
257
+ <h1><?php _e('Cart', 'woo-discount-rules'); ?></h1>
258
 
259
  <table class="wdr-general-setting form-table">
260
  <tbody style="background-color: #fff;">
261
  <tr>
262
  <td scope="row">
263
+ <label for="" class="awdr-left-align"><?php _e('Show strikeout on cart', 'woo-discount-rules') ?></label>
264
+ <span class="wdr_settings_desc_text awdr-clear-both"><?php esc_attr_e('Show price strikeout on cart', 'woo-discount-rules'); ?></span>
265
  </td>
266
  <td>
267
  <input type="radio" name="show_strikeout_on_cart" id="show_strikeout_on_cart"
268
  value="1" <?php echo($configuration->getConfig('show_strikeout_on_cart', 1) ? 'checked' : '') ?>><label
269
+ for="show_strikeout_on_cart"><?php _e('Yes', 'woo-discount-rules'); ?></label>
270
 
271
  <input type="radio" name="show_strikeout_on_cart" id="dont_show_strikeout_on_cart"
272
  value="0" <?php echo(!$configuration->getConfig('show_strikeout_on_cart', 1) ? 'checked' : '') ?>><label
273
+ for="dont_show_strikeout_on_cart"><?php _e('No', 'woo-discount-rules'); ?></label>
274
  </td>
275
  </tr>
276
  <tr>
277
  <td scope="row">
278
+ <label for="" class="awdr-left-align"><?php _e('Apply cart discount as', 'woo-discount-rules') ?></label>
279
+ <span class="wdr_settings_desc_text awdr-clear-both"><?php esc_attr_e('Apply cart discount as fee/coupon', 'woo-discount-rules'); ?></span>
280
  </td>
281
  <td>
282
  <select name="apply_cart_discount_as">
283
+ <option value="fee" <?php echo ($configuration->getConfig('apply_cart_discount_as', 'fee') == 'fee') ? 'selected' : ''; ?> ><?php _e('Fee', 'woo-discount-rules'); ?></option>
284
+ <option value="coupon" <?php echo ($configuration->getConfig('apply_cart_discount_as', 'fee') == 'coupon') ? 'selected' : ''; ?>><?php _e('Coupon', 'woo-discount-rules'); ?></option>
285
  </select>
286
  </td>
287
  </tr>
288
  <tr>
289
  <td scope="row">
290
+ <label for="" class="awdr-left-align"><?php _e('Combine all cart discounts', 'woo-discount-rules') ?></label>
291
+ <span class="wdr_settings_desc_text awdr-clear-both"><?php esc_attr_e('Combine all cart discounts in single discount label', 'woo-discount-rules'); ?></span>
292
  </td>
293
  <td>
294
  <input type="radio" name="combine_all_cart_discounts" id="combine_all_cart_discounts"
295
  data-name="combine_all_cart_discounts"
296
  value="1"
297
  class="settings_option_show_hide" <?php echo($configuration->getConfig('combine_all_cart_discounts', 0) ? 'checked' : '') ?>><label
298
+ for="combine_all_cart_discounts"><?php _e('Yes', 'woo-discount-rules'); ?></label>
299
 
300
  <input type="radio" name="combine_all_cart_discounts" id="dont_combine_all_cart_discounts"
301
  data-name="combine_all_cart_discounts"
302
  value="0"
303
  class="settings_option_show_hide" <?php echo(!$configuration->getConfig('combine_all_cart_discounts', 0) ? 'checked' : '') ?>><label
304
+ for="dont_combine_all_cart_discounts"><?php _e('No', 'woo-discount-rules'); ?></label>
305
  </td>
306
  </tr>
307
  <tr class="combine_all_cart_discounts"
308
  style="<?php echo(!$configuration->getConfig('combine_all_cart_discounts', 0) ? 'display:none' : '') ?>">
309
  <td scope="row">
310
+ <label for="discount_label_for_combined_discounts" class="awdr-left-align"><?php _e('Discount label for combined discounts', 'woo-discount-rules') ?></label>
311
+ <span class="wdr_settings_desc_text awdr-clear-both"><?php esc_attr_e('Discount label for combined discounts', 'woo-discount-rules'); ?></span>
312
  </td>
313
  <td>
314
  <input type="text" name="discount_label_for_combined_discounts"
320
  ?>
321
  </tbody>
322
  </table>
323
+ <h1><?php _e('Promotion', 'woo-discount-rules'); ?></h1>
324
  <table class="wdr-general-setting form-table">
325
  <tbody style="background-color: #fff;">
326
  <tr>
327
  <td scope="row">
328
+ <label for="" class="awdr-left-align"><?php _e('Condition based promotion', 'woo-discount-rules') ?></label>
329
+ <span class="wdr_settings_desc_text awdr-clear-both"><?php _e('Display Condition based promotion messages in cart/product/shop pages<br>If enabled an option to add promotion message will displays on each rule(when promotion condition is added)', 'woo-discount-rules'); ?></span>
330
  </td>
331
  <td>
332
+ <input type="checkbox" name="show_subtotal_promotion" id="show_subtotal_promotion" class="awdr_show_condition_promotion_message"
333
+ value="1" <?php echo($configuration->getConfig('show_subtotal_promotion', 0) ? 'checked' : '') ?>><label
334
+ for="show_subtotal_promotion" class="padding10"><?php _e('Subtotal Promotion?', 'woo-discount-rules'); ?></label>
335
+ <input type="checkbox" name="show_cart_quantity_promotion" id="show_cart_quantity_promotion" class="awdr_show_condition_promotion_message"
336
+ value="1" <?php echo($configuration->getConfig('show_cart_quantity_promotion', 0) ? 'checked' : '') ?>><label
337
+ for="show_cart_quantity_promotion" class="padding10"><?php _e('Cart Quantity Promotion?', 'woo-discount-rules'); ?></label>
 
 
 
 
 
338
  </td>
339
+
340
  </tr>
341
+ <tr class="awdr_promotion_message_display_pages" <!--style="--><?php /*echo ($configuration->getConfig('show_subtotal_promotion', 0) || $configuration->getConfig('show_cart_quantity_promotion', 0)) ? '' : 'display:none'; */?>">
342
  <td scope="row">
343
+ <label for="show_promo_text" class="awdr-left-align"><?php _e('Condition based promo text', 'woo-discount-rules') ?></label>
344
+ <span class="wdr_settings_desc_text awdr-clear-both"><?php esc_attr_e('Condition based promo text (available only for subtotal based discounts) ', 'woo-discount-rules'); ?></span>
345
  </td>
346
  <td>
347
  <?php $show_promo_text = $configuration->getConfig('show_promo_text', ''); ?>
348
+ <select name="show_promo_text[]" multiple class="edit-all-loaded-values" id="show_promo_text" data-placeholder="<?php esc_attr_e("Select the page to display promotion message", 'woo-discount-rules');?>">
349
+ <option value="shop_page" <?php echo (!empty($show_promo_text) && is_array($show_promo_text) && in_array('shop_page', $show_promo_text)) ? 'selected' : ''; ?>><?php _e('Shop page', 'woo-discount-rules'); ?></option>
350
+ <option value="product_page" <?php echo (!empty($show_promo_text) && is_array($show_promo_text) && in_array('product_page', $show_promo_text)) ? 'selected' : ''; ?> ><?php _e('Product page', 'woo-discount-rules'); ?></option>
351
+ <option value="cart_page" <?php echo (!empty($show_promo_text) && is_array($show_promo_text) && in_array('cart_page', $show_promo_text)) ? 'selected' : ''; ?> ><?php _e('Cart page', 'woo-discount-rules'); ?></option>
352
+ <option value="checkout_page" <?php echo (!empty($show_promo_text) && is_array($show_promo_text) && in_array('checkout_page', $show_promo_text)) ? 'selected' : ''; ?> ><?php _e('Checkout page', 'woo-discount-rules'); ?></option>
353
  </select>
354
  </td>
355
  </tr>
356
  <tr>
357
  <td scope="row">
358
+ <label for="display_saving_text" class="awdr-left-align"><?php _e('Display you saved text', 'woo-discount-rules') ?></label>
359
+ <span class="wdr_settings_desc_text awdr-clear-both"><?php esc_attr_e('Display you saved text when rule applied', 'woo-discount-rules'); ?> - <a href="https://docs.flycart.org/en/articles/4129525-display-you-saved-message-2-0?utm_source=woo-discount-rules-v2&utm_campaign=doc&utm_medium=text-click&utm_content=display_you_saved_text" target="_blank"><?php esc_html_e('Read Docs', 'woo-discount-rules'); ?></a></span>
360
  </td>
361
  <td>
362
  <select name="display_saving_text" class="settings_option_show_hide_on_change">
363
+ <option value="disabled" <?php echo ($configuration->getConfig('display_saving_text', 'disabled') == 'disabled') ? 'selected' : ''; ?>><?php _e('Disabled', 'woo-discount-rules'); ?></option>
364
+ <option value="on_each_line_item" <?php echo ($configuration->getConfig('display_saving_text', 'disabled') == 'on_each_line_item') ? 'selected' : ''; ?> ><?php _e('On each line item', 'woo-discount-rules'); ?></option>
365
+ <option value="after_total" <?php echo ($configuration->getConfig('display_saving_text', 'disabled') == 'after_total') ? 'selected' : ''; ?> ><?php _e('On after total', 'woo-discount-rules'); ?></option>
366
+ <option value="both_line_item_and_after_total" <?php echo ($configuration->getConfig('display_saving_text', 'disabled') == 'both_line_item_and_after_total') ? 'selected' : ''; ?> ><?php _e('Both in line item and after total', 'woo-discount-rules'); ?></option>
367
  </select>
368
  </td>
369
  </tr>
370
  <tr class="display_you_saved_text"
371
  style="<?php echo ($configuration->getConfig('display_saving_text', 'disabled') == 'disabled') ? 'display:none' : ''; ?>">
372
  <td scope="row">
373
+ <label for="you_saved_text" class="awdr-left-align"><?php _e('Savings text to show', 'woo-discount-rules') ?></label>
374
+ <span class="wdr_settings_desc_text awdr-clear-both"><?php esc_attr_e('You save text to show when rule applied', 'woo-discount-rules'); ?></span>
375
  </td>
376
  <td>
377
  <textarea name="you_saved_text" rows="5"
380
  </tr>
381
  <tr>
382
  <td scope="row">
383
+ <label for="" class="awdr-left-align"><?php _e('Show a discount applied message on cart?', 'woo-discount-rules') ?></label>
384
+ <span class="wdr_settings_desc_text awdr-clear-both"><?php esc_attr_e('Show message in cart page on rule applied', 'woo-discount-rules'); ?></span>
385
  </td>
386
  <td>
387
  <input type="radio" name="show_applied_rules_message_on_cart" class="settings_option_show_hide"
388
  id="show_applied_rules_message_on_cart" data-name="hide_alert_message_text"
389
  value="1" <?php echo($configuration->getConfig('show_applied_rules_message_on_cart', 0) ? 'checked' : '') ?>><label
390
+ for="show_applied_rules_message_on_cart"><?php _e('Yes', 'woo-discount-rules'); ?></label>
391
 
392
  <input type="radio" name="show_applied_rules_message_on_cart" class="settings_option_show_hide"
393
  id="dont_show_applied_rules_message_on_cart" data-name="hide_alert_message_text"
394
  value="0" <?php echo(!$configuration->getConfig('show_applied_rules_message_on_cart', 0) ? 'checked' : '') ?>><label
395
+ for="dont_show_applied_rules_message_on_cart"><?php _e('No', 'woo-discount-rules'); ?></label>
396
  </td>
397
  </tr>
398
  <tr class="hide_alert_message_text" style="<?php echo (!$configuration->getConfig('show_applied_rules_message_on_cart', 0)) ? 'display:none' : ''; ?>">
399
  <td scope="row">
400
+ <label for="applied_rule_message" class="awdr-left-align"><?php _e('Applied rule message text on cart', 'woo-discount-rules') ?></label>
401
+ <span class="wdr_settings_desc_text awdr-clear-both"><?php esc_attr_e('Text to show when rule applied', 'woo-discount-rules'); ?></span>
402
  </td>
403
  <td>
404
  <textarea name="applied_rule_message"
405
  rows="5"
406
+ cols="30"><?php echo $configuration->getConfig('applied_rule_message', __('Discount <strong>{{title}}</strong> has been applied to your cart.', 'woo-discount-rules')); ?></textarea>
407
  </td>
408
  </tr>
409
+ <?php
410
+ do_action('advanced_woo_discount_rules_promotion_settings_fields', $configuration);
411
+ ?>
412
  </tbody>
413
  </table>
414
+ <!--<h1><?php /*_e('Banner', 'woo-discount-rules'); */?></h1>
415
  <table class="wdr-general-setting form-table">
416
  <tbody style="background-color: #fff;">
417
  <?php /*if(!$is_pro) { */?>
418
  <tr class="" style="">
419
  <td scope="row">
420
  <label for="applied_rule_message"
421
+ class="awdr-left-align"><?php /*_e('Banner Content', 'woo-discount-rules') */?></label>
422
+ <span class="wdr_desc_text awdr-clear-both"><?php /*_e('A static banner you that you want to display in your storefront. <br><br> <b>NOTE:</b> It is a static banner. You can use any content or html here.', 'woo-discount-rules'); */?></span>
423
  </td>
424
  <td>
425
+ <?php /*_e("Unlock this feature by <a href='https://www.flycart.org/products/wordpress/woocommerce-discount-rules?utm_source=woo-discount-rules-v2&utm_campaign=doc&utm_medium=text-click&utm_content=unlock_pro' target='_blank'>Upgrading to Pro</a>", 'woo-discount-rules'); */?>
426
  </td>
427
  </tr>
428
  <tr class="" style="">
429
  <td scope="row">
430
  <label for="applied_rule_message"
431
+ class="awdr-left-align"><?php /*_e('Banner Content display position', 'woo-discount-rules') */?></label>
432
+ <span class="wdr_desc_text awdr-clear-both"><?php /*_e('Choose a display position for the banner in your storefront', 'woo-discount-rules'); */?></span>
433
  </td>
434
+ <td><?php /*_e("Unlock this feature by <a href='https://www.flycart.org/products/wordpress/woocommerce-discount-rules?utm_source=woo-discount-rules-v2&utm_campaign=doc&utm_medium=text-click&utm_content=unlock_pro' target='_blank'>Upgrading to Pro</a>", 'woo-discount-rules'); */?></td>
435
  </tr>
436
  <?php /*} */?>
437
 
440
  */?>
441
  </tbody>
442
  </table>-->
443
+ <h1><?php _e('On-Sale page', 'woo-discount-rules'); ?> - <a href="https://docs.flycart.org/en/articles/4098969-sale-page-discount-rules-2-0?utm_source=woo-discount-rules-v2&utm_campaign=doc&utm_medium=text-click&utm_content=on_sale_page_settings" target="_blank"><?php esc_html_e('Read Docs', 'woo-discount-rules'); ?></a></h1>
444
  <table class="wdr-general-setting form-table">
445
  <tbody style="background-color: #fff;">
446
  <tr>
447
  <td scope="row">
448
  <?php
449
+ _e('Select rules for the On Sale Page', 'woo-discount-rules' );
450
  ?>
451
  </td>
452
  <td scope="row">
460
  class="edit-all-loaded-values"
461
  data-list=""
462
  data-field="autoloaded"
463
+ data-placeholder="<?php esc_attr_e("Type the name of the rule to select it", 'woo-discount-rules');?>"
464
  style="">
465
  <option value="all"
466
  <?php if(!empty($awdr_rebuild_on_sale_rules) && is_array($awdr_rebuild_on_sale_rules)){
468
  echo ' selected ';
469
  }
470
  } ?>
471
+ ><?php esc_attr_e("All active rules", 'woo-discount-rules'); ?></option>
472
  <?php
473
  $rules = \Wdr\App\Controllers\ManageDiscount::$available_rules;
474
  if(!empty($rules) && is_array($rules)){
492
  <div class="awdr_rebuild_on_sale_list_notice">
493
  </div>
494
  </div>
495
+ <button type="button" class="btn btn-warning" id="awdr_rebuild_on_sale_list" data-awdr_nonce="<?php echo \Wdr\App\Helpers\Helper::create_nonce('wdr_ajax_rule_build_index'); ?>"><?php _e('Save and Build Index', 'woo-discount-rules' ); ?></button>
496
  <?php } else {
497
+ _e("Unlock this feature by <a href='https://www.flycart.org/products/wordpress/woocommerce-discount-rules?utm_source=woo-discount-rules-v2&utm_campaign=doc&utm_medium=text-click&utm_content=unlock_pro' target='_blank'>Upgrading to Pro</a>", 'woo-discount-rules');
498
  }?>
499
  </td>
500
  </tr>
502
  <tr>
503
  <td scope="row" colspan="2">
504
  <?php
505
+ _e('ShortCode to load all products which has discount through Woo Discount Rules', 'woo-discount-rules' );
506
  ?>
507
  <span id="awdr_shortcode_text">[awdr_sale_items_list]</span>
508
+ <button type="button" class="btn btn-warning" id="awdr_shortcode_copy_btn"><?php _e('Copy ShortCode', 'woo-discount-rules' ); ?></button>
509
  </td>
510
  </tr>
511
  <?php } ?>
522
  <div class="modal-box">
523
  <div class="modal-header">
524
  <div class="close-modal"><span class="wdr-close-modal-box">&#10006;</span></div>
525
+ <h1 class="wdr-modal-header-title"><?php _e("Customize Discount Table", 'woo-discount-rules'); ?></h1>
526
  </div>
527
  <div class="modal-body">
528
+ <p class="awdr-save-green wdr-alert-success" style="display: none;"><?php _e('Settings Saved', 'woo-discount-rules') ?></p>
529
+ <p class="awdr-error-red wdr-alert-error" style="display: none;"><?php _e('Oops! Something went wrong.', 'woo-discount-rules') ?></p>
530
+ <p class="wdr-customizer-notes"><b><?php _e('Note:', 'woo-discount-rules') ?></b><?php _e(" This table contains sample content for design purpose.", 'woo-discount-rules'); ?></p>
531
  <div style="width: 100%">
532
  <div class="wdr-customizer-container">
533
  <div class="wdr-customizer-grid">
537
 
538
  <tr>
539
  <th scope="row">
540
+ <label for="" class="awdr-left-align"><?php _e('Table Header', 'woo-discount-rules') ?></label>
541
+ <span class="wdr_settings_desc_text awdr-clear-both"><?php esc_attr_e('Show/Hide table header column names', 'woo-discount-rules'); ?></span>
542
  </th>
543
  <td >
544
  <input type="radio" name="table_column_header" id="show_table_header" class="bulk_table_customizer_preview"
545
  value="1" data-colname="wdr_bulk_table_thead" data-showhide="show" <?php echo($configuration->getConfig('table_column_header', 1) ? 'checked' : '') ?>><label
546
+ for="show_table_header"><?php _e('Show', 'woo-discount-rules'); ?></label>
547
  <input type="radio" name="table_column_header" id="dont_show_table_header" class="bulk_table_customizer_preview"
548
  value="0" data-colname="wdr_bulk_table_thead" data-showhide="hide" <?php echo(!$configuration->getConfig('table_column_header', 1) ? 'checked' : '') ?>><label
549
+ for="dont_show_table_header"><?php _e("Don't Show", 'woo-discount-rules'); ?></label>
550
  </td>
551
  </tr>
552
  <tr class="">
553
  <th scope="row">
554
+ <label for="" class="awdr-left-align"><?php _e('Title column Name on table', 'woo-discount-rules') ?></label>
555
+ <span class="wdr_settings_desc_text awdr-clear-both"><?php esc_attr_e('Give name for rule title column', 'woo-discount-rules'); ?></span>
556
  </th>
557
  <td class="awdr_table_columns">
558
  <input type="checkbox" name="table_title_column" value="1" class="bulk_table_customizer_show_hide_column"
563
  </tr>
564
  <tr class="">
565
  <th scope="row">
566
+ <label for="" class="awdr-left-align"><?php _e('Discount column Name on table', 'woo-discount-rules') ?></label>
567
+ <span class="wdr_settings_desc_text awdr-clear-both"><?php esc_attr_e('Give name for discount column', 'woo-discount-rules'); ?></span>
568
  </th>
569
  <td class="awdr_table_columns">
570
  <input type="checkbox" name="table_discount_column" value="1" class="bulk_table_customizer_show_hide_column"
575
  </tr>
576
  <tr class="">
577
  <th scope="row">
578
+ <label for="" class="awdr-left-align"><?php _e('Range column Name on table', 'woo-discount-rules') ?></label>
579
+ <span class="wdr_settings_desc_text awdr-clear-both"><?php esc_attr_e('Give name for range column', 'woo-discount-rules'); ?></span>
580
  </th>
581
  <td class="awdr_table_columns">
582
  <input type="checkbox" name="table_range_column" value="1" class="bulk_table_customizer_show_hide_column"
587
  </tr>
588
  <tr class="">
589
  <th scope="row">
590
+ <label for="" class="awdr-left-align"><?php _e('Discount column value on table', 'woo-discount-rules') ?></label>
591
+ <span class="wdr_settings_desc_text awdr-clear-both"><?php esc_attr_e('Show Discount value/price in table', 'woo-discount-rules'); ?></span>
592
  </th>
593
  <td>
594
  <p><input type="radio" name="table_discount_column_value" id="show_table_discount_column_value" class="popup_table_discount_column_value"
595
  value="1" <?php echo($configuration->getConfig('table_discount_column_value', 1) ? 'checked' : '') ?>><label
596
+ for="show_table_discount_column_value"><?php _e('Discount Value', 'woo-discount-rules'); ?></label></p>
597
  <p><input type="radio" name="table_discount_column_value" id="dont_show_table_discount_column_value" class="popup_table_discount_column_value"
598
  value="0" <?php echo(!$configuration->getConfig('table_discount_column_value', 1) ? 'checked' : '') ?>><label
599
+ for="dont_show_table_discount_column_value"><?php _e("Discounted Price", 'woo-discount-rules'); ?></label></p>
600
  </td>
601
  </tr>
602
  <!-- <tr>
603
  <th scope="row">
604
+ <label for=""><?php /*_e('Color Picker', 'woo-discount-rules') */?></label>
605
  <span style="float: right" class="wdr-tool-tip"
606
+ title="<?php /*_e("Rule name / title", 'woo-discount-rules'); */?>"> &#63</span>
607
  </th>
608
  <td>
609
  <input type="color" id="colorpicker" name="color" pattern="^#+([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$" value="#bada55">
642
  echo 'display:none';
643
  }else{
644
  echo((!$configuration->getConfig('table_title_column', 0)) ? 'display:none' : '');
645
+ } ?>"><span class="title_on_keyup"><?php _e($tbl_title_text, 'woo-discount-rules') ?></span>
646
  </th><?php
647
  } elseif ($column == "tbl_discount") {
648
  ?>
651
  echo 'display:none';
652
  }else{
653
  echo((!$configuration->getConfig('table_discount_column', 0)) ? 'display:none' : '');
654
+ } ?>"><span class="discount_on_keyup"><?php _e($tbl_discount_text, 'woo-discount-rules') ?></span>
655
  </th><?php
656
  } else {
657
  ?>
660
  echo 'display:none';
661
  }else{
662
  echo((!$configuration->getConfig('table_range_column', 0)) ? 'display:none' : '');
663
+ }?>"><span class="range_on_keyup"><?php _e($tbl_range_text, 'woo-discount-rules') ?></span></th><?php
664
  }
665
  }?>
666
  </tr>
671
  if ($column == "tbl_title") {?>
672
  <td class="wdr_bulk_table_td wdr_bulk_title popup_table_title_column col_index_1" data-colindex="1"
673
  style="<?php echo (!$configuration->getConfig('table_title_column', 0)) ? 'display:none' : '';?>">
674
+ <?php _e('Bulk Rule', 'woo-discount-rules'); ?>
675
  </td><?php
676
 
677
  } elseif ($column == "tbl_discount") {?>
679
  style="<?php echo (!$configuration->getConfig('table_discount_column', 0)) ? 'display:none' : '';?>">
680
  <span class="wdr_table_discounted_value" style="<?php echo ( !$configuration->getConfig('table_discount_column_value', 0)) ? 'display: none' : '';?>"><?php
681
  echo \Wdr\App\Helpers\Woocommerce::formatPrice(12);
682
+ _e(' flat', 'woo-discount-rules'); ?></span>
683
  <span class="wdr_table_discounted_price" style="<?php echo ( $configuration->getConfig('table_discount_column_value', 0)) ? 'display: none' : '';?>"><?php
684
  echo \Wdr\App\Helpers\Woocommerce::formatPrice(33); ?></span>
685
  </td><?php
686
  } else {?>
687
  <td class="wdr_bulk_table_td wdr_bulk_range popup_table_range_column col_index_3" data-colindex="3"
688
+ style="<?php echo (!$configuration->getConfig('table_range_column', 0)) ? 'display:none':'';?>"><?php _e('1 - 5', 'woo-discount-rules'); ?></td><?php
689
  }
690
  }?>
691
  </tr>
694
  if ($column == "tbl_title") {?>
695
  <td class="wdr_bulk_table_td wdr_bulk_title popup_table_title_column col_index_1" data-colindex="1"
696
  style="<?php echo (!$configuration->getConfig('table_title_column', 0)) ? 'display:none' : '';?>">
697
+ <?php _e('Bulk Rule', 'woo-discount-rules'); ?>
698
  </td><?php
699
 
700
  } elseif ($column == "tbl_discount") {?>
708
  </td><?php
709
  } else {?>
710
  <td class="wdr_bulk_table_td wdr_bulk_range popup_table_range_column col_index_3" data-colindex="3"
711
+ style="<?php echo (!$configuration->getConfig('table_range_column', 0)) ? 'display:none':'';?>"><?php _e('11 - 15', 'woo-discount-rules'); ?></td><?php
712
  }
713
  }?>
714
  </tr>
717
  if ($column == "tbl_title") {?>
718
  <td class="wdr_bulk_table_td wdr_bulk_title popup_table_title_column col_index_1" data-colindex="1"
719
  style="<?php echo (!$configuration->getConfig('table_title_column', 0)) ? 'display:none' : '';?>">
720
+ <?php _e('Bulk Flat discount', 'woo-discount-rules'); ?>
721
  </td><?php
722
 
723
  } elseif ($column == "tbl_discount") {?>
725
  style="<?php echo (!$configuration->getConfig('table_discount_column', 0)) ? 'display:none' : '';?>">
726
  <span class="wdr_table_discounted_value" style="<?php echo ( !$configuration->getConfig('table_discount_column_value', 0)) ? 'display: none' : '';?>"><?php
727
  echo \Wdr\App\Helpers\Woocommerce::formatPrice(10);
728
+ _e(' flat', 'woo-discount-rules'); ?> </span>
729
  <span class="wdr_table_discounted_price" style="<?php echo ( $configuration->getConfig('table_discount_column_value', 0)) ? 'display: none' : '';?>"><?php
730
  echo \Wdr\App\Helpers\Woocommerce::formatPrice(35); ?></span>
731
  </td><?php
732
  } else {?>
733
  <td class="wdr_bulk_table_td wdr_bulk_range popup_table_range_column col_index_3" data-colindex="3"
734
+ style="<?php echo (!$configuration->getConfig('table_range_column', 0)) ? 'display:none':'';?>"><?php _e('50 - 60', 'woo-discount-rules'); ?></td><?php
735
  }
736
  }?>
737
  </tr>
740
  if ($column == "tbl_title") {?>
741
  <td class="wdr_bulk_table_td wdr_bulk_title popup_table_title_column col_index_1" data-colindex="1"
742
  style="<?php echo (!$configuration->getConfig('table_title_column', 0)) ? 'display:none' : '';?>">
743
+ <?php _e('Bulk percentage discount', 'woo-discount-rules'); ?>
744
  </td><?php
745
 
746
  } elseif ($column == "tbl_discount") {?>
753
  </td><?php
754
  } else {?>
755
  <td class="wdr_bulk_table_td wdr_bulk_range popup_table_range_column col_index_3" data-colindex="3"
756
+ style="<?php echo (!$configuration->getConfig('table_range_column', 0)) ? 'display:none':'';?>"><?php _e('70 - 80', 'woo-discount-rules'); ?></td><?php
757
  }
758
  }?>
759
  </tr>
762
  if ($column == "tbl_title") {?>
763
  <td class="wdr_bulk_table_td wdr_bulk_title popup_table_title_column col_index_1" data-colindex="1"
764
  style="<?php echo (!$configuration->getConfig('table_title_column', 0)) ? 'display:none' : '';?>">
765
+ <?php _e('Bulk % discount', 'woo-discount-rules'); ?>
766
  </td><?php
767
 
768
  } elseif ($column == "tbl_discount") {?>
775
  </td><?php
776
  } else {?>
777
  <td class="wdr_bulk_table_td wdr_bulk_range popup_table_range_column col_index_3" data-colindex="3"
778
+ style="<?php echo (!$configuration->getConfig('table_range_column', 0)) ? 'display:none':'';?>"><?php _e('450 - 500', 'woo-discount-rules'); ?></td><?php
779
  }
780
  }?>
781
  </tr>
784
  if ($column == "tbl_title") {?>
785
  <td class="wdr_bulk_table_td wdr_bulk_title popup_table_title_column col_index_1" data-colindex="1"
786
  style="<?php echo (!$configuration->getConfig('table_title_column', 0)) ? 'display:none' : '';?>">
787
+ <?php _e('Bulk flat', 'woo-discount-rules'); ?>
788
  </td><?php
789
 
790
  } elseif ($column == "tbl_discount") {?>
792
  style="<?php echo (!$configuration->getConfig('table_discount_column', 0)) ? 'display:none' : '';?>">
793
  <span class="wdr_table_discounted_value" style="<?php echo ( !$configuration->getConfig('table_discount_column_value', 0)) ? 'display: none' : '';?>"><?php
794
  echo \Wdr\App\Helpers\Woocommerce::formatPrice(10);
795
+ _e(' flat', 'woo-discount-rules'); ?></span>
796
  <span class="wdr_table_discounted_price" style="<?php echo ( $configuration->getConfig('table_discount_column_value', 0)) ? 'display: none' : '';?>"><?php
797
  echo \Wdr\App\Helpers\Woocommerce::formatPrice(35); ?></span>
798
  </td><?php
799
  } else {?>
800
  <td class="wdr_bulk_table_td wdr_bulk_range popup_table_range_column col_index_3" data-colindex="3"
801
+ style="<?php echo (!$configuration->getConfig('table_range_column', 0)) ? 'display:none':'';?>"><?php _e('600 - 700', 'woo-discount-rules'); ?></td><?php
802
  }
803
  }?>
804
  </tr>
807
  if ($column == "tbl_title") {?>
808
  <td class="wdr_bulk_table_td wdr_bulk_title popup_table_title_column col_index_1" data-colindex="1"
809
  style="<?php echo (!$configuration->getConfig('table_title_column', 0)) ? 'display:none' : '';?>">
810
+ <?php _e('set percentage discount', 'woo-discount-rules'); ?>
811
  </td><?php
812
 
813
  } elseif ($column == "tbl_discount") {?>
820
  </td><?php
821
  } else {?>
822
  <td class="wdr_bulk_table_td wdr_bulk_range popup_table_range_column col_index_3" data-colindex="3"
823
+ style="<?php echo (!$configuration->getConfig('table_range_column', 0)) ? 'display:none':'';?>"><?php _e('5', 'woo-discount-rules'); ?></td><?php
824
  }
825
  }?>
826
  </tr>
829
  if ($column == "tbl_title") {?>
830
  <td class="wdr_bulk_table_td wdr_bulk_title popup_table_title_column col_index_1" data-colindex="1"
831
  style="<?php echo (!$configuration->getConfig('table_title_column', 0)) ? 'display:none' : '';?>">
832
+ <?php _e('Fixed discount for set', 'woo-discount-rules'); ?>
833
  </td><?php
834
 
835
  } elseif ($column == "tbl_discount") {?>
842
  </td><?php
843
  } else {?>
844
  <td class="wdr_bulk_table_td wdr_bulk_range popup_table_range_column col_index_3" data-colindex="3"
845
+ style="<?php echo (!$configuration->getConfig('table_range_column', 0)) ? 'display:none':'';?>"><?php _e('10', 'woo-discount-rules'); ?></td><?php
846
  }
847
  }?>
848
  </tr>
851
  if ($column == "tbl_title") {?>
852
  <td class="wdr_bulk_table_td wdr_bulk_title popup_table_title_column col_index_1" data-colindex="1"
853
  style="<?php echo (!$configuration->getConfig('table_title_column', 0)) ? 'display:none' : '';?>">
854
+ <?php _e('set flat discount', 'woo-discount-rules'); ?>
855
  </td><?php
856
 
857
  } elseif ($column == "tbl_discount") {?>
864
  </td><?php
865
  } else {?>
866
  <td class="wdr_bulk_table_td wdr_bulk_range popup_table_range_column col_index_3" data-colindex="3"
867
+ style="<?php echo (!$configuration->getConfig('table_range_column', 0)) ? 'display:none':'';?>"><?php _e('15', 'woo-discount-rules'); ?></td><?php
868
  }
869
  }?>
870
  </tr>
v2/App/Views/Admin/welcome-text.php CHANGED
@@ -6,13 +6,13 @@
6
  <div class="wdr-alert-top-right" id="notify-msg-holder"></div>
7
 
8
  <h2 class="wdr_tabs_container nav-tab-wrapper">
9
- <?php esc_html_e('Migrate rules from v1 to v2', WDR_TEXT_DOMAIN); ?>
10
  </h2>
11
 
12
  <div class="wdr_settings">
13
  <div class="wdr_migration_container">
14
- <button class="button" type="button" id="awdr_do_v1_v2_migration"><?php esc_html_e('Migrate', WDR_TEXT_DOMAIN); ?></button>
15
- <button class="button" type="button" id="awdr_skip_v1_v2_migration"><?php esc_html_e('Skip', WDR_TEXT_DOMAIN); ?></button>
16
  <div class="wdr_migration_process">
17
  </div>
18
  <div class="wdr_migration_process_status">
6
  <div class="wdr-alert-top-right" id="notify-msg-holder"></div>
7
 
8
  <h2 class="wdr_tabs_container nav-tab-wrapper">
9
+ <?php esc_html_e('Migrate rules from v1 to v2', 'woo-discount-rules'); ?>
10
  </h2>
11
 
12
  <div class="wdr_settings">
13
  <div class="wdr_migration_container">
14
+ <button class="button" type="button" id="awdr_do_v1_v2_migration"><?php esc_html_e('Migrate', 'woo-discount-rules'); ?></button>
15
+ <button class="button" type="button" id="awdr_skip_v1_v2_migration"><?php esc_html_e('Skip', 'woo-discount-rules'); ?></button>
16
  <div class="wdr_migration_process">
17
  </div>
18
  <div class="wdr_migration_process_status">
v2/App/Views/Templates/discount_table.php CHANGED
@@ -71,7 +71,7 @@ if (!empty($ranges) && !empty($woocommerce)) {
71
  echo 'display:none';
72
  }else{
73
  echo((!$base::$config->getConfig('table_title_column', 0)) ? 'display:none' : '');
74
- } ?>"><span><?php _e($tbl_title_text, WDR_TEXT_DOMAIN) ?></span>
75
  </th><?php
76
  } elseif ($column == "tbl_discount") {
77
  ?>
@@ -80,7 +80,7 @@ if (!empty($ranges) && !empty($woocommerce)) {
80
  echo 'display:none';
81
  }else{
82
  echo((!$base::$config->getConfig('table_discount_column', 0)) ? 'display:none' : '');
83
- } ?>"><span><?php _e($tbl_discount_text, WDR_TEXT_DOMAIN) ?></span>
84
  </th><?php
85
  } else {
86
  ?>
@@ -89,7 +89,7 @@ if (!empty($ranges) && !empty($woocommerce)) {
89
  echo 'display:none';
90
  }else{
91
  echo((!$base::$config->getConfig('table_range_column', 0)) ? 'display:none' : '');
92
- }?>"><span><?php _e($tbl_range_text, WDR_TEXT_DOMAIN) ?></span></th><?php
93
  }
94
  }?>
95
  </tr>
@@ -110,12 +110,12 @@ if (!empty($ranges) && !empty($woocommerce)) {
110
  */
111
 
112
  if (isset($range['discount_method']) && $range['discount_method'] == 'cart') {
113
- $cart_discount_text = __(' (in cart)', WDR_TEXT_DOMAIN);
114
  }
115
  $discount_type = isset($range['discount_type']) ? $range['discount_type'] : 'flat';
116
  if ($discount_type == "flat") {
117
  $discount_value = $woocommerce->formatPrice($discount_type_value);
118
- $discount_value .= __(' flat', WDR_TEXT_DOMAIN);
119
  $discount_value .= !empty($cart_discount_text) ? $cart_discount_text : '';
120
  } elseif ($discount_type == "percentage") {
121
  $discount_value = isset($range['discount_value']) ? $range['discount_value'] : 0;
71
  echo 'display:none';
72
  }else{
73
  echo((!$base::$config->getConfig('table_title_column', 0)) ? 'display:none' : '');
74
+ } ?>"><span><?php _e($tbl_title_text, 'woo-discount-rules') ?></span>
75
  </th><?php
76
  } elseif ($column == "tbl_discount") {
77
  ?>
80
  echo 'display:none';
81
  }else{
82
  echo((!$base::$config->getConfig('table_discount_column', 0)) ? 'display:none' : '');
83
+ } ?>"><span><?php _e($tbl_discount_text, 'woo-discount-rules') ?></span>
84
  </th><?php
85
  } else {
86
  ?>
89
  echo 'display:none';
90
  }else{
91
  echo((!$base::$config->getConfig('table_range_column', 0)) ? 'display:none' : '');
92
+ }?>"><span><?php _e($tbl_range_text, 'woo-discount-rules') ?></span></th><?php
93
  }
94
  }?>
95
  </tr>
110
  */
111
 
112
  if (isset($range['discount_method']) && $range['discount_method'] == 'cart') {
113
+ $cart_discount_text = __(' (in cart)', 'woo-discount-rules');
114
  }
115
  $discount_type = isset($range['discount_type']) ? $range['discount_type'] : 'flat';
116
  if ($discount_type == "flat") {
117
  $discount_value = $woocommerce->formatPrice($discount_type_value);
118
+ $discount_value .= __(' flat', 'woo-discount-rules');
119
  $discount_value .= !empty($cart_discount_text) ? $cart_discount_text : '';
120
  } elseif ($discount_type == "percentage") {
121
  $discount_value = isset($range['discount_value']) ? $range['discount_value'] : 0;
v2/Assets/Css/admin_style.css CHANGED
@@ -1430,4 +1430,7 @@ div.wdr {
1430
  .wdr_settings_desc_text.text-warning{
1431
  color: #f0ad4e;
1432
  }
 
 
 
1433
 
1430
  .wdr_settings_desc_text.text-warning{
1431
  color: #f0ad4e;
1432
  }
1433
+ .awdr_promotion_message_display_pages .select2-search__field{
1434
+ width: 225% !important;
1435
+ }
1436
 
v2/Assets/Js/admin_script.js CHANGED
@@ -121,16 +121,24 @@ jQuery(document).ready(function ($) {
121
  $('.subtotal_operator').trigger('change');
122
  });
123
 
 
 
 
 
 
 
 
 
 
 
124
  $(document).on('change', '.subtotal_operator', function () {
125
- // alert($(this).val());
126
- if (wdr_data.enable_subtotal_promo_text == '1') {
127
- let subtotal_operator = $(this).val();
128
- let current_promo_index = $(this).parents('.wdr-conditions-container').attr("data-index");
129
- if (subtotal_operator == 'greater_than_or_equal' || subtotal_operator == 'greater_than') {
130
- $('.promo_show_hide_' + current_promo_index).show();
131
- } else {
132
- $('.promo_show_hide_' + current_promo_index).hide();
133
- }
134
  }
135
  });
136
 
@@ -141,12 +149,16 @@ jQuery(document).ready(function ($) {
141
  parentsRow: ".wdr-conditions-container",
142
  thisObject: this,
143
  });
144
- if (wdr_data.enable_subtotal_promo_text == '1') {
145
  let condition_type = $(this).parent('.wdr-btn-remove').siblings('.wdr-condition-type').find('.wdr-product-condition-type').val();
146
  if (condition_type == 'cart_subtotal') {
147
  let promo_index = $(this).parents('.wdr-conditions-container').attr("data-index");
148
  $('.promo_show_hide_' + promo_index).remove();
149
  }
 
 
 
 
150
  }
151
  }
152
  });
@@ -165,14 +177,18 @@ jQuery(document).ready(function ($) {
165
  ruleAppendTo: $(this).parents('.wdr-conditions-container'),
166
  newIndex: last_index
167
  });
 
 
 
 
 
 
 
168
  if (current_block == 'order_time') {
169
  $('.wdr_time_picker').datetimepicker({
170
  datepicker: false,
171
  format: 'H:i'
172
  });
173
- } else if (current_block != 'cart_subtotal') {
174
- let promo_index = $(this).parents('.wdr-conditions-container').attr("data-index");
175
- $('.promo_show_hide_' + promo_index).remove();
176
  } else if (current_block == 'cart_subtotal') {
177
  if (wdr_data.enable_subtotal_promo_text == '1') {
178
  wdr_buildrule.wdr_clone_field({
@@ -184,6 +200,17 @@ jQuery(document).ready(function ($) {
184
  });
185
  }
186
  $('.subtotal_operator').trigger('change');
 
 
 
 
 
 
 
 
 
 
 
187
  }
188
 
189
  //$('.wdr-condition-date').datetimepicker();
121
  $('.subtotal_operator').trigger('change');
122
  });
123
 
124
+ function wdrShowHidePromotionSection(tis){
125
+ let promotion_operator = tis.val();
126
+ let current_promo_index = tis.parents('.wdr-conditions-container').attr("data-index");
127
+ if (promotion_operator == 'greater_than_or_equal' || promotion_operator == 'greater_than') {
128
+ $('.promo_show_hide_' + current_promo_index).show();
129
+ } else {
130
+ $('.promo_show_hide_' + current_promo_index).hide();
131
+ }
132
+ }
133
+
134
  $(document).on('change', '.subtotal_operator', function () {
135
+ if (wdr_data.enable_subtotal_promo_text == '1' ) {
136
+ wdrShowHidePromotionSection($(this));
137
+ }
138
+ });
139
+ $(document).on('change', '.wdr_quantity_operator', function () {
140
+ if ( wdr_data.enable_cart_quantity_promo_text == '1') {
141
+ wdrShowHidePromotionSection($(this));
 
 
142
  }
143
  });
144
 
149
  parentsRow: ".wdr-conditions-container",
150
  thisObject: this,
151
  });
152
+ if (wdr_data.enable_subtotal_promo_text == '1' || wdr_data.enable_cart_quantity_promo_text == '1') {
153
  let condition_type = $(this).parent('.wdr-btn-remove').siblings('.wdr-condition-type').find('.wdr-product-condition-type').val();
154
  if (condition_type == 'cart_subtotal') {
155
  let promo_index = $(this).parents('.wdr-conditions-container').attr("data-index");
156
  $('.promo_show_hide_' + promo_index).remove();
157
  }
158
+ if (condition_type == 'cart_items_quantity') {
159
+ let promo_index = $(this).parents('.wdr-conditions-container').attr("data-index");
160
+ $('.promo_show_hide_' + promo_index).remove();
161
+ }
162
  }
163
  }
164
  });
177
  ruleAppendTo: $(this).parents('.wdr-conditions-container'),
178
  newIndex: last_index
179
  });
180
+
181
+ var promo_index = $(this).parents('.wdr-conditions-container').attr("data-index");
182
+ //if Class Exists then checking the first object that is returned from JQuery
183
+ if($('.promo_show_hide_' + promo_index)[0] != 'undefined'){
184
+ $('.promo_show_hide_' + promo_index).remove();
185
+ }
186
+
187
  if (current_block == 'order_time') {
188
  $('.wdr_time_picker').datetimepicker({
189
  datepicker: false,
190
  format: 'H:i'
191
  });
 
 
 
192
  } else if (current_block == 'cart_subtotal') {
193
  if (wdr_data.enable_subtotal_promo_text == '1') {
194
  wdr_buildrule.wdr_clone_field({
200
  });
201
  }
202
  $('.subtotal_operator').trigger('change');
203
+ }else if (current_block == 'cart_items_quantity') {
204
+ if (wdr_data.enable_cart_quantity_promo_text == '1') {
205
+ wdr_buildrule.wdr_clone_field({
206
+ addConditionType: 'empty-promo',
207
+ addFilterMethod: '.wdr-cart-quantity-promo-messeage-main',
208
+ addRemoveIcon: '.wdr-icon-remove',
209
+ ruleAppendTo: ".wdr-condition-group-items",
210
+ newIndex: last_index
211
+ });
212
+ }
213
+ $('.wdr_quantity_operator').trigger('change');
214
  }
215
 
216
  //$('.wdr-condition-date').datetimepicker();
woo-discount-rules.php CHANGED
@@ -3,15 +3,15 @@
3
  * Plugin name: Woo Discount Rules
4
  * Plugin URI: http://www.flycart.org
5
  * Description: Simple to complex discount rules for your WooCommerce store. Core package.
6
- * Author: Flycart Technologies LLP
7
  * Author URI: https://www.flycart.org
8
- * Version: 2.3.3
9
  * Slug: woo-discount-rules
10
  * Text Domain: woo-discount-rules
11
  * Domain Path: /i18n/languages/
12
  * Requires at least: 4.6.1
13
  * WC requires at least: 3.0
14
- * WC tested up to: 4.8
15
  */
16
  if (!defined('ABSPATH')) {
17
  exit;
@@ -21,7 +21,7 @@ if (!defined('ABSPATH')) {
21
  * Current version of our app
22
  */
23
  if (!defined('WDR_VERSION')) {
24
- define('WDR_VERSION', '2.3.3');
25
  }
26
 
27
  global $awdr_load_version;
@@ -127,10 +127,25 @@ if ($awdr_load_version == "v2") {
127
  if (!function_exists('awdr_create_required_tables')) {
128
  function awdr_create_required_tables()
129
  {
130
- $database = new \Wdr\App\Models\DBTable();
131
- $database->createDBTables();
132
- $database->updateDBTables();
133
- \Wdr\App\Helpers\Migration::checkForMigration();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
134
  }
135
  }
136
  /**
3
  * Plugin name: Woo Discount Rules
4
  * Plugin URI: http://www.flycart.org
5
  * Description: Simple to complex discount rules for your WooCommerce store. Core package.
6
+ * Author: Flycart
7
  * Author URI: https://www.flycart.org
8
+ * Version: 2.3.4
9
  * Slug: woo-discount-rules
10
  * Text Domain: woo-discount-rules
11
  * Domain Path: /i18n/languages/
12
  * Requires at least: 4.6.1
13
  * WC requires at least: 3.0
14
+ * WC tested up to: 4.9
15
  */
16
  if (!defined('ABSPATH')) {
17
  exit;
21
  * Current version of our app
22
  */
23
  if (!defined('WDR_VERSION')) {
24
+ define('WDR_VERSION', '2.3.4');
25
  }
26
 
27
  global $awdr_load_version;
127
  if (!function_exists('awdr_create_required_tables')) {
128
  function awdr_create_required_tables()
129
  {
130
+ $awdr_current_version = get_option('advanced_woo_discount_rules_current_version', null);
131
+ if($awdr_current_version === null || empty($awdr_current_version) || version_compare(WDR_VERSION, $awdr_current_version, '>')){
132
+ $database = new \Wdr\App\Models\DBTable();
133
+ $database->createDBTables();
134
+ $database->updateDBTables();
135
+ \Wdr\App\Helpers\Migration::checkForMigration();
136
+ awdr_add_sample_rules();
137
+ update_option('advanced_woo_discount_rules_current_version', WDR_VERSION);
138
+ }
139
+ }
140
+ }
141
+
142
+ /**
143
+ * Add sample rules
144
+ */
145
+ if (!function_exists('awdr_add_sample_rules')) {
146
+ function awdr_add_sample_rules()
147
+ {
148
+ \Wdr\App\Helpers\Migration::checkAndCreateSampleRules();
149
  }
150
  }
151
  /**