Discount Rules for WooCommerce - Version 1.7.7

Version Description

  • 28/01/19 =
  • Feature - Option to apply discount based on regular price
  • Feature - Option to customize sale tag(Pro)
  • Fix - Woo discount backend page doesn't loads when having large number of coupons
  • Fix - Avoid path issue in few sites
  • Fix - Translating the shortcode {{total_discount_price}}
  • Improvement - Ignore the coupon used in our plugin while having the option Don't apply rules on having coupon
  • Improvement - Save discounted price(excluding tax) for future reference in order meta
Download this release

Release Info

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

Code changes from version 1.7.6 to 1.7.7

assets/css/style.css CHANGED
@@ -192,4 +192,13 @@ span.wdr_block_span{
192
  }
193
  .small-text{
194
  width: unset !important;
 
 
 
 
 
 
 
 
 
195
  }
192
  }
193
  .small-text{
194
  width: unset !important;
195
+ }
196
+ .customize_sale_tag_html_textarea{
197
+ width: 100%;
198
+ }
199
+ .coupons_selectbox_multi_select{
200
+ width: 500px;
201
+ }
202
+ .coupons_selectbox_multi_select_wdr{
203
+ min-width: 200px;
204
  }
assets/js/app.js CHANGED
@@ -539,7 +539,16 @@ function trigger_woocommerce_tooltip(){
539
  $('.display_you_saved_text_options').show();
540
  }
541
  });
542
- $('#display_you_saved_text').trigger('change');
 
 
 
 
 
 
 
 
 
543
 
544
  $(document).on('keyup', '.rule_descr', function () {
545
  var value = $(this).val();
@@ -612,9 +621,13 @@ function trigger_woocommerce_tooltip(){
612
  }
613
  form += '</div>' +
614
  '<div id="product_div_' + count + '"><select id="cart_product_list_' + count + '" class="product_list selectpicker" title="'+woo_discount_localization.none_selected+'" data-live-search="true" multiple name="discount_rule[' + count + '][product_to_apply][]"></select></div>' +
615
- '<div id="category_div_' + count + '"><select id="cart_category_list_' + count + '" class="category_list selectpicker" title="'+woo_discount_localization.none_selected+'" data-live-search="true" multiple name="discount_rule[' + count + '][category_to_apply][]"></select></div>' +
616
- '<div id="coupon_div_' + count + '"><select id="cart_coupon_list_' + count + '" class="coupon_list selectpicker" title="'+woo_discount_localization.none_selected+'" data-live-search="true" multiple name="discount_rule[' + count + '][coupon_to_apply][]"></select></div>' +
617
- '<div id="roles_div_' + count + '"><select id="cart_roles_list_' + count + '" class="roles_list selectpicker" title="'+woo_discount_localization.none_selected+'" data-live-search="true" multiple name="discount_rule[' + count + '][user_roles_to_apply][]"></select></div>' +
 
 
 
 
618
  '<div id="countries_div_' + count + '"><select id="cart_countries_list_' + count + '" class="country_list selectpicker" title="'+woo_discount_localization.none_selected+'" data-live-search="true" multiple name="discount_rule[' + count + '][countries_to_apply][]"></select></div>' +
619
  '<div id="purchase_history_div_' + count + '">' +
620
  '<div class="form-group wdr_hide" id="purchase_history_products_list_'+ count +'">'+
@@ -666,6 +679,7 @@ function trigger_woocommerce_tooltip(){
666
  }
667
 
668
  $('.wc-customer-search').trigger( 'wc-enhanced-select-init' );
 
669
 
670
  // Append the List of Values.
671
  $('#cart_user_list_' + count).append(user_list);
@@ -1110,6 +1124,68 @@ function trigger_woocommerce_tooltip(){
1110
  }
1111
  });
1112
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1113
  });
1114
 
1115
  //------------------------------------------------------------------------------------------------------------------
539
  $('.display_you_saved_text_options').show();
540
  }
541
  });
542
+ $('#display_you_saved_text').trigger('change');//f (!$("#checkSurfaceEnvironment-1").is(":checked")) {
543
+
544
+ $('#customize_sale_tag').on('change', function () {
545
+ if ($("#customize_sale_tag").is(":checked")) {
546
+ $('.customize_sale_tag_option').show();
547
+ } else {
548
+ $('.customize_sale_tag_option').hide();
549
+ }
550
+ });
551
+ $('#customize_sale_tag').trigger('change');
552
 
553
  $(document).on('keyup', '.rule_descr', function () {
554
  var value = $(this).val();
621
  }
622
  form += '</div>' +
623
  '<div id="product_div_' + count + '"><select id="cart_product_list_' + count + '" class="product_list selectpicker" title="'+woo_discount_localization.none_selected+'" data-live-search="true" multiple name="discount_rule[' + count + '][product_to_apply][]"></select></div>' +
624
+ '<div id="category_div_' + count + '"><select id="cart_category_list_' + count + '" class="category_list selectpicker" title="'+woo_discount_localization.none_selected+'" data-live-search="true" multiple name="discount_rule[' + count + '][category_to_apply][]"></select></div>';
625
+ if($('#has_large_number_of_coupon').val() == 1){
626
+ form += '<div id="coupon_div_' + count + '"><select id="cart_coupon_list_' + count + '" class="coupons_selectbox_multi_select_wdr" multiple name="discount_rule[' + count + '][coupon_to_apply][]"></select></div>';
627
+ } else {
628
+ form += '<div id="coupon_div_' + count + '"><select id="cart_coupon_list_' + count + '" class="coupon_list selectpicker" title="'+woo_discount_localization.none_selected+'" data-live-search="true" multiple name="discount_rule[' + count + '][coupon_to_apply][]"></select></div>';
629
+ }
630
+ form += '<div id="roles_div_' + count + '"><select id="cart_roles_list_' + count + '" class="roles_list selectpicker" title="'+woo_discount_localization.none_selected+'" data-live-search="true" multiple name="discount_rule[' + count + '][user_roles_to_apply][]"></select></div>' +
631
  '<div id="countries_div_' + count + '"><select id="cart_countries_list_' + count + '" class="country_list selectpicker" title="'+woo_discount_localization.none_selected+'" data-live-search="true" multiple name="discount_rule[' + count + '][countries_to_apply][]"></select></div>' +
632
  '<div id="purchase_history_div_' + count + '">' +
633
  '<div class="form-group wdr_hide" id="purchase_history_products_list_'+ count +'">'+
679
  }
680
 
681
  $('.wc-customer-search').trigger( 'wc-enhanced-select-init' );
682
+ $('.coupons_selectbox_multi_select_wdr').trigger('trigger_ajax_select_wdr');
683
 
684
  // Append the List of Values.
685
  $('#cart_user_list_' + count).append(user_list);
1124
  }
1125
  });
1126
 
1127
+ $('.coupons_selectbox_multi_select_wdr').on('trigger_ajax_select_wdr', function (event) {
1128
+ $('.coupons_selectbox_multi_select_wdr').select2({
1129
+ ajax: {
1130
+ url: ajax_url,
1131
+ type: 'GET',
1132
+ // url: "https://api.github.com/search/repositories",
1133
+ dataType: 'json',
1134
+ delay: 250,
1135
+ data: function (params) {
1136
+ return {
1137
+ q: params.term, // search term
1138
+ page: params.page,
1139
+ action: 'loadCoupons'
1140
+ };
1141
+ },
1142
+ processResults: function (data, params) {
1143
+ // parse the results into the format expected by Select2
1144
+ // since we are using custom formatting functions we do not need to
1145
+ // alter the remote JSON data, except to indicate that infinite
1146
+ // scrolling can be used
1147
+ params.page = params.page || 1;
1148
+ if(data.length >= 1){
1149
+ $.each(data, function( index, value ) {
1150
+ value.id = value.post_name;
1151
+ });
1152
+ }
1153
+ return {
1154
+ results: data,
1155
+ pagination: {
1156
+ more: (params.page * 30) < data.length
1157
+ }
1158
+ };
1159
+ },
1160
+ cache: true
1161
+ },
1162
+ placeholder: woo_discount_localization.coupon_select_box_placeholder,
1163
+ escapeMarkup: function (markup) { return markup; }, // let our custom formatter work
1164
+ minimumInputLength: 3,
1165
+ templateResult: formatCouponSelectBoxWDR,
1166
+ templateSelection: formatCouponSelectionWDR
1167
+ });
1168
+ });
1169
+ $('.coupons_selectbox_multi_select_wdr').trigger('trigger_ajax_select_wdr');
1170
+
1171
+
1172
+ function formatCouponSelectBoxWDR (repo) {
1173
+ if (repo.loading) {
1174
+ return repo.text;
1175
+ }
1176
+ var markup = "<div class='select2-result-repository clearfix'>" +
1177
+ "<div class='select2-result-repository__meta'>" +
1178
+ "<div class='select2-result-repository__title'>" + repo.post_title + "</div>";
1179
+
1180
+ markup += "</div></div>";
1181
+
1182
+ return markup;
1183
+ }
1184
+
1185
+ function formatCouponSelectionWDR (repo) {
1186
+ return repo.post_title || repo.post_name || repo.text;
1187
+ }
1188
+
1189
  });
1190
 
1191
  //------------------------------------------------------------------------------------------------------------------
helper/general-helper.php CHANGED
@@ -36,7 +36,8 @@ if ( ! class_exists( 'FlycartWooDiscountRulesGeneralHelper' ) ) {
36
  $category = $this->getCategoryList();
37
  $coupons = array();
38
  if(in_array($tab, array('pricing-rules-new', 'pricing-rules-view', 'cart-rules-new', 'cart-rules-view'))){
39
- if($pro) $coupons = $this->getCouponsList();
 
40
  }
41
 
42
  //$users = $this->getUserList();
@@ -422,6 +423,7 @@ if ( ! class_exists( 'FlycartWooDiscountRulesGeneralHelper' ) ) {
422
  if($do_not_run_while_have_third_party_coupon){
423
  $hasCoupon = self::hasCouponInCart();
424
  if($hasCoupon){
 
425
  $status = false;
426
  }
427
  }
@@ -440,17 +442,54 @@ if ( ! class_exists( 'FlycartWooDiscountRulesGeneralHelper' ) ) {
440
  global $woocommerce;
441
  if (!empty($woocommerce->cart->applied_coupons)) {
442
  $appliedCoupons = $woocommerce->cart->applied_coupons;
443
- if(in_array($coupon_code, $appliedCoupons)){
444
- if(count($appliedCoupons) > 1){
445
- $result = true;
 
 
 
 
 
446
  }
447
- } else {
448
- $result = true;
449
  }
450
  }
451
 
452
  return $result;
453
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
454
 
455
  /**
456
  * Get Current date and time based on Wordpress time zone
@@ -756,5 +795,27 @@ if ( ! class_exists( 'FlycartWooDiscountRulesGeneralHelper' ) ) {
756
 
757
  return $wpml_language;
758
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
759
  }
760
  }
36
  $category = $this->getCategoryList();
37
  $coupons = array();
38
  if(in_array($tab, array('pricing-rules-new', 'pricing-rules-view', 'cart-rules-new', 'cart-rules-view'))){
39
+ $has_large_no_of_coupon = FlycartWooDiscountBase::hasLargeNumberOfCoupon();
40
+ if($pro && (!$has_large_no_of_coupon)) $coupons = $this->getCouponsList();
41
  }
42
 
43
  //$users = $this->getUserList();
423
  if($do_not_run_while_have_third_party_coupon){
424
  $hasCoupon = self::hasCouponInCart();
425
  if($hasCoupon){
426
+ self::resetTheCartValues();
427
  $status = false;
428
  }
429
  }
442
  global $woocommerce;
443
  if (!empty($woocommerce->cart->applied_coupons)) {
444
  $appliedCoupons = $woocommerce->cart->applied_coupons;
445
+ if(is_array($appliedCoupons) && count($appliedCoupons) > 0){
446
+ $used_coupons = self::getUsedCouponsInRules();
447
+ $used_coupons[] = $coupon_code;
448
+ foreach ($appliedCoupons as $appliedCoupon){
449
+ if(!in_array($appliedCoupon, $used_coupons)){
450
+ $result = true;
451
+ break;
452
+ }
453
  }
 
 
454
  }
455
  }
456
 
457
  return $result;
458
  }
459
+
460
+ protected static function resetTheCartValues(){
461
+ global $woocommerce;
462
+ // Make sure item exists in cart
463
+ if (!isset($woocommerce->cart)) return;
464
+ if (!isset($woocommerce->cart->cart_contents)) return;
465
+ if(!empty($woocommerce->cart->cart_contents) && count($woocommerce->cart->cart_contents) > 0){
466
+ foreach ($woocommerce->cart->cart_contents as $key => $cart){
467
+ if(isset($woocommerce->cart->cart_contents[$key]['woo_discount'])){
468
+ unset($woocommerce->cart->cart_contents[$key]['woo_discount']);
469
+ }
470
+ }
471
+ }
472
+ }
473
+
474
+ /**
475
+ * get Used Coupons
476
+ * */
477
+ protected static function getUsedCouponsInRules(){
478
+ $coupons = array();
479
+ $post_args = array('post_type' => array('woo_discount', 'woo_discount_cart'), 'numberposts' => '-1', 'post_status' => 'publish');
480
+ $post_args['meta_key'] = 'used_coupon';
481
+ $posts = get_posts($post_args);
482
+ if(!empty($posts) && count($posts) > 0){
483
+ foreach ($posts as $post){
484
+ $used_coupons = get_post_meta($post->ID, 'used_coupon');
485
+ if(!empty($used_coupons)){
486
+ $coupons = array_merge($coupons, $used_coupons);
487
+ }
488
+ }
489
+ }
490
+
491
+ return $coupons;
492
+ }
493
 
494
  /**
495
  * Get Current date and time based on Wordpress time zone
795
 
796
  return $wpml_language;
797
  }
798
+
799
+ public static function applyDiscountFromRegularPrice(){
800
+ $config = FlycartWooDiscountBase::get_instance();
801
+ $apply_discount_from = $config->getConfigData('do_discount_from_regular_price', 'sale');
802
+ if($apply_discount_from == 'regular'){
803
+ return true;
804
+ } else {
805
+ return false;
806
+ }
807
+ }
808
+
809
+ /**
810
+ * Reset used coupon in post meta
811
+ * */
812
+ public static function resetUsedCoupons($post_id, $coupons_used){
813
+ delete_post_meta($post_id, 'used_coupon');
814
+ if(is_array($coupons_used) && !empty($coupons_used)){
815
+ foreach ($coupons_used as $coupon){
816
+ add_post_meta($post_id, 'used_coupon', $coupon);
817
+ }
818
+ }
819
+ }
820
  }
821
  }
helper/woo-function.php CHANGED
@@ -170,7 +170,14 @@ if(!class_exists('FlycartWoocommerceProduct')){
170
  * @param array $product
171
  * @return int/float
172
  */
173
- public static function get_price($product){
 
 
 
 
 
 
 
174
  $price = FlycartWoocommerceVersion::wcVersion('3.0') ? $product->get_price() : $product->price;
175
  $price = floatval($price);
176
 
170
  * @param array $product
171
  * @return int/float
172
  */
173
+ public static function get_price($product, $cart_rule = false){
174
+ if($cart_rule === false){
175
+ $do_discount_from_regular_price = FlycartWooDiscountRulesGeneralHelper::applyDiscountFromRegularPrice();
176
+ if($do_discount_from_regular_price){
177
+ return self::get_regular_price($product);
178
+ }
179
+ }
180
+
181
  $price = FlycartWoocommerceVersion::wcVersion('3.0') ? $product->get_price() : $product->price;
182
  $price = floatval($price);
183
 
i18n/languages/woo-discount-rules.pot CHANGED
@@ -11,35 +11,35 @@ msgstr ""
11
  "Language: en\n"
12
  "X-Generator: Poedit 1.8.7.1\n"
13
 
14
- #: helper/general-helper.php:45
15
  msgid "Guest"
16
  msgstr ""
17
 
18
- #: helper/general-helper.php:505
19
  msgid "Start date and time is set in the future date"
20
  msgstr ""
21
 
22
- #: helper/general-helper.php:508
23
  msgid "Validity expired"
24
  msgstr ""
25
 
26
- #: helper/general-helper.php:525
27
  msgid "Will run in future"
28
  msgstr ""
29
 
30
- #: helper/general-helper.php:528
31
  msgid "Not running - validity expired"
32
  msgstr ""
33
 
34
- #: helper/general-helper.php:545
35
  msgid "Running"
36
  msgstr ""
37
 
38
- #: helper/general-helper.php:550
39
  msgid "Your server current date and time: "
40
  msgstr ""
41
 
42
- #: helper/general-helper.php:666
43
  msgid "Read Docs"
44
  msgstr ""
45
 
@@ -103,11 +103,11 @@ msgstr ""
103
  msgid "License key seems to be Invalid. Please enter a valid license key"
104
  msgstr ""
105
 
106
- #: helper/woo-function.php:366 helper/woo-function.php:376
107
  msgid "Search for a product&hellip;"
108
  msgstr ""
109
 
110
- #: helper/woo-function.php:409 helper/woo-function.php:421
111
  msgid "Search for a user&hellip;"
112
  msgstr ""
113
 
@@ -119,13 +119,13 @@ msgstr ""
119
  msgid "Custom Shipping Method for Woocommerce Discount Rules"
120
  msgstr ""
121
 
122
- #: includes/advanced/free_shipping_method.php:68 view/settings.php:504
123
  msgid "Free Shipping"
124
  msgstr ""
125
 
126
- #: includes/advanced/free_shipping_method.php:73 includes/discount-base.php:897
127
- #: view/cart-rules.php:127 view/pricing-rules.php:157 view/settings.php:585
128
- #: view/settings.php:620
129
  msgid "Enable"
130
  msgstr ""
131
 
@@ -141,475 +141,479 @@ msgstr ""
141
  msgid "Title to be display on site"
142
  msgstr ""
143
 
144
- #: includes/discount-base.php:178 view/cart-rules.php:141
145
- #: view/pricing-rules.php:171
146
  msgid "Active"
147
  msgstr ""
148
 
149
- #: includes/discount-base.php:180 view/cart-rules.php:143
150
- #: view/pricing-rules.php:173 view/settings.php:227 view/settings.php:374
151
- #: view/settings.php:473 view/settings.php:480 view/settings.php:582
152
- #: view/settings.php:617
153
  msgid "Disabled"
154
  msgstr ""
155
 
156
- #: includes/discount-base.php:386
157
  msgid "Cache cleared successfully"
158
  msgstr ""
159
 
160
- #: includes/discount-base.php:388
161
  msgid "Failed to clear cache"
162
  msgstr ""
163
 
164
- #: includes/discount-base.php:494 includes/discount-base.php:529
165
  msgid "Failed to do action"
166
  msgstr ""
167
 
168
- #: includes/discount-base.php:533
169
  msgid "Disabled successfully"
170
  msgstr ""
171
 
172
- #: includes/discount-base.php:536
173
  msgid "Deleted successfully"
174
  msgstr ""
175
 
176
- #: includes/discount-base.php:539
177
  msgid "Enabled successfully"
178
  msgstr ""
179
 
180
- #: includes/discount-base.php:559 includes/discount-base.php:560
181
- #: includes/discount-base.php:577
182
  msgid "copy"
183
  msgstr ""
184
 
185
- #: includes/discount-base.php:585
186
  msgid "Duplicate rule created successfully"
187
  msgstr ""
188
 
189
- #: includes/discount-base.php:589
190
  msgid "Failed to create duplicate rule"
191
  msgstr ""
192
 
193
- #: includes/discount-base.php:852
194
  msgid "Please fill this field"
195
  msgstr ""
196
 
197
- #: includes/discount-base.php:853
198
  msgid "Please Enter the Rule Name to Create / Save."
199
  msgstr ""
200
 
201
- #: includes/discount-base.php:854
202
  msgid "Saving..."
203
  msgstr ""
204
 
205
- #: includes/discount-base.php:855 view/view-cart-rules.php:54
206
- #: view/view-pricing-rules.php:38
207
  msgid "Save Rule"
208
  msgstr ""
209
 
210
- #: includes/discount-base.php:856
211
  msgid "Please enter a Key"
212
  msgstr ""
213
 
214
- #: includes/discount-base.php:857 view/view-pricing-rules.php:650
215
  msgid "Min Quantity"
216
  msgstr ""
217
 
218
- #: includes/discount-base.php:858 view/view-pricing-rules.php:657
219
  msgid "Max Quantity"
220
  msgstr ""
221
 
222
- #: includes/discount-base.php:859 view/view-cart-rules.php:91
223
- #: view/view-pricing-rules.php:76 view/view-pricing-rules.php:655
224
- #: view/view-pricing-rules.php:721 view/view-pricing-rules.php:738
225
- #: view/view-pricing-rules.php:745
226
  msgid "ex. 1"
227
  msgstr ""
228
 
229
- #: includes/discount-base.php:860 view/view-pricing-rules.php:783
230
  msgid "ex. 10"
231
  msgstr ""
232
 
233
- #: includes/discount-base.php:861 view/view-pricing-rules.php:662
234
- #: view/view-pricing-rules.php:698
235
  msgid "ex. 50"
236
  msgstr ""
237
 
238
- #: includes/discount-base.php:862
239
  msgid "Search for a user"
240
  msgstr ""
241
 
242
- #: includes/discount-base.php:863 view/view-pricing-rules.php:663
243
  msgid "Adjustment Type"
244
  msgstr ""
245
 
246
- #: includes/discount-base.php:864 view/view-pricing-rules.php:772
247
  msgid "Discount percentage"
248
  msgstr ""
249
 
250
- #: includes/discount-base.php:865 view/view-cart-rules.php:614
251
- #: view/view-pricing-rules.php:669
252
  msgid "Percentage Discount"
253
  msgstr ""
254
 
255
- #: includes/discount-base.php:866 view/view-cart-rules.php:620
256
- #: view/view-cart-rules.php:622 view/view-pricing-rules.php:677
257
- #: view/view-pricing-rules.php:679
258
  msgid "Price Discount"
259
  msgstr ""
260
 
261
- #: includes/discount-base.php:867 view/view-pricing-rules.php:687
262
- #: view/view-pricing-rules.php:689
263
  msgid "BOGO Product Discount"
264
  msgstr ""
265
 
266
- #: includes/discount-base.php:868
267
  msgid "Product Discount - Not support for subtotal based rule"
268
  msgstr ""
269
 
270
- #: includes/discount-base.php:869 view/view-cart-rules.php:398
271
- #: view/view-pricing-rules.php:693 view/view-pricing-rules.php:812
272
  msgid "Value"
273
  msgstr ""
274
 
275
- #: includes/discount-base.php:870 view/view-pricing-rules.php:704
276
  msgid "receive discount for"
277
  msgstr ""
278
 
279
- #: includes/discount-base.php:871 view/view-pricing-rules.php:706
280
  msgid "Auto add all selected products"
281
  msgstr ""
282
 
283
- #: includes/discount-base.php:872 view/view-pricing-rules.php:707
284
  msgid "Same product"
285
  msgstr ""
286
 
287
- #: includes/discount-base.php:873 view/view-pricing-rules.php:708
288
  msgid "Any one cheapest from selected"
289
  msgstr ""
290
 
291
- #: includes/discount-base.php:874 view/view-pricing-rules.php:709
292
  msgid "Any one cheapest from all products"
293
  msgstr ""
294
 
295
- #: includes/discount-base.php:875 view/view-pricing-rules.php:710
296
  msgid "Cheapest in cart - selected category(ies)"
297
  msgstr ""
298
 
299
- #: includes/discount-base.php:876 view/view-pricing-rules.php:711
300
  msgid "Cheapest in cart - selected item(s)"
301
  msgstr ""
302
 
303
- #: includes/discount-base.php:877 view/view-pricing-rules.php:712
304
  msgid "Cheapest among all items in cart"
305
  msgstr ""
306
 
307
- #: includes/discount-base.php:878 view/view-pricing-rules.php:716
308
  msgid "Free quantity"
309
  msgstr ""
310
 
311
- #: includes/discount-base.php:879 view/view-pricing-rules.php:716
312
  msgid "Number of quantity(ies) in each selected product(s)"
313
  msgstr ""
314
 
315
- #: includes/discount-base.php:880 view/view-pricing-rules.php:730
316
  msgid "Fixed item count (not recommended)"
317
  msgstr ""
318
 
319
- #: includes/discount-base.php:881 view/view-pricing-rules.php:729
320
  msgid "Dynamic item count"
321
  msgstr ""
322
 
323
- #: includes/discount-base.php:882 view/view-pricing-rules.php:732
324
  msgid ""
325
  "Fixed item count - You need to provide item count manually. Dynamic item "
326
  "count - System will choose dynamically based on cart"
327
  msgstr ""
328
 
329
- #: includes/discount-base.php:883 view/view-pricing-rules.php:733
330
  msgid "Item count"
331
  msgstr ""
332
 
333
- #: includes/discount-base.php:884 view/view-pricing-rules.php:733
334
  msgid "Discount for number of item(s) in cart"
335
  msgstr ""
336
 
337
- #: includes/discount-base.php:885 view/view-pricing-rules.php:740
338
  msgid "Discount for number of quantity(ies) in each item"
339
  msgstr ""
340
 
341
- #: includes/discount-base.php:886 view/view-pricing-rules.php:740
342
  msgid "Item quantity"
343
  msgstr ""
344
 
345
- #: includes/discount-base.php:887
346
  msgid "Search for a products"
347
  msgstr ""
348
 
349
- #: includes/discount-base.php:888
350
  msgid "and"
351
  msgstr ""
352
 
353
- #: includes/discount-base.php:889 view/view-pricing-rules.php:774
354
  msgid "100% percent"
355
  msgstr ""
356
 
357
- #: includes/discount-base.php:890 view/view-pricing-rules.php:775
358
  msgid "Limited percent"
359
  msgstr ""
360
 
361
- #: includes/discount-base.php:891 view/view-pricing-rules.php:783
362
  msgid "Percentage"
363
  msgstr ""
364
 
365
- #: includes/discount-base.php:892
366
  msgid "as discount"
367
  msgstr ""
368
 
369
- #: includes/discount-base.php:893 view/view-cart-rules.php:577
370
- #: view/view-pricing-rules.php:789
371
  msgid "Remove"
372
  msgstr ""
373
 
374
- #: includes/discount-base.php:894 view/cart-rules.php:159
375
- #: view/pricing-rules.php:189 view/view-pricing-rules.php:792
376
  msgid "Duplicate"
377
  msgstr ""
378
 
379
- #: includes/discount-base.php:895
380
  msgid "none"
381
  msgstr ""
382
 
383
- #: includes/discount-base.php:896
384
  msgid "Are you sure to remove this ?"
385
  msgstr ""
386
 
387
- #: includes/discount-base.php:898 view/cart-rules.php:124
388
- #: view/pricing-rules.php:154
389
  msgid "Disable"
390
  msgstr ""
391
 
392
- #: includes/discount-base.php:899
393
  msgid "Are you sure to remove ?"
394
  msgstr ""
395
 
396
- #: includes/discount-base.php:900 view/view-cart-rules.php:171
397
  msgid "Type"
398
  msgstr ""
399
 
400
- #: includes/discount-base.php:901 view/view-cart-rules.php:175
401
  msgid "Cart Subtotal"
402
  msgstr ""
403
 
404
- #: includes/discount-base.php:902 view/view-cart-rules.php:178
405
  msgid "Subtotal at least"
406
  msgstr ""
407
 
408
- #: includes/discount-base.php:903 view/view-cart-rules.php:182
409
  msgid "Subtotal less than"
410
  msgstr ""
411
 
412
- #: includes/discount-base.php:904 view/view-cart-rules.php:185
413
  msgid "Cart Item Count"
414
  msgstr ""
415
 
416
- #: includes/discount-base.php:905 view/view-cart-rules.php:188
417
  msgid "Number of line items in the cart (not quantity) at least"
418
  msgstr ""
419
 
420
- #: includes/discount-base.php:906 view/view-cart-rules.php:192
421
  msgid "Number of line items in the cart (not quantity) less than"
422
  msgstr ""
423
 
424
- #: includes/discount-base.php:907 view/view-cart-rules.php:195
425
  msgid "Quantity Sum"
426
  msgstr ""
427
 
428
- #: includes/discount-base.php:908 view/view-cart-rules.php:201
429
  #: view/view-cart-rules.php:204
430
  msgid "Total number of quantities in the cart at least"
431
  msgstr ""
432
 
433
- #: includes/discount-base.php:909 view/view-cart-rules.php:213
434
  #: view/view-cart-rules.php:216
435
  msgid "Total number of quantities in the cart less than"
436
  msgstr ""
437
 
438
- #: includes/discount-base.php:910 view/view-cart-rules.php:225
439
  msgid "Categories in cart"
440
  msgstr ""
441
 
442
- #: includes/discount-base.php:911 view/view-cart-rules.php:231
443
  msgid "Including sub-categories in cart"
444
  msgstr ""
445
 
446
- #: includes/discount-base.php:912 view/view-cart-rules.php:240
447
  msgid "Customer Details (must be logged in)"
448
  msgstr ""
449
 
450
- #: includes/discount-base.php:913 view/view-cart-rules.php:246
451
  #: view/view-cart-rules.php:248
452
  msgid "User in list"
453
  msgstr ""
454
 
455
- #: includes/discount-base.php:914 view/view-cart-rules.php:256
456
  #: view/view-cart-rules.php:258
457
  msgid "User role in list"
458
  msgstr ""
459
 
460
- #: includes/discount-base.php:915 view/view-cart-rules.php:266
461
  #: view/view-cart-rules.php:268
462
  msgid "Shipping country in list"
463
  msgstr ""
464
 
465
- #: includes/discount-base.php:916 view/view-cart-rules.php:272
466
  msgid "Customer Email"
467
  msgstr ""
468
 
469
- #: includes/discount-base.php:917
470
  msgid "Email with TLD (Ege: edu)"
471
  msgstr ""
472
 
473
- #: includes/discount-base.php:918 view/view-cart-rules.php:288
474
  #: view/view-cart-rules.php:290
475
  msgid "Email with Domain (Eg: gmail.com)"
476
  msgstr ""
477
 
478
- #: includes/discount-base.php:919 view/view-cart-rules.php:294
479
  msgid "Customer Billing Details"
480
  msgstr ""
481
 
482
- #: includes/discount-base.php:920 view/view-cart-rules.php:300
483
  #: view/view-cart-rules.php:302
484
  msgid "Billing city"
485
  msgstr ""
486
 
487
- #: includes/discount-base.php:921 view/view-cart-rules.php:306
488
  msgid "Customer Shipping Details"
489
  msgstr ""
490
 
491
- #: includes/discount-base.php:922 view/view-cart-rules.php:312
492
  #: view/view-cart-rules.php:314
493
  msgid "Shipping state"
494
  msgstr ""
495
 
496
- #: includes/discount-base.php:923 view/view-cart-rules.php:322
497
  #: view/view-cart-rules.php:324
498
  msgid "Shipping city"
499
  msgstr ""
500
 
501
- #: includes/discount-base.php:924 view/view-cart-rules.php:332
502
  #: view/view-cart-rules.php:334
503
  msgid "Shipping zip code"
504
  msgstr ""
505
 
506
- #: includes/discount-base.php:925 view/view-cart-rules.php:338
507
- #: view/view-pricing-rules.php:479
508
  msgid "Purchase History"
509
  msgstr ""
510
 
511
- #: includes/discount-base.php:926 view/view-cart-rules.php:344
512
- #: view/view-cart-rules.php:346 view/view-pricing-rules.php:487
513
  msgid "Purchased amount"
514
  msgstr ""
515
 
516
- #: includes/discount-base.php:927 view/view-cart-rules.php:354
517
- #: view/view-cart-rules.php:356
518
- msgid "Number of order purchased"
519
  msgstr ""
520
 
521
- #: includes/discount-base.php:928 view/view-cart-rules.php:364
522
- #: view/view-cart-rules.php:366
523
- msgid "Number of order purchased in products"
524
  msgstr ""
525
 
526
- #: includes/discount-base.php:929 view/view-cart-rules.php:370
527
  msgid "Coupon applied"
528
  msgstr ""
529
 
530
- #: includes/discount-base.php:930 view/view-cart-rules.php:376
531
  #: view/view-cart-rules.php:378
532
  msgid "Atleast any one"
533
  msgstr ""
534
 
535
- #: includes/discount-base.php:931 view/view-cart-rules.php:386
536
  #: view/view-cart-rules.php:388
537
  msgid "All selected"
538
  msgstr ""
539
 
540
- #: includes/discount-base.php:932 view/view-cart-rules.php:534
541
- #: view/view-pricing-rules.php:524
542
  msgid "Greater than or equal to"
543
  msgstr ""
544
 
545
- #: includes/discount-base.php:933 view/view-cart-rules.php:535
546
- #: view/view-pricing-rules.php:525
547
  msgid "Less than or equal to"
548
  msgstr ""
549
 
550
- #: includes/discount-base.php:934 view/view-cart-rules.php:537
551
- #: view/view-pricing-rules.php:528
552
- msgid "In Order status"
553
  msgstr ""
554
 
555
- #: includes/discount-base.php:935 view/cart-rules.php:108
556
- #: view/cart-rules.php:193 view/pricing-rules.php:138
557
- #: view/pricing-rules.php:223 view/view-cart-rules.php:576
558
  msgid "Action"
559
  msgstr ""
560
 
561
- #: includes/discount-base.php:936 view/settings.php:21
562
  msgid "Save"
563
  msgstr ""
564
 
565
- #: includes/discount-base.php:937
566
  msgid "Saved Successfully!"
567
  msgstr ""
568
 
569
- #: includes/discount-base.php:938 view/view-cart-rules.php:427
570
- #: view/view-cart-rules.php:453 view/view-cart-rules.php:472
571
- #: view/view-cart-rules.php:493 view/view-cart-rules.php:542
572
- #: view/view-pricing-rules.php:235 view/view-pricing-rules.php:251
573
- #: view/view-pricing-rules.php:536 view/view-pricing-rules.php:605
574
- #: view/view-pricing-rules.php:760
575
  msgid "None selected"
576
  msgstr ""
577
 
578
- #: includes/discount-base.php:939 view/view-cart-rules.php:237
579
  msgid "In each category"
580
  msgstr ""
581
 
582
- #: includes/discount-base.php:940 view/settings.php:189 view/settings.php:208
583
- #: view/settings.php:266 view/settings.php:284 view/settings.php:302
584
- #: view/settings.php:320
585
  msgid "Show"
586
  msgstr ""
587
 
588
- #: includes/discount-base.php:941 view/template/sidebar.php:12
589
  msgid "Hide"
590
  msgstr ""
591
 
592
- #: includes/discount-base.php:942
593
  msgid "Please select at least one rule"
594
  msgstr ""
595
 
596
- #: includes/discount-base.php:943
597
  msgid "Please select an action to apply"
598
  msgstr ""
599
 
600
- #: includes/discount-base.php:944
601
  msgid "Are you sure to remove the selected rules"
602
  msgstr ""
603
 
604
- #: includes/discount-base.php:945 view/view-pricing-rules.php:749
605
  msgid "Choose product(s)"
606
  msgstr ""
607
 
608
- #: includes/discount-base.php:946 view/view-pricing-rules.php:759
609
  msgid "Choose category(ies)"
610
  msgstr ""
611
 
612
- #: includes/discount-base.php:947 view/view-pricing-rules.php:714
 
 
 
 
613
  msgid ""
614
  "Auto add all selected products - Automatically added to the cart <br> Same "
615
  "product - get discount in same product <br> Any one cheapest from selected - "
@@ -620,165 +624,170 @@ msgid ""
620
  "no.of quantities"
621
  msgstr ""
622
 
623
- #: includes/pricing-rules.php:2559 view/view-pricing-rules.php:561
624
  msgid "Buy"
625
  msgstr ""
626
 
627
- #: includes/pricing-rules.php:2563
628
  msgid " less than or equal to "
629
  msgstr ""
630
 
631
- #: includes/pricing-rules.php:2563 includes/pricing-rules.php:2569
632
  msgid " Quantity"
633
  msgstr ""
634
 
635
- #: includes/pricing-rules.php:2566
636
  msgid " Quantity "
637
  msgstr ""
638
 
639
- #: includes/pricing-rules.php:2573
640
  msgid " or more Quantity"
641
  msgstr ""
642
 
643
- #: includes/pricing-rules.php:2582
644
  msgid " any "
645
  msgstr ""
646
 
647
- #: includes/pricing-rules.php:2582
648
  msgid " products from "
649
  msgstr ""
650
 
651
- #: includes/pricing-rules.php:2589
652
  msgid " in each products"
653
  msgstr ""
654
 
655
- #: includes/pricing-rules.php:2601
656
  msgid " and get discount in "
657
  msgstr ""
658
 
659
- #: includes/pricing-rules.php:2604
660
  msgid " first "
661
  msgstr ""
662
 
663
- #: includes/pricing-rules.php:2606 includes/pricing-rules.php:2610
664
  msgid " quantity of product(s) - "
665
  msgstr ""
666
 
667
- #: includes/pricing-rules.php:2608
668
  msgid " after first "
669
  msgstr ""
670
 
671
- #: includes/pricing-rules.php:2626
672
  msgid "Category(ies) "
673
  msgstr ""
674
 
675
- #: includes/pricing-rules.php:2692
676
  msgid "Get "
677
  msgstr ""
678
 
679
- #: includes/pricing-rules.php:2694
680
  #, php-format
681
  msgid "% discount in "
682
  msgstr ""
683
 
684
- #: includes/pricing-rules.php:2697
685
  msgid "same product"
686
  msgstr ""
687
 
688
- #: includes/pricing-rules.php:2699
689
  msgid "any cheapest one from cart"
690
  msgstr ""
691
 
692
- #: includes/pricing-rules.php:2702
693
  msgid "any cheapest one of "
694
  msgstr ""
695
 
696
- #: includes/pricing-rules.php:2707
697
  msgid " quantity of any "
698
  msgstr ""
699
 
700
- #: includes/pricing-rules.php:2709
701
  msgid " cheapest item "
702
  msgstr ""
703
 
704
- #: includes/pricing-rules.php:2712
705
  msgid " quantity of cheapest item "
706
  msgstr ""
707
 
708
- #: includes/pricing-rules.php:2716
709
  msgid "from the category "
710
  msgstr ""
711
 
712
- #: view/cart-rules.php:47
713
  msgid "Cart Rules"
714
  msgstr ""
715
 
716
- #: view/cart-rules.php:51 view/pricing-rules.php:83
717
  msgid "View Examples"
718
  msgstr ""
719
 
720
- #: view/cart-rules.php:52 view/documentation.php:21 view/pricing-rules.php:84
721
  msgid "Documentation"
722
  msgstr ""
723
 
724
- #: view/cart-rules.php:62 view/pricing-rules.php:94
725
  msgid "You Reach Max. Rule Limit"
726
  msgstr ""
727
 
728
- #: view/cart-rules.php:67 view/pricing-rules.php:98
729
  msgid "Add New Rule"
730
  msgstr ""
731
 
732
- #: view/cart-rules.php:78 view/pricing-rules.php:108
733
  msgid "Bulk Actions"
734
  msgstr ""
735
 
736
- #: view/cart-rules.php:79 view/pricing-rules.php:109
737
  msgid "Enable rules"
738
  msgstr ""
739
 
740
- #: view/cart-rules.php:80 view/pricing-rules.php:110
741
  msgid "Disable rules"
742
  msgstr ""
743
 
744
- #: view/cart-rules.php:81 view/pricing-rules.php:111
745
  msgid "Delete rules"
746
  msgstr ""
747
 
748
- #: view/cart-rules.php:83 view/pricing-rules.php:113
749
  msgid "Apply"
750
  msgstr ""
751
 
752
- #: view/cart-rules.php:97 view/cart-rules.php:182 view/pricing-rules.php:127
753
- #: view/pricing-rules.php:212 view/template/discount-table.php:21
754
  msgid "Name"
755
  msgstr ""
756
 
757
- #: view/cart-rules.php:98 view/cart-rules.php:183 view/pricing-rules.php:128
758
- #: view/pricing-rules.php:213
759
  msgid "Start Date"
760
  msgstr ""
761
 
762
- #: view/cart-rules.php:99 view/cart-rules.php:184 view/pricing-rules.php:129
763
- #: view/pricing-rules.php:214
764
  msgid "Expired On"
765
  msgstr ""
766
 
767
- #: view/cart-rules.php:100 view/cart-rules.php:185 view/pricing-rules.php:130
768
- #: view/pricing-rules.php:215
769
  msgid "Status"
770
  msgstr ""
771
 
772
- #: view/cart-rules.php:103 view/cart-rules.php:188 view/pricing-rules.php:133
773
- #: view/pricing-rules.php:218
 
 
 
 
 
774
  msgid "Order"
775
  msgstr ""
776
 
777
- #: view/cart-rules.php:155 view/pricing-rules.php:185
778
  msgid "Edit"
779
  msgstr ""
780
 
781
- #: view/cart-rules.php:166 view/pricing-rules.php:196
782
  msgid "Delete"
783
  msgstr ""
784
 
@@ -863,7 +872,7 @@ msgstr ""
863
 
864
  #: view/includes/cart-menu.php:9 view/includes/sub-menu.php:9
865
  #: view/settings.php:26 view/view-cart-rules.php:64
866
- #: view/view-pricing-rules.php:48
867
  msgid "General"
868
  msgstr ""
869
 
@@ -872,8 +881,8 @@ msgid "Conditions"
872
  msgstr ""
873
 
874
  #: view/includes/cart-menu.php:13 view/includes/sub-menu.php:13
875
- #: view/template/discount-table.php:27 view/view-cart-rules.php:594
876
- #: view/view-pricing-rules.php:627
877
  msgid "Discount"
878
  msgstr ""
879
 
@@ -906,7 +915,7 @@ msgstr ""
906
  msgid "Condition"
907
  msgstr ""
908
 
909
- #: view/pricing-rules.php:79
910
  msgid "Price Rules"
911
  msgstr ""
912
 
@@ -951,15 +960,14 @@ msgid "Enable dropdowns (applies only for the rule engine in the backend.)"
951
  msgstr ""
952
 
953
  #: view/settings.php:88 view/settings.php:105 view/settings.php:117
954
- #: view/settings.php:130 view/settings.php:336 view/settings.php:348
955
- #: view/settings.php:360 view/settings.php:547
956
  msgid "Yes"
957
  msgstr ""
958
 
959
  #: view/settings.php:89 view/settings.php:106 view/settings.php:118
960
- #: view/settings.php:131 view/settings.php:337 view/settings.php:349
961
- #: view/settings.php:361 view/settings.php:548 view/view-cart-rules.php:568
962
- #: view/view-pricing-rules.php:410
963
  msgid "No"
964
  msgstr ""
965
 
@@ -991,196 +999,226 @@ msgstr ""
991
  msgid "Rule Setup for Price:"
992
  msgstr ""
993
 
994
- #: view/settings.php:156 view/settings.php:437
995
  msgid "Apply first matched rule"
996
  msgstr ""
997
 
998
- #: view/settings.php:162 view/settings.php:164 view/settings.php:443
999
- #: view/settings.php:445
1000
  msgid "Apply all matched rules"
1001
  msgstr ""
1002
 
1003
- #: view/settings.php:171 view/settings.php:173 view/settings.php:452
1004
- #: view/settings.php:454
1005
  msgid "Apply biggest discount"
1006
  msgstr ""
1007
 
1008
- #: view/settings.php:183
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1009
  msgid "Show Price discount on product page :"
1010
  msgstr ""
1011
 
1012
- #: view/settings.php:192 view/settings.php:211 view/settings.php:269
1013
- #: view/settings.php:287 view/settings.php:305 view/settings.php:323
1014
  msgid "Don't Show"
1015
  msgstr ""
1016
 
1017
- #: view/settings.php:195 view/settings.php:214
1018
  msgid "It displays only if any rule matches"
1019
  msgstr ""
1020
 
1021
- #: view/settings.php:202
1022
  msgid "Show Sale badge on product page :"
1023
  msgstr ""
1024
 
1025
- #: view/settings.php:221
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1026
  msgid "Discount Table :"
1027
  msgstr ""
1028
 
1029
- #: view/settings.php:230
1030
  msgid "Default layout"
1031
  msgstr ""
1032
 
1033
- #: view/settings.php:233
1034
  msgid "Advance layout"
1035
  msgstr ""
1036
 
1037
- #: view/settings.php:242
1038
  msgid "Table placement:"
1039
  msgstr ""
1040
 
1041
- #: view/settings.php:248
1042
  msgid "Before cart form"
1043
  msgstr ""
1044
 
1045
- #: view/settings.php:251
1046
  msgid "After cart form"
1047
  msgstr ""
1048
 
1049
- #: view/settings.php:260
1050
  msgid "Table header :"
1051
  msgstr ""
1052
 
1053
- #: view/settings.php:278
1054
  msgid "Title column on table :"
1055
  msgstr ""
1056
 
1057
- #: view/settings.php:296
1058
  msgid "Range column on table :"
1059
  msgstr ""
1060
 
1061
- #: view/settings.php:314
1062
  msgid "Discount column on table :"
1063
  msgstr ""
1064
 
1065
- #: view/settings.php:331
1066
  msgid "Strikeout discount in cart item"
1067
  msgstr ""
1068
 
1069
- #: view/settings.php:343
1070
  msgid "Auto add free product on coupon applied (For coupon based rules)"
1071
  msgstr ""
1072
 
1073
- #: view/settings.php:355
1074
  msgid "Include variants when just parent product is chosen in the rules"
1075
  msgstr ""
1076
 
1077
- #: view/settings.php:368
1078
  msgid "Display savings text"
1079
  msgstr ""
1080
 
1081
- #: view/settings.php:377
1082
  msgid "On each line item"
1083
  msgstr ""
1084
 
1085
- #: view/settings.php:380
1086
  msgid "On after total"
1087
  msgstr ""
1088
 
1089
- #: view/settings.php:383
1090
  msgid "Both in line item and after total"
1091
  msgstr ""
1092
 
1093
- #: view/settings.php:391
1094
  msgid "Savings text to show"
1095
  msgstr ""
1096
 
1097
- #: view/settings.php:399
1098
  msgid "{{total_discount_price}} -> Total discount applied"
1099
  msgstr ""
1100
 
1101
- #: view/settings.php:411
1102
  msgid "Cart rules settings"
1103
  msgstr ""
1104
 
1105
- #: view/settings.php:418
1106
  msgid "Coupon Name to be displayed :"
1107
  msgstr ""
1108
 
1109
- #: view/settings.php:424
1110
  msgid "Discount Coupon Name"
1111
  msgstr ""
1112
 
1113
- #: view/settings.php:431
1114
  msgid "Rule Setup for Cart:"
1115
  msgstr ""
1116
 
1117
- #: view/settings.php:463
1118
  msgid "Enable free shipping option"
1119
  msgstr ""
1120
 
1121
- #: view/settings.php:470 view/view-pricing-rules.php:300
1122
- #: view/view-pricing-rules.php:357 view/view-pricing-rules.php:422
1123
- #: view/view-pricing-rules.php:468 view/view-pricing-rules.php:497
1124
- msgid "Supported in PRO version"
1125
- msgstr ""
1126
-
1127
- #: view/settings.php:483
1128
  msgid "Use Woocommerce free shipping"
1129
  msgstr ""
1130
 
1131
- #: view/settings.php:486
1132
  msgid "Use Woo-Discount free shipping"
1133
  msgstr ""
1134
 
1135
- #: view/settings.php:500
1136
  msgid "Free shipping text to be displayed"
1137
  msgstr ""
1138
 
1139
- #: view/settings.php:507
1140
  msgid "Free Shipping title"
1141
  msgstr ""
1142
 
1143
- #: view/settings.php:514
1144
  msgid "Draft"
1145
  msgstr ""
1146
 
1147
- #: view/settings.php:524
1148
  msgid "Exclude Draft products in product select box."
1149
  msgstr ""
1150
 
1151
- #: view/settings.php:534
1152
  msgid "Performance settings"
1153
  msgstr ""
1154
 
1155
- #: view/settings.php:542
1156
  msgid "Enable cache for variable products table content"
1157
  msgstr ""
1158
 
1159
- #: view/settings.php:554 view/settings.php:558
1160
  msgid "Clear cache"
1161
  msgstr ""
1162
 
1163
- #: view/settings.php:568
1164
  msgid "Promotion settings"
1165
  msgstr ""
1166
 
1167
- #: view/settings.php:575
1168
  msgid "Show a message on applying price rules in cart"
1169
  msgstr ""
1170
 
1171
- #: view/settings.php:593 view/settings.php:628
1172
  msgid "Message"
1173
  msgstr ""
1174
 
1175
- #: view/settings.php:601 view/settings.php:636
1176
  msgid "{{title}} -> Rule title"
1177
  msgstr ""
1178
 
1179
- #: view/settings.php:602 view/settings.php:637
1180
  msgid "{{description}} -> Rule description"
1181
  msgstr ""
1182
 
1183
- #: view/settings.php:610
1184
  msgid "Show a message on applying cart rules in cart"
1185
  msgstr ""
1186
 
@@ -1196,7 +1234,7 @@ msgstr ""
1196
  msgid "Looking for more features? Upgrade to PRO"
1197
  msgstr ""
1198
 
1199
- #: view/view-cart-rules.php:55 view/view-pricing-rules.php:39
1200
  msgid "Close and go back to list"
1201
  msgstr ""
1202
 
@@ -1208,47 +1246,47 @@ msgstr ""
1208
  msgid "Edit Cart Rule"
1209
  msgstr ""
1210
 
1211
- #: view/view-cart-rules.php:74 view/view-pricing-rules.php:58
1212
  msgid "This rule is not running currently: "
1213
  msgstr ""
1214
 
1215
- #: view/view-cart-rules.php:83 view/view-pricing-rules.php:67
1216
  msgid "Priority :"
1217
  msgstr ""
1218
 
1219
- #: view/view-cart-rules.php:85 view/view-pricing-rules.php:69
1220
  msgid ""
1221
  "The Simple Ranking concept to said, which one is going to execute first and "
1222
  "so on."
1223
  msgstr ""
1224
 
1225
- #: view/view-cart-rules.php:97 view/view-pricing-rules.php:82
1226
  msgid "Rule Name"
1227
  msgstr ""
1228
 
1229
  #: view/view-cart-rules.php:99 view/view-cart-rules.php:111
1230
- #: view/view-pricing-rules.php:84 view/view-pricing-rules.php:96
1231
  msgid "Rule Descriptions."
1232
  msgstr ""
1233
 
1234
- #: view/view-cart-rules.php:104 view/view-pricing-rules.php:89
1235
  msgid "ex. Standard Rule."
1236
  msgstr ""
1237
 
1238
- #: view/view-cart-rules.php:109 view/view-pricing-rules.php:94
1239
  msgid "Rule Description"
1240
  msgstr ""
1241
 
1242
- #: view/view-cart-rules.php:120 view/view-pricing-rules.php:130
1243
  msgid "Validity"
1244
  msgstr ""
1245
 
1246
- #: view/view-cart-rules.php:121 view/view-pricing-rules.php:131
1247
  msgid "Period of Rule Active. Format: month/day/Year Hour:Min"
1248
  msgstr ""
1249
 
1250
- #: view/view-cart-rules.php:134 view/view-pricing-rules.php:144
1251
- #: view/view-pricing-rules.php:571
1252
  msgid "From"
1253
  msgstr ""
1254
 
@@ -1256,13 +1294,13 @@ msgstr ""
1256
  msgid "To"
1257
  msgstr ""
1258
 
1259
- #: view/view-cart-rules.php:139 view/view-pricing-rules.php:149
1260
  #, php-format
1261
  msgid "Current date and time: %s"
1262
  msgstr ""
1263
 
1264
- #: view/view-cart-rules.php:144 view/view-cart-rules.php:588
1265
- #: view/view-pricing-rules.php:183 view/view-pricing-rules.php:620
1266
  msgid "Next"
1267
  msgstr ""
1268
 
@@ -1282,319 +1320,295 @@ msgstr ""
1282
  msgid "Email with TLD (Eg: edu)"
1283
  msgstr ""
1284
 
1285
- #: view/view-cart-rules.php:568 view/view-pricing-rules.php:410
1286
- msgid "To get this condition work,"
1287
- msgstr ""
1288
-
1289
- #: view/view-cart-rules.php:568 view/view-pricing-rules.php:410
1290
- msgid "please change the option"
1291
- msgstr ""
1292
-
1293
- #: view/view-cart-rules.php:568 view/view-pricing-rules.php:410
1294
- msgid "Disable the rules while have coupon(Third party)"
1295
- msgstr ""
1296
-
1297
- #: view/view-cart-rules.php:568 view/view-pricing-rules.php:410
1298
- msgid "in cart to"
1299
- msgstr ""
1300
-
1301
- #: view/view-cart-rules.php:587 view/view-cart-rules.php:684
1302
- #: view/view-pricing-rules.php:619 view/view-pricing-rules.php:817
1303
  msgid "Previous"
1304
  msgstr ""
1305
 
1306
- #: view/view-cart-rules.php:590
1307
  msgid "Guide to create cart rules"
1308
  msgstr ""
1309
 
1310
- #: view/view-cart-rules.php:610
1311
  msgid "Discount Type :"
1312
  msgstr ""
1313
 
1314
- #: view/view-cart-rules.php:629 view/view-cart-rules.php:631
1315
  msgid "Product Discount"
1316
  msgstr ""
1317
 
1318
- #: view/view-cart-rules.php:638 view/view-cart-rules.php:640
1319
  msgid "Free shipping"
1320
  msgstr ""
1321
 
1322
- #: view/view-cart-rules.php:649
1323
  msgid "value :"
1324
  msgstr ""
1325
 
1326
- #: view/view-cart-rules.php:657
1327
  msgid "Select products :"
1328
  msgstr ""
1329
 
1330
- #: view/view-cart-rules.php:671
1331
  msgid "Quantity :"
1332
  msgstr ""
1333
 
1334
- #: view/view-pricing-rules.php:43
1335
  msgid "New Price Rule"
1336
  msgstr ""
1337
 
1338
- #: view/view-pricing-rules.php:45
1339
  msgid "Edit Price Rule"
1340
  msgstr ""
1341
 
1342
- #: view/view-pricing-rules.php:105
1343
  msgid "Method"
1344
  msgstr ""
1345
 
1346
- #: view/view-pricing-rules.php:107
1347
  msgid "Method to Apply."
1348
  msgstr ""
1349
 
1350
- #: view/view-pricing-rules.php:113
1351
  msgid ""
1352
  "Quantity / category / product / user role based discounts and BOGO deals "
1353
  msgstr ""
1354
 
1355
- #: view/view-pricing-rules.php:120 view/view-pricing-rules.php:122
1356
  msgid "Dependent / conditional based discount (by individual product)"
1357
  msgstr ""
1358
 
1359
- #: view/view-pricing-rules.php:148
1360
  msgid "To - Leave Empty if No Expiry"
1361
  msgstr ""
1362
 
1363
- #: view/view-pricing-rules.php:159
1364
  msgid "Format for advanced table display option (see plugin settings)"
1365
  msgstr ""
1366
 
1367
- #: view/view-pricing-rules.php:161
1368
  msgid "Used when advanced table display option is set in the plugin settings"
1369
  msgstr ""
1370
 
1371
- #: view/view-pricing-rules.php:164
1372
  msgid "Buy {{min_quantity}} or more quantity and get {{discount}} as discount"
1373
  msgstr ""
1374
 
1375
- #: view/view-pricing-rules.php:167
1376
  msgid "{{title}} -> Title"
1377
  msgstr ""
1378
 
1379
- #: view/view-pricing-rules.php:168
1380
  msgid "{{description}} -> Description"
1381
  msgstr ""
1382
 
1383
- #: view/view-pricing-rules.php:169
1384
  msgid "{{min_quantity}} -> Minimum quantity"
1385
  msgstr ""
1386
 
1387
- #: view/view-pricing-rules.php:170
1388
  msgid "{{max_quantity}} -> Maximum quantity"
1389
  msgstr ""
1390
 
1391
- #: view/view-pricing-rules.php:171
1392
  msgid "{{discount}} -> Discount"
1393
  msgstr ""
1394
 
1395
- #: view/view-pricing-rules.php:172
1396
  msgid "{{discounted_price}} -> Discounted price"
1397
  msgstr ""
1398
 
1399
- #: view/view-pricing-rules.php:173
1400
  msgid "{{condition}} -> Rule condition text"
1401
  msgstr ""
1402
 
1403
- #: view/view-pricing-rules.php:188
1404
  msgid "Discount Conditions"
1405
  msgstr ""
1406
 
1407
- #: view/view-pricing-rules.php:193
1408
  msgid "Apply To"
1409
  msgstr ""
1410
 
1411
- #: view/view-pricing-rules.php:199
1412
  msgid "All products"
1413
  msgstr ""
1414
 
1415
- #: view/view-pricing-rules.php:203
1416
  msgid "Specific products"
1417
  msgstr ""
1418
 
1419
- #: view/view-pricing-rules.php:209 view/view-pricing-rules.php:211
1420
  msgid "Specific categories"
1421
  msgstr ""
1422
 
1423
- #: view/view-pricing-rules.php:218 view/view-pricing-rules.php:220
1424
  msgid "Specific attributes"
1425
  msgstr ""
1426
 
1427
- #: view/view-pricing-rules.php:231
1428
  msgid ""
1429
  "Check this box to count item quantities in cart cumulatively across products"
1430
  msgstr ""
1431
 
1432
- #: view/view-pricing-rules.php:243
1433
  msgid "Check this box to count quantities cumulatively across category(ies)"
1434
  msgstr ""
1435
 
1436
- #: view/view-pricing-rules.php:246
1437
  msgid "Check this box to apply child category(ies)"
1438
  msgstr ""
1439
 
1440
- #: view/view-pricing-rules.php:260
1441
  msgid "Check this box to count quantities cumulatively across attribute"
1442
  msgstr ""
1443
 
1444
- #: view/view-pricing-rules.php:270
1445
  msgid "Exclude products"
1446
  msgstr ""
1447
 
1448
- #: view/view-pricing-rules.php:289
1449
  msgid "Exclude sale items"
1450
  msgstr ""
1451
 
1452
- #: view/view-pricing-rules.php:294
1453
  msgid "Check this box if the rule should not apply to items on sale."
1454
  msgstr ""
1455
 
1456
- #: view/view-pricing-rules.php:313
1457
  msgid "Customers"
1458
  msgstr ""
1459
 
1460
- #: view/view-pricing-rules.php:318 view/view-pricing-rules.php:592
1461
  msgid "All"
1462
  msgstr ""
1463
 
1464
- #: view/view-pricing-rules.php:325 view/view-pricing-rules.php:327
1465
  msgid "Only Given"
1466
  msgstr ""
1467
 
1468
- #: view/view-pricing-rules.php:341
1469
  msgid "User roles"
1470
  msgstr ""
1471
 
1472
- #: view/view-pricing-rules.php:346 view/view-pricing-rules.php:376
1473
- #: view/view-pricing-rules.php:443 view/view-pricing-rules.php:486
1474
  msgid "Do not use"
1475
  msgstr ""
1476
 
1477
- #: view/view-pricing-rules.php:368
1478
  msgid "Coupon"
1479
  msgstr ""
1480
 
1481
- #: view/view-pricing-rules.php:377
1482
  msgid "Apply if any one coupon applied"
1483
  msgstr ""
1484
 
1485
- #: view/view-pricing-rules.php:378
1486
  msgid "Apply if all coupon applied"
1487
  msgstr ""
1488
 
1489
- #: view/view-pricing-rules.php:401
1490
  msgid "Make sure you have created the coupon already"
1491
  msgstr ""
1492
 
1493
- #: view/view-pricing-rules.php:433
1494
  msgid "Subtotal"
1495
  msgstr ""
1496
 
1497
- #: view/view-pricing-rules.php:444
1498
  msgid "Subtotal atleast"
1499
  msgstr ""
1500
 
1501
- #: view/view-pricing-rules.php:449
1502
  msgid "Enter the amount"
1503
  msgstr ""
1504
 
1505
- #: view/view-pricing-rules.php:459
1506
  msgid "Supported in WooCommerce 3.x"
1507
  msgstr ""
1508
 
1509
- #: view/view-pricing-rules.php:488
1510
- msgid "Number of orders"
1511
- msgstr ""
1512
-
1513
- #: view/view-pricing-rules.php:489
1514
- msgid "Purchased product"
1515
- msgstr ""
1516
-
1517
- #: view/view-pricing-rules.php:563
1518
  msgid "Any"
1519
  msgstr ""
1520
 
1521
- #: view/view-pricing-rules.php:564
1522
  msgid "Each"
1523
  msgstr ""
1524
 
1525
- #: view/view-pricing-rules.php:565
1526
  msgid "Combine"
1527
  msgstr ""
1528
 
1529
- #: view/view-pricing-rules.php:568
1530
  msgid "More than"
1531
  msgstr ""
1532
 
1533
- #: view/view-pricing-rules.php:569
1534
  msgid "Less than"
1535
  msgstr ""
1536
 
1537
- #: view/view-pricing-rules.php:570
1538
  msgid "Equal"
1539
  msgstr ""
1540
 
1541
- #: view/view-pricing-rules.php:573 view/view-pricing-rules.php:576
1542
- #: view/view-pricing-rules.php:596
1543
  msgid "Quantity"
1544
  msgstr ""
1545
 
1546
- #: view/view-pricing-rules.php:575
1547
  msgid "to"
1548
  msgstr ""
1549
 
1550
- #: view/view-pricing-rules.php:579
1551
  msgid "Product(s) from"
1552
  msgstr ""
1553
 
1554
- #: view/view-pricing-rules.php:585
1555
  msgid "Apply discount in product(s)"
1556
  msgstr ""
1557
 
1558
- #: view/view-pricing-rules.php:586
1559
  msgid "Apply discount in category(ies)"
1560
  msgstr ""
1561
 
1562
- #: view/view-pricing-rules.php:590
1563
  msgid "and get discount in "
1564
  msgstr ""
1565
 
1566
- #: view/view-pricing-rules.php:593
1567
  msgid "First quantity(s)"
1568
  msgstr ""
1569
 
1570
- #: view/view-pricing-rules.php:594
1571
  msgid "Skip first quantity(s)"
1572
  msgstr ""
1573
 
1574
- #: view/view-pricing-rules.php:599
1575
  msgid " Product(s) "
1576
  msgstr ""
1577
 
1578
- #: view/view-pricing-rules.php:603
1579
  msgid "Category(ies)"
1580
  msgstr ""
1581
 
1582
- #: view/view-pricing-rules.php:614
1583
  msgid "Guide for product dependent rules"
1584
  msgstr ""
1585
 
1586
- #: view/view-pricing-rules.php:630
1587
  msgid "Add New Range"
1588
  msgstr ""
1589
 
1590
- #: view/view-pricing-rules.php:800
1591
  msgid "Guide to create perfect BOGO rules"
1592
  msgstr ""
1593
 
1594
- #: view/view-pricing-rules.php:810
1595
  msgid "Percent"
1596
  msgstr ""
1597
 
1598
- #: view/view-pricing-rules.php:811
1599
  msgid "Fixed"
1600
  msgstr ""
11
  "Language: en\n"
12
  "X-Generator: Poedit 1.8.7.1\n"
13
 
14
+ #: helper/general-helper.php:46
15
  msgid "Guest"
16
  msgstr ""
17
 
18
+ #: helper/general-helper.php:544
19
  msgid "Start date and time is set in the future date"
20
  msgstr ""
21
 
22
+ #: helper/general-helper.php:547
23
  msgid "Validity expired"
24
  msgstr ""
25
 
26
+ #: helper/general-helper.php:564
27
  msgid "Will run in future"
28
  msgstr ""
29
 
30
+ #: helper/general-helper.php:567
31
  msgid "Not running - validity expired"
32
  msgstr ""
33
 
34
+ #: helper/general-helper.php:584
35
  msgid "Running"
36
  msgstr ""
37
 
38
+ #: helper/general-helper.php:589
39
  msgid "Your server current date and time: "
40
  msgstr ""
41
 
42
+ #: helper/general-helper.php:705
43
  msgid "Read Docs"
44
  msgstr ""
45
 
103
  msgid "License key seems to be Invalid. Please enter a valid license key"
104
  msgstr ""
105
 
106
+ #: helper/woo-function.php:378 helper/woo-function.php:388
107
  msgid "Search for a product&hellip;"
108
  msgstr ""
109
 
110
+ #: helper/woo-function.php:421 helper/woo-function.php:433
111
  msgid "Search for a user&hellip;"
112
  msgstr ""
113
 
119
  msgid "Custom Shipping Method for Woocommerce Discount Rules"
120
  msgstr ""
121
 
122
+ #: includes/advanced/free_shipping_method.php:68 view/settings.php:567
123
  msgid "Free Shipping"
124
  msgstr ""
125
 
126
+ #: includes/advanced/free_shipping_method.php:73 includes/discount-base.php:974
127
+ #: view/cart-rules.php:133 view/pricing-rules.php:163 view/settings.php:648
128
+ #: view/settings.php:683
129
  msgid "Enable"
130
  msgstr ""
131
 
141
  msgid "Title to be display on site"
142
  msgstr ""
143
 
144
+ #: includes/discount-base.php:188 view/cart-rules.php:147
145
+ #: view/pricing-rules.php:177
146
  msgid "Active"
147
  msgstr ""
148
 
149
+ #: includes/discount-base.php:190 view/cart-rules.php:149
150
+ #: view/pricing-rules.php:179 view/settings.php:290 view/settings.php:437
151
+ #: view/settings.php:536 view/settings.php:543 view/settings.php:645
152
+ #: view/settings.php:680
153
  msgid "Disabled"
154
  msgstr ""
155
 
156
+ #: includes/discount-base.php:462
157
  msgid "Cache cleared successfully"
158
  msgstr ""
159
 
160
+ #: includes/discount-base.php:464
161
  msgid "Failed to clear cache"
162
  msgstr ""
163
 
164
+ #: includes/discount-base.php:570 includes/discount-base.php:605
165
  msgid "Failed to do action"
166
  msgstr ""
167
 
168
+ #: includes/discount-base.php:609
169
  msgid "Disabled successfully"
170
  msgstr ""
171
 
172
+ #: includes/discount-base.php:612
173
  msgid "Deleted successfully"
174
  msgstr ""
175
 
176
+ #: includes/discount-base.php:615
177
  msgid "Enabled successfully"
178
  msgstr ""
179
 
180
+ #: includes/discount-base.php:635 includes/discount-base.php:636
181
+ #: includes/discount-base.php:653
182
  msgid "copy"
183
  msgstr ""
184
 
185
+ #: includes/discount-base.php:661
186
  msgid "Duplicate rule created successfully"
187
  msgstr ""
188
 
189
+ #: includes/discount-base.php:665
190
  msgid "Failed to create duplicate rule"
191
  msgstr ""
192
 
193
+ #: includes/discount-base.php:929
194
  msgid "Please fill this field"
195
  msgstr ""
196
 
197
+ #: includes/discount-base.php:930
198
  msgid "Please Enter the Rule Name to Create / Save."
199
  msgstr ""
200
 
201
+ #: includes/discount-base.php:931
202
  msgid "Saving..."
203
  msgstr ""
204
 
205
+ #: includes/discount-base.php:932 view/view-cart-rules.php:54
206
+ #: view/view-pricing-rules.php:37
207
  msgid "Save Rule"
208
  msgstr ""
209
 
210
+ #: includes/discount-base.php:933
211
  msgid "Please enter a Key"
212
  msgstr ""
213
 
214
+ #: includes/discount-base.php:934 view/view-pricing-rules.php:654
215
  msgid "Min Quantity"
216
  msgstr ""
217
 
218
+ #: includes/discount-base.php:935 view/view-pricing-rules.php:661
219
  msgid "Max Quantity"
220
  msgstr ""
221
 
222
+ #: includes/discount-base.php:936 view/view-cart-rules.php:91
223
+ #: view/view-pricing-rules.php:75 view/view-pricing-rules.php:659
224
+ #: view/view-pricing-rules.php:725 view/view-pricing-rules.php:742
225
+ #: view/view-pricing-rules.php:749
226
  msgid "ex. 1"
227
  msgstr ""
228
 
229
+ #: includes/discount-base.php:937 view/view-pricing-rules.php:787
230
  msgid "ex. 10"
231
  msgstr ""
232
 
233
+ #: includes/discount-base.php:938 view/view-pricing-rules.php:666
234
+ #: view/view-pricing-rules.php:702
235
  msgid "ex. 50"
236
  msgstr ""
237
 
238
+ #: includes/discount-base.php:939
239
  msgid "Search for a user"
240
  msgstr ""
241
 
242
+ #: includes/discount-base.php:940 view/view-pricing-rules.php:667
243
  msgid "Adjustment Type"
244
  msgstr ""
245
 
246
+ #: includes/discount-base.php:941 view/view-pricing-rules.php:776
247
  msgid "Discount percentage"
248
  msgstr ""
249
 
250
+ #: includes/discount-base.php:942 view/view-cart-rules.php:612
251
+ #: view/view-pricing-rules.php:673
252
  msgid "Percentage Discount"
253
  msgstr ""
254
 
255
+ #: includes/discount-base.php:943 view/view-cart-rules.php:618
256
+ #: view/view-cart-rules.php:620 view/view-pricing-rules.php:681
257
+ #: view/view-pricing-rules.php:683
258
  msgid "Price Discount"
259
  msgstr ""
260
 
261
+ #: includes/discount-base.php:944 view/view-pricing-rules.php:691
262
+ #: view/view-pricing-rules.php:693
263
  msgid "BOGO Product Discount"
264
  msgstr ""
265
 
266
+ #: includes/discount-base.php:945
267
  msgid "Product Discount - Not support for subtotal based rule"
268
  msgstr ""
269
 
270
+ #: includes/discount-base.php:946 view/view-cart-rules.php:398
271
+ #: view/view-pricing-rules.php:697 view/view-pricing-rules.php:816
272
  msgid "Value"
273
  msgstr ""
274
 
275
+ #: includes/discount-base.php:947 view/view-pricing-rules.php:708
276
  msgid "receive discount for"
277
  msgstr ""
278
 
279
+ #: includes/discount-base.php:948 view/view-pricing-rules.php:710
280
  msgid "Auto add all selected products"
281
  msgstr ""
282
 
283
+ #: includes/discount-base.php:949 view/view-pricing-rules.php:711
284
  msgid "Same product"
285
  msgstr ""
286
 
287
+ #: includes/discount-base.php:950 view/view-pricing-rules.php:712
288
  msgid "Any one cheapest from selected"
289
  msgstr ""
290
 
291
+ #: includes/discount-base.php:951 view/view-pricing-rules.php:713
292
  msgid "Any one cheapest from all products"
293
  msgstr ""
294
 
295
+ #: includes/discount-base.php:952 view/view-pricing-rules.php:714
296
  msgid "Cheapest in cart - selected category(ies)"
297
  msgstr ""
298
 
299
+ #: includes/discount-base.php:953 view/view-pricing-rules.php:715
300
  msgid "Cheapest in cart - selected item(s)"
301
  msgstr ""
302
 
303
+ #: includes/discount-base.php:954 view/view-pricing-rules.php:716
304
  msgid "Cheapest among all items in cart"
305
  msgstr ""
306
 
307
+ #: includes/discount-base.php:955 view/view-pricing-rules.php:720
308
  msgid "Free quantity"
309
  msgstr ""
310
 
311
+ #: includes/discount-base.php:956 view/view-pricing-rules.php:720
312
  msgid "Number of quantity(ies) in each selected product(s)"
313
  msgstr ""
314
 
315
+ #: includes/discount-base.php:957 view/view-pricing-rules.php:734
316
  msgid "Fixed item count (not recommended)"
317
  msgstr ""
318
 
319
+ #: includes/discount-base.php:958 view/view-pricing-rules.php:733
320
  msgid "Dynamic item count"
321
  msgstr ""
322
 
323
+ #: includes/discount-base.php:959 view/view-pricing-rules.php:736
324
  msgid ""
325
  "Fixed item count - You need to provide item count manually. Dynamic item "
326
  "count - System will choose dynamically based on cart"
327
  msgstr ""
328
 
329
+ #: includes/discount-base.php:960 view/view-pricing-rules.php:737
330
  msgid "Item count"
331
  msgstr ""
332
 
333
+ #: includes/discount-base.php:961 view/view-pricing-rules.php:737
334
  msgid "Discount for number of item(s) in cart"
335
  msgstr ""
336
 
337
+ #: includes/discount-base.php:962 view/view-pricing-rules.php:744
338
  msgid "Discount for number of quantity(ies) in each item"
339
  msgstr ""
340
 
341
+ #: includes/discount-base.php:963 view/view-pricing-rules.php:744
342
  msgid "Item quantity"
343
  msgstr ""
344
 
345
+ #: includes/discount-base.php:964
346
  msgid "Search for a products"
347
  msgstr ""
348
 
349
+ #: includes/discount-base.php:965
350
  msgid "and"
351
  msgstr ""
352
 
353
+ #: includes/discount-base.php:966 view/view-pricing-rules.php:778
354
  msgid "100% percent"
355
  msgstr ""
356
 
357
+ #: includes/discount-base.php:967 view/view-pricing-rules.php:779
358
  msgid "Limited percent"
359
  msgstr ""
360
 
361
+ #: includes/discount-base.php:968 view/view-pricing-rules.php:787
362
  msgid "Percentage"
363
  msgstr ""
364
 
365
+ #: includes/discount-base.php:969
366
  msgid "as discount"
367
  msgstr ""
368
 
369
+ #: includes/discount-base.php:970 view/view-cart-rules.php:575
370
+ #: view/view-pricing-rules.php:793
371
  msgid "Remove"
372
  msgstr ""
373
 
374
+ #: includes/discount-base.php:971 view/cart-rules.php:170
375
+ #: view/pricing-rules.php:200 view/view-pricing-rules.php:796
376
  msgid "Duplicate"
377
  msgstr ""
378
 
379
+ #: includes/discount-base.php:972
380
  msgid "none"
381
  msgstr ""
382
 
383
+ #: includes/discount-base.php:973
384
  msgid "Are you sure to remove this ?"
385
  msgstr ""
386
 
387
+ #: includes/discount-base.php:975 view/cart-rules.php:130
388
+ #: view/pricing-rules.php:160
389
  msgid "Disable"
390
  msgstr ""
391
 
392
+ #: includes/discount-base.php:976
393
  msgid "Are you sure to remove ?"
394
  msgstr ""
395
 
396
+ #: includes/discount-base.php:977 view/view-cart-rules.php:171
397
  msgid "Type"
398
  msgstr ""
399
 
400
+ #: includes/discount-base.php:978 view/view-cart-rules.php:175
401
  msgid "Cart Subtotal"
402
  msgstr ""
403
 
404
+ #: includes/discount-base.php:979 view/view-cart-rules.php:178
405
  msgid "Subtotal at least"
406
  msgstr ""
407
 
408
+ #: includes/discount-base.php:980 view/view-cart-rules.php:182
409
  msgid "Subtotal less than"
410
  msgstr ""
411
 
412
+ #: includes/discount-base.php:981 view/view-cart-rules.php:185
413
  msgid "Cart Item Count"
414
  msgstr ""
415
 
416
+ #: includes/discount-base.php:982 view/view-cart-rules.php:188
417
  msgid "Number of line items in the cart (not quantity) at least"
418
  msgstr ""
419
 
420
+ #: includes/discount-base.php:983 view/view-cart-rules.php:192
421
  msgid "Number of line items in the cart (not quantity) less than"
422
  msgstr ""
423
 
424
+ #: includes/discount-base.php:984 view/view-cart-rules.php:195
425
  msgid "Quantity Sum"
426
  msgstr ""
427
 
428
+ #: includes/discount-base.php:985 view/view-cart-rules.php:201
429
  #: view/view-cart-rules.php:204
430
  msgid "Total number of quantities in the cart at least"
431
  msgstr ""
432
 
433
+ #: includes/discount-base.php:986 view/view-cart-rules.php:213
434
  #: view/view-cart-rules.php:216
435
  msgid "Total number of quantities in the cart less than"
436
  msgstr ""
437
 
438
+ #: includes/discount-base.php:987 view/view-cart-rules.php:225
439
  msgid "Categories in cart"
440
  msgstr ""
441
 
442
+ #: includes/discount-base.php:988 view/view-cart-rules.php:231
443
  msgid "Including sub-categories in cart"
444
  msgstr ""
445
 
446
+ #: includes/discount-base.php:989 view/view-cart-rules.php:240
447
  msgid "Customer Details (must be logged in)"
448
  msgstr ""
449
 
450
+ #: includes/discount-base.php:990 view/view-cart-rules.php:246
451
  #: view/view-cart-rules.php:248
452
  msgid "User in list"
453
  msgstr ""
454
 
455
+ #: includes/discount-base.php:991 view/view-cart-rules.php:256
456
  #: view/view-cart-rules.php:258
457
  msgid "User role in list"
458
  msgstr ""
459
 
460
+ #: includes/discount-base.php:992 view/view-cart-rules.php:266
461
  #: view/view-cart-rules.php:268
462
  msgid "Shipping country in list"
463
  msgstr ""
464
 
465
+ #: includes/discount-base.php:993 view/view-cart-rules.php:272
466
  msgid "Customer Email"
467
  msgstr ""
468
 
469
+ #: includes/discount-base.php:994
470
  msgid "Email with TLD (Ege: edu)"
471
  msgstr ""
472
 
473
+ #: includes/discount-base.php:995 view/view-cart-rules.php:288
474
  #: view/view-cart-rules.php:290
475
  msgid "Email with Domain (Eg: gmail.com)"
476
  msgstr ""
477
 
478
+ #: includes/discount-base.php:996 view/view-cart-rules.php:294
479
  msgid "Customer Billing Details"
480
  msgstr ""
481
 
482
+ #: includes/discount-base.php:997 view/view-cart-rules.php:300
483
  #: view/view-cart-rules.php:302
484
  msgid "Billing city"
485
  msgstr ""
486
 
487
+ #: includes/discount-base.php:998 view/view-cart-rules.php:306
488
  msgid "Customer Shipping Details"
489
  msgstr ""
490
 
491
+ #: includes/discount-base.php:999 view/view-cart-rules.php:312
492
  #: view/view-cart-rules.php:314
493
  msgid "Shipping state"
494
  msgstr ""
495
 
496
+ #: includes/discount-base.php:1000 view/view-cart-rules.php:322
497
  #: view/view-cart-rules.php:324
498
  msgid "Shipping city"
499
  msgstr ""
500
 
501
+ #: includes/discount-base.php:1001 view/view-cart-rules.php:332
502
  #: view/view-cart-rules.php:334
503
  msgid "Shipping zip code"
504
  msgstr ""
505
 
506
+ #: includes/discount-base.php:1002 view/view-cart-rules.php:338
507
+ #: view/view-pricing-rules.php:483
508
  msgid "Purchase History"
509
  msgstr ""
510
 
511
+ #: includes/discount-base.php:1003 view/view-cart-rules.php:344
512
+ #: view/view-cart-rules.php:346 view/view-pricing-rules.php:491
513
  msgid "Purchased amount"
514
  msgstr ""
515
 
516
+ #: includes/discount-base.php:1004 view/view-cart-rules.php:354
517
+ #: view/view-cart-rules.php:356 view/view-pricing-rules.php:492
518
+ msgid "Number of previous orders made"
519
  msgstr ""
520
 
521
+ #: includes/discount-base.php:1005 view/view-cart-rules.php:364
522
+ #: view/view-cart-rules.php:366 view/view-pricing-rules.php:493
523
+ msgid "Number of previous orders made with following products"
524
  msgstr ""
525
 
526
+ #: includes/discount-base.php:1006 view/view-cart-rules.php:370
527
  msgid "Coupon applied"
528
  msgstr ""
529
 
530
+ #: includes/discount-base.php:1007 view/view-cart-rules.php:376
531
  #: view/view-cart-rules.php:378
532
  msgid "Atleast any one"
533
  msgstr ""
534
 
535
+ #: includes/discount-base.php:1008 view/view-cart-rules.php:386
536
  #: view/view-cart-rules.php:388
537
  msgid "All selected"
538
  msgstr ""
539
 
540
+ #: includes/discount-base.php:1009 view/view-cart-rules.php:544
541
+ #: view/view-pricing-rules.php:528
542
  msgid "Greater than or equal to"
543
  msgstr ""
544
 
545
+ #: includes/discount-base.php:1010 view/view-cart-rules.php:545
546
+ #: view/view-pricing-rules.php:529
547
  msgid "Less than or equal to"
548
  msgstr ""
549
 
550
+ #: includes/discount-base.php:1011 view/view-cart-rules.php:547
551
+ #: view/view-pricing-rules.php:532
552
+ msgid "and the order status should be"
553
  msgstr ""
554
 
555
+ #: includes/discount-base.php:1012 view/cart-rules.php:114
556
+ #: view/cart-rules.php:209 view/pricing-rules.php:144
557
+ #: view/pricing-rules.php:239 view/view-cart-rules.php:574
558
  msgid "Action"
559
  msgstr ""
560
 
561
+ #: includes/discount-base.php:1013 view/settings.php:21
562
  msgid "Save"
563
  msgstr ""
564
 
565
+ #: includes/discount-base.php:1014
566
  msgid "Saved Successfully!"
567
  msgstr ""
568
 
569
+ #: includes/discount-base.php:1015 view/view-cart-rules.php:427
570
+ #: view/view-cart-rules.php:462 view/view-cart-rules.php:482
571
+ #: view/view-cart-rules.php:503 view/view-cart-rules.php:552
572
+ #: view/view-pricing-rules.php:234 view/view-pricing-rules.php:250
573
+ #: view/view-pricing-rules.php:540 view/view-pricing-rules.php:609
574
+ #: view/view-pricing-rules.php:764
575
  msgid "None selected"
576
  msgstr ""
577
 
578
+ #: includes/discount-base.php:1016 view/view-cart-rules.php:237
579
  msgid "In each category"
580
  msgstr ""
581
 
582
+ #: includes/discount-base.php:1017 view/settings.php:212 view/settings.php:231
583
+ #: view/settings.php:329 view/settings.php:347 view/settings.php:365
584
+ #: view/settings.php:383
585
  msgid "Show"
586
  msgstr ""
587
 
588
+ #: includes/discount-base.php:1018 view/template/sidebar.php:12
589
  msgid "Hide"
590
  msgstr ""
591
 
592
+ #: includes/discount-base.php:1019
593
  msgid "Please select at least one rule"
594
  msgstr ""
595
 
596
+ #: includes/discount-base.php:1020
597
  msgid "Please select an action to apply"
598
  msgstr ""
599
 
600
+ #: includes/discount-base.php:1021
601
  msgid "Are you sure to remove the selected rules"
602
  msgstr ""
603
 
604
+ #: includes/discount-base.php:1022 view/view-pricing-rules.php:753
605
  msgid "Choose product(s)"
606
  msgstr ""
607
 
608
+ #: includes/discount-base.php:1023 view/view-pricing-rules.php:763
609
  msgid "Choose category(ies)"
610
  msgstr ""
611
 
612
+ #: includes/discount-base.php:1024
613
+ msgid "Search for a coupon"
614
+ msgstr ""
615
+
616
+ #: includes/discount-base.php:1025 view/view-pricing-rules.php:718
617
  msgid ""
618
  "Auto add all selected products - Automatically added to the cart <br> Same "
619
  "product - get discount in same product <br> Any one cheapest from selected - "
624
  "no.of quantities"
625
  msgstr ""
626
 
627
+ #: includes/pricing-rules.php:2581 view/view-pricing-rules.php:565
628
  msgid "Buy"
629
  msgstr ""
630
 
631
+ #: includes/pricing-rules.php:2585
632
  msgid " less than or equal to "
633
  msgstr ""
634
 
635
+ #: includes/pricing-rules.php:2585 includes/pricing-rules.php:2591
636
  msgid " Quantity"
637
  msgstr ""
638
 
639
+ #: includes/pricing-rules.php:2588
640
  msgid " Quantity "
641
  msgstr ""
642
 
643
+ #: includes/pricing-rules.php:2595
644
  msgid " or more Quantity"
645
  msgstr ""
646
 
647
+ #: includes/pricing-rules.php:2604
648
  msgid " any "
649
  msgstr ""
650
 
651
+ #: includes/pricing-rules.php:2604
652
  msgid " products from "
653
  msgstr ""
654
 
655
+ #: includes/pricing-rules.php:2611
656
  msgid " in each products"
657
  msgstr ""
658
 
659
+ #: includes/pricing-rules.php:2623
660
  msgid " and get discount in "
661
  msgstr ""
662
 
663
+ #: includes/pricing-rules.php:2626
664
  msgid " first "
665
  msgstr ""
666
 
667
+ #: includes/pricing-rules.php:2628 includes/pricing-rules.php:2632
668
  msgid " quantity of product(s) - "
669
  msgstr ""
670
 
671
+ #: includes/pricing-rules.php:2630
672
  msgid " after first "
673
  msgstr ""
674
 
675
+ #: includes/pricing-rules.php:2648
676
  msgid "Category(ies) "
677
  msgstr ""
678
 
679
+ #: includes/pricing-rules.php:2714
680
  msgid "Get "
681
  msgstr ""
682
 
683
+ #: includes/pricing-rules.php:2716
684
  #, php-format
685
  msgid "% discount in "
686
  msgstr ""
687
 
688
+ #: includes/pricing-rules.php:2719
689
  msgid "same product"
690
  msgstr ""
691
 
692
+ #: includes/pricing-rules.php:2721
693
  msgid "any cheapest one from cart"
694
  msgstr ""
695
 
696
+ #: includes/pricing-rules.php:2724
697
  msgid "any cheapest one of "
698
  msgstr ""
699
 
700
+ #: includes/pricing-rules.php:2729
701
  msgid " quantity of any "
702
  msgstr ""
703
 
704
+ #: includes/pricing-rules.php:2731
705
  msgid " cheapest item "
706
  msgstr ""
707
 
708
+ #: includes/pricing-rules.php:2734
709
  msgid " quantity of cheapest item "
710
  msgstr ""
711
 
712
+ #: includes/pricing-rules.php:2738
713
  msgid "from the category "
714
  msgstr ""
715
 
716
+ #: view/cart-rules.php:48
717
  msgid "Cart Rules"
718
  msgstr ""
719
 
720
+ #: view/cart-rules.php:52 view/pricing-rules.php:84
721
  msgid "View Examples"
722
  msgstr ""
723
 
724
+ #: view/cart-rules.php:53 view/documentation.php:21 view/pricing-rules.php:85
725
  msgid "Documentation"
726
  msgstr ""
727
 
728
+ #: view/cart-rules.php:63 view/pricing-rules.php:95
729
  msgid "You Reach Max. Rule Limit"
730
  msgstr ""
731
 
732
+ #: view/cart-rules.php:68 view/pricing-rules.php:99
733
  msgid "Add New Rule"
734
  msgstr ""
735
 
736
+ #: view/cart-rules.php:79 view/pricing-rules.php:109
737
  msgid "Bulk Actions"
738
  msgstr ""
739
 
740
+ #: view/cart-rules.php:80 view/pricing-rules.php:110
741
  msgid "Enable rules"
742
  msgstr ""
743
 
744
+ #: view/cart-rules.php:81 view/pricing-rules.php:111
745
  msgid "Disable rules"
746
  msgstr ""
747
 
748
+ #: view/cart-rules.php:82 view/pricing-rules.php:112
749
  msgid "Delete rules"
750
  msgstr ""
751
 
752
+ #: view/cart-rules.php:84 view/pricing-rules.php:114
753
  msgid "Apply"
754
  msgstr ""
755
 
756
+ #: view/cart-rules.php:98 view/cart-rules.php:193 view/pricing-rules.php:128
757
+ #: view/pricing-rules.php:223 view/template/discount-table.php:21
758
  msgid "Name"
759
  msgstr ""
760
 
761
+ #: view/cart-rules.php:99 view/cart-rules.php:194 view/pricing-rules.php:129
762
+ #: view/pricing-rules.php:224
763
  msgid "Start Date"
764
  msgstr ""
765
 
766
+ #: view/cart-rules.php:100 view/cart-rules.php:195 view/pricing-rules.php:130
767
+ #: view/pricing-rules.php:225
768
  msgid "Expired On"
769
  msgstr ""
770
 
771
+ #: view/cart-rules.php:101 view/cart-rules.php:196 view/pricing-rules.php:131
772
+ #: view/pricing-rules.php:226
773
  msgid "Status"
774
  msgstr ""
775
 
776
+ #: view/cart-rules.php:104 view/cart-rules.php:199 view/pricing-rules.php:134
777
+ #: view/pricing-rules.php:229
778
+ msgid "Language"
779
+ msgstr ""
780
+
781
+ #: view/cart-rules.php:109 view/cart-rules.php:204 view/pricing-rules.php:139
782
+ #: view/pricing-rules.php:234
783
  msgid "Order"
784
  msgstr ""
785
 
786
+ #: view/cart-rules.php:166 view/pricing-rules.php:196
787
  msgid "Edit"
788
  msgstr ""
789
 
790
+ #: view/cart-rules.php:177 view/pricing-rules.php:207
791
  msgid "Delete"
792
  msgstr ""
793
 
872
 
873
  #: view/includes/cart-menu.php:9 view/includes/sub-menu.php:9
874
  #: view/settings.php:26 view/view-cart-rules.php:64
875
+ #: view/view-pricing-rules.php:47
876
  msgid "General"
877
  msgstr ""
878
 
881
  msgstr ""
882
 
883
  #: view/includes/cart-menu.php:13 view/includes/sub-menu.php:13
884
+ #: view/template/discount-table.php:27 view/view-cart-rules.php:592
885
+ #: view/view-pricing-rules.php:631
886
  msgid "Discount"
887
  msgstr ""
888
 
915
  msgid "Condition"
916
  msgstr ""
917
 
918
+ #: view/pricing-rules.php:80
919
  msgid "Price Rules"
920
  msgstr ""
921
 
960
  msgstr ""
961
 
962
  #: view/settings.php:88 view/settings.php:105 view/settings.php:117
963
+ #: view/settings.php:130 view/settings.php:399 view/settings.php:411
964
+ #: view/settings.php:423 view/settings.php:610
965
  msgid "Yes"
966
  msgstr ""
967
 
968
  #: view/settings.php:89 view/settings.php:106 view/settings.php:118
969
+ #: view/settings.php:131 view/settings.php:400 view/settings.php:412
970
+ #: view/settings.php:424 view/settings.php:611
 
971
  msgid "No"
972
  msgstr ""
973
 
999
  msgid "Rule Setup for Price:"
1000
  msgstr ""
1001
 
1002
+ #: view/settings.php:156 view/settings.php:500
1003
  msgid "Apply first matched rule"
1004
  msgstr ""
1005
 
1006
+ #: view/settings.php:162 view/settings.php:164 view/settings.php:506
1007
+ #: view/settings.php:508
1008
  msgid "Apply all matched rules"
1009
  msgstr ""
1010
 
1011
+ #: view/settings.php:171 view/settings.php:173 view/settings.php:515
1012
+ #: view/settings.php:517
1013
  msgid "Apply biggest discount"
1014
  msgstr ""
1015
 
1016
+ #: view/settings.php:182
1017
+ msgid "Apply discount based on"
1018
+ msgstr ""
1019
+
1020
+ #: view/settings.php:189
1021
+ msgid "Sale price"
1022
+ msgstr ""
1023
+
1024
+ #: view/settings.php:192
1025
+ msgid "Regular price"
1026
+ msgstr ""
1027
+
1028
+ #: view/settings.php:197
1029
+ msgid ""
1030
+ "If sale price is not entered in your products, the regular price will be "
1031
+ "taken"
1032
+ msgstr ""
1033
+
1034
+ #: view/settings.php:206
1035
  msgid "Show Price discount on product page :"
1036
  msgstr ""
1037
 
1038
+ #: view/settings.php:215 view/settings.php:234 view/settings.php:332
1039
+ #: view/settings.php:350 view/settings.php:368 view/settings.php:386
1040
  msgid "Don't Show"
1041
  msgstr ""
1042
 
1043
+ #: view/settings.php:218 view/settings.php:237
1044
  msgid "It displays only if any rule matches"
1045
  msgstr ""
1046
 
1047
+ #: view/settings.php:225
1048
  msgid "Show Sale badge on product page :"
1049
  msgstr ""
1050
 
1051
+ #: view/settings.php:244 view/settings.php:251
1052
+ msgid "Customize sale tag"
1053
+ msgstr ""
1054
+
1055
+ #: view/settings.php:254 view/settings.php:533 view/view-pricing-rules.php:299
1056
+ #: view/view-pricing-rules.php:356 view/view-pricing-rules.php:426
1057
+ #: view/view-pricing-rules.php:472 view/view-pricing-rules.php:501
1058
+ msgid "Supported in PRO version"
1059
+ msgstr ""
1060
+
1061
+ #: view/settings.php:266
1062
+ msgid "Customize html for sale tag"
1063
+ msgstr ""
1064
+
1065
+ #: view/settings.php:273
1066
+ msgid "Eg:"
1067
+ msgstr ""
1068
+
1069
+ #: view/settings.php:284
1070
  msgid "Discount Table :"
1071
  msgstr ""
1072
 
1073
+ #: view/settings.php:293
1074
  msgid "Default layout"
1075
  msgstr ""
1076
 
1077
+ #: view/settings.php:296
1078
  msgid "Advance layout"
1079
  msgstr ""
1080
 
1081
+ #: view/settings.php:305
1082
  msgid "Table placement:"
1083
  msgstr ""
1084
 
1085
+ #: view/settings.php:311
1086
  msgid "Before cart form"
1087
  msgstr ""
1088
 
1089
+ #: view/settings.php:314
1090
  msgid "After cart form"
1091
  msgstr ""
1092
 
1093
+ #: view/settings.php:323
1094
  msgid "Table header :"
1095
  msgstr ""
1096
 
1097
+ #: view/settings.php:341
1098
  msgid "Title column on table :"
1099
  msgstr ""
1100
 
1101
+ #: view/settings.php:359
1102
  msgid "Range column on table :"
1103
  msgstr ""
1104
 
1105
+ #: view/settings.php:377
1106
  msgid "Discount column on table :"
1107
  msgstr ""
1108
 
1109
+ #: view/settings.php:394
1110
  msgid "Strikeout discount in cart item"
1111
  msgstr ""
1112
 
1113
+ #: view/settings.php:406
1114
  msgid "Auto add free product on coupon applied (For coupon based rules)"
1115
  msgstr ""
1116
 
1117
+ #: view/settings.php:418
1118
  msgid "Include variants when just parent product is chosen in the rules"
1119
  msgstr ""
1120
 
1121
+ #: view/settings.php:431
1122
  msgid "Display savings text"
1123
  msgstr ""
1124
 
1125
+ #: view/settings.php:440
1126
  msgid "On each line item"
1127
  msgstr ""
1128
 
1129
+ #: view/settings.php:443
1130
  msgid "On after total"
1131
  msgstr ""
1132
 
1133
+ #: view/settings.php:446
1134
  msgid "Both in line item and after total"
1135
  msgstr ""
1136
 
1137
+ #: view/settings.php:454
1138
  msgid "Savings text to show"
1139
  msgstr ""
1140
 
1141
+ #: view/settings.php:462
1142
  msgid "{{total_discount_price}} -> Total discount applied"
1143
  msgstr ""
1144
 
1145
+ #: view/settings.php:474
1146
  msgid "Cart rules settings"
1147
  msgstr ""
1148
 
1149
+ #: view/settings.php:481
1150
  msgid "Coupon Name to be displayed :"
1151
  msgstr ""
1152
 
1153
+ #: view/settings.php:487
1154
  msgid "Discount Coupon Name"
1155
  msgstr ""
1156
 
1157
+ #: view/settings.php:494
1158
  msgid "Rule Setup for Cart:"
1159
  msgstr ""
1160
 
1161
+ #: view/settings.php:526
1162
  msgid "Enable free shipping option"
1163
  msgstr ""
1164
 
1165
+ #: view/settings.php:546
 
 
 
 
 
 
1166
  msgid "Use Woocommerce free shipping"
1167
  msgstr ""
1168
 
1169
+ #: view/settings.php:549
1170
  msgid "Use Woo-Discount free shipping"
1171
  msgstr ""
1172
 
1173
+ #: view/settings.php:563
1174
  msgid "Free shipping text to be displayed"
1175
  msgstr ""
1176
 
1177
+ #: view/settings.php:570
1178
  msgid "Free Shipping title"
1179
  msgstr ""
1180
 
1181
+ #: view/settings.php:577
1182
  msgid "Draft"
1183
  msgstr ""
1184
 
1185
+ #: view/settings.php:587
1186
  msgid "Exclude Draft products in product select box."
1187
  msgstr ""
1188
 
1189
+ #: view/settings.php:597
1190
  msgid "Performance settings"
1191
  msgstr ""
1192
 
1193
+ #: view/settings.php:605
1194
  msgid "Enable cache for variable products table content"
1195
  msgstr ""
1196
 
1197
+ #: view/settings.php:617 view/settings.php:621
1198
  msgid "Clear cache"
1199
  msgstr ""
1200
 
1201
+ #: view/settings.php:631
1202
  msgid "Promotion settings"
1203
  msgstr ""
1204
 
1205
+ #: view/settings.php:638
1206
  msgid "Show a message on applying price rules in cart"
1207
  msgstr ""
1208
 
1209
+ #: view/settings.php:656 view/settings.php:691
1210
  msgid "Message"
1211
  msgstr ""
1212
 
1213
+ #: view/settings.php:664 view/settings.php:699
1214
  msgid "{{title}} -> Rule title"
1215
  msgstr ""
1216
 
1217
+ #: view/settings.php:665 view/settings.php:700
1218
  msgid "{{description}} -> Rule description"
1219
  msgstr ""
1220
 
1221
+ #: view/settings.php:673
1222
  msgid "Show a message on applying cart rules in cart"
1223
  msgstr ""
1224
 
1234
  msgid "Looking for more features? Upgrade to PRO"
1235
  msgstr ""
1236
 
1237
+ #: view/view-cart-rules.php:55 view/view-pricing-rules.php:38
1238
  msgid "Close and go back to list"
1239
  msgstr ""
1240
 
1246
  msgid "Edit Cart Rule"
1247
  msgstr ""
1248
 
1249
+ #: view/view-cart-rules.php:74 view/view-pricing-rules.php:57
1250
  msgid "This rule is not running currently: "
1251
  msgstr ""
1252
 
1253
+ #: view/view-cart-rules.php:83 view/view-pricing-rules.php:66
1254
  msgid "Priority :"
1255
  msgstr ""
1256
 
1257
+ #: view/view-cart-rules.php:85 view/view-pricing-rules.php:68
1258
  msgid ""
1259
  "The Simple Ranking concept to said, which one is going to execute first and "
1260
  "so on."
1261
  msgstr ""
1262
 
1263
+ #: view/view-cart-rules.php:97 view/view-pricing-rules.php:81
1264
  msgid "Rule Name"
1265
  msgstr ""
1266
 
1267
  #: view/view-cart-rules.php:99 view/view-cart-rules.php:111
1268
+ #: view/view-pricing-rules.php:83 view/view-pricing-rules.php:95
1269
  msgid "Rule Descriptions."
1270
  msgstr ""
1271
 
1272
+ #: view/view-cart-rules.php:104 view/view-pricing-rules.php:88
1273
  msgid "ex. Standard Rule."
1274
  msgstr ""
1275
 
1276
+ #: view/view-cart-rules.php:109 view/view-pricing-rules.php:93
1277
  msgid "Rule Description"
1278
  msgstr ""
1279
 
1280
+ #: view/view-cart-rules.php:120 view/view-pricing-rules.php:129
1281
  msgid "Validity"
1282
  msgstr ""
1283
 
1284
+ #: view/view-cart-rules.php:121 view/view-pricing-rules.php:130
1285
  msgid "Period of Rule Active. Format: month/day/Year Hour:Min"
1286
  msgstr ""
1287
 
1288
+ #: view/view-cart-rules.php:134 view/view-pricing-rules.php:143
1289
+ #: view/view-pricing-rules.php:575
1290
  msgid "From"
1291
  msgstr ""
1292
 
1294
  msgid "To"
1295
  msgstr ""
1296
 
1297
+ #: view/view-cart-rules.php:139 view/view-pricing-rules.php:148
1298
  #, php-format
1299
  msgid "Current date and time: %s"
1300
  msgstr ""
1301
 
1302
+ #: view/view-cart-rules.php:144 view/view-cart-rules.php:586
1303
+ #: view/view-pricing-rules.php:182 view/view-pricing-rules.php:624
1304
  msgid "Next"
1305
  msgstr ""
1306
 
1320
  msgid "Email with TLD (Eg: edu)"
1321
  msgstr ""
1322
 
1323
+ #: view/view-cart-rules.php:585 view/view-cart-rules.php:682
1324
+ #: view/view-pricing-rules.php:623 view/view-pricing-rules.php:821
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1325
  msgid "Previous"
1326
  msgstr ""
1327
 
1328
+ #: view/view-cart-rules.php:588
1329
  msgid "Guide to create cart rules"
1330
  msgstr ""
1331
 
1332
+ #: view/view-cart-rules.php:608
1333
  msgid "Discount Type :"
1334
  msgstr ""
1335
 
1336
+ #: view/view-cart-rules.php:627 view/view-cart-rules.php:629
1337
  msgid "Product Discount"
1338
  msgstr ""
1339
 
1340
+ #: view/view-cart-rules.php:636 view/view-cart-rules.php:638
1341
  msgid "Free shipping"
1342
  msgstr ""
1343
 
1344
+ #: view/view-cart-rules.php:647
1345
  msgid "value :"
1346
  msgstr ""
1347
 
1348
+ #: view/view-cart-rules.php:655
1349
  msgid "Select products :"
1350
  msgstr ""
1351
 
1352
+ #: view/view-cart-rules.php:669
1353
  msgid "Quantity :"
1354
  msgstr ""
1355
 
1356
+ #: view/view-pricing-rules.php:42
1357
  msgid "New Price Rule"
1358
  msgstr ""
1359
 
1360
+ #: view/view-pricing-rules.php:44
1361
  msgid "Edit Price Rule"
1362
  msgstr ""
1363
 
1364
+ #: view/view-pricing-rules.php:104
1365
  msgid "Method"
1366
  msgstr ""
1367
 
1368
+ #: view/view-pricing-rules.php:106
1369
  msgid "Method to Apply."
1370
  msgstr ""
1371
 
1372
+ #: view/view-pricing-rules.php:112
1373
  msgid ""
1374
  "Quantity / category / product / user role based discounts and BOGO deals "
1375
  msgstr ""
1376
 
1377
+ #: view/view-pricing-rules.php:119 view/view-pricing-rules.php:121
1378
  msgid "Dependent / conditional based discount (by individual product)"
1379
  msgstr ""
1380
 
1381
+ #: view/view-pricing-rules.php:147
1382
  msgid "To - Leave Empty if No Expiry"
1383
  msgstr ""
1384
 
1385
+ #: view/view-pricing-rules.php:158
1386
  msgid "Format for advanced table display option (see plugin settings)"
1387
  msgstr ""
1388
 
1389
+ #: view/view-pricing-rules.php:160
1390
  msgid "Used when advanced table display option is set in the plugin settings"
1391
  msgstr ""
1392
 
1393
+ #: view/view-pricing-rules.php:163
1394
  msgid "Buy {{min_quantity}} or more quantity and get {{discount}} as discount"
1395
  msgstr ""
1396
 
1397
+ #: view/view-pricing-rules.php:166
1398
  msgid "{{title}} -> Title"
1399
  msgstr ""
1400
 
1401
+ #: view/view-pricing-rules.php:167
1402
  msgid "{{description}} -> Description"
1403
  msgstr ""
1404
 
1405
+ #: view/view-pricing-rules.php:168
1406
  msgid "{{min_quantity}} -> Minimum quantity"
1407
  msgstr ""
1408
 
1409
+ #: view/view-pricing-rules.php:169
1410
  msgid "{{max_quantity}} -> Maximum quantity"
1411
  msgstr ""
1412
 
1413
+ #: view/view-pricing-rules.php:170
1414
  msgid "{{discount}} -> Discount"
1415
  msgstr ""
1416
 
1417
+ #: view/view-pricing-rules.php:171
1418
  msgid "{{discounted_price}} -> Discounted price"
1419
  msgstr ""
1420
 
1421
+ #: view/view-pricing-rules.php:172
1422
  msgid "{{condition}} -> Rule condition text"
1423
  msgstr ""
1424
 
1425
+ #: view/view-pricing-rules.php:187
1426
  msgid "Discount Conditions"
1427
  msgstr ""
1428
 
1429
+ #: view/view-pricing-rules.php:192
1430
  msgid "Apply To"
1431
  msgstr ""
1432
 
1433
+ #: view/view-pricing-rules.php:198
1434
  msgid "All products"
1435
  msgstr ""
1436
 
1437
+ #: view/view-pricing-rules.php:202
1438
  msgid "Specific products"
1439
  msgstr ""
1440
 
1441
+ #: view/view-pricing-rules.php:208 view/view-pricing-rules.php:210
1442
  msgid "Specific categories"
1443
  msgstr ""
1444
 
1445
+ #: view/view-pricing-rules.php:217 view/view-pricing-rules.php:219
1446
  msgid "Specific attributes"
1447
  msgstr ""
1448
 
1449
+ #: view/view-pricing-rules.php:230
1450
  msgid ""
1451
  "Check this box to count item quantities in cart cumulatively across products"
1452
  msgstr ""
1453
 
1454
+ #: view/view-pricing-rules.php:242
1455
  msgid "Check this box to count quantities cumulatively across category(ies)"
1456
  msgstr ""
1457
 
1458
+ #: view/view-pricing-rules.php:245
1459
  msgid "Check this box to apply child category(ies)"
1460
  msgstr ""
1461
 
1462
+ #: view/view-pricing-rules.php:259
1463
  msgid "Check this box to count quantities cumulatively across attribute"
1464
  msgstr ""
1465
 
1466
+ #: view/view-pricing-rules.php:269
1467
  msgid "Exclude products"
1468
  msgstr ""
1469
 
1470
+ #: view/view-pricing-rules.php:288
1471
  msgid "Exclude sale items"
1472
  msgstr ""
1473
 
1474
+ #: view/view-pricing-rules.php:293
1475
  msgid "Check this box if the rule should not apply to items on sale."
1476
  msgstr ""
1477
 
1478
+ #: view/view-pricing-rules.php:312
1479
  msgid "Customers"
1480
  msgstr ""
1481
 
1482
+ #: view/view-pricing-rules.php:317 view/view-pricing-rules.php:596
1483
  msgid "All"
1484
  msgstr ""
1485
 
1486
+ #: view/view-pricing-rules.php:324 view/view-pricing-rules.php:326
1487
  msgid "Only Given"
1488
  msgstr ""
1489
 
1490
+ #: view/view-pricing-rules.php:340
1491
  msgid "User roles"
1492
  msgstr ""
1493
 
1494
+ #: view/view-pricing-rules.php:345 view/view-pricing-rules.php:375
1495
+ #: view/view-pricing-rules.php:447 view/view-pricing-rules.php:490
1496
  msgid "Do not use"
1497
  msgstr ""
1498
 
1499
+ #: view/view-pricing-rules.php:367
1500
  msgid "Coupon"
1501
  msgstr ""
1502
 
1503
+ #: view/view-pricing-rules.php:376
1504
  msgid "Apply if any one coupon applied"
1505
  msgstr ""
1506
 
1507
+ #: view/view-pricing-rules.php:377
1508
  msgid "Apply if all coupon applied"
1509
  msgstr ""
1510
 
1511
+ #: view/view-pricing-rules.php:416
1512
  msgid "Make sure you have created the coupon already"
1513
  msgstr ""
1514
 
1515
+ #: view/view-pricing-rules.php:437
1516
  msgid "Subtotal"
1517
  msgstr ""
1518
 
1519
+ #: view/view-pricing-rules.php:448
1520
  msgid "Subtotal atleast"
1521
  msgstr ""
1522
 
1523
+ #: view/view-pricing-rules.php:453
1524
  msgid "Enter the amount"
1525
  msgstr ""
1526
 
1527
+ #: view/view-pricing-rules.php:463
1528
  msgid "Supported in WooCommerce 3.x"
1529
  msgstr ""
1530
 
1531
+ #: view/view-pricing-rules.php:567
 
 
 
 
 
 
 
 
1532
  msgid "Any"
1533
  msgstr ""
1534
 
1535
+ #: view/view-pricing-rules.php:568
1536
  msgid "Each"
1537
  msgstr ""
1538
 
1539
+ #: view/view-pricing-rules.php:569
1540
  msgid "Combine"
1541
  msgstr ""
1542
 
1543
+ #: view/view-pricing-rules.php:572
1544
  msgid "More than"
1545
  msgstr ""
1546
 
1547
+ #: view/view-pricing-rules.php:573
1548
  msgid "Less than"
1549
  msgstr ""
1550
 
1551
+ #: view/view-pricing-rules.php:574
1552
  msgid "Equal"
1553
  msgstr ""
1554
 
1555
+ #: view/view-pricing-rules.php:577 view/view-pricing-rules.php:580
1556
+ #: view/view-pricing-rules.php:600
1557
  msgid "Quantity"
1558
  msgstr ""
1559
 
1560
+ #: view/view-pricing-rules.php:579
1561
  msgid "to"
1562
  msgstr ""
1563
 
1564
+ #: view/view-pricing-rules.php:583
1565
  msgid "Product(s) from"
1566
  msgstr ""
1567
 
1568
+ #: view/view-pricing-rules.php:589
1569
  msgid "Apply discount in product(s)"
1570
  msgstr ""
1571
 
1572
+ #: view/view-pricing-rules.php:590
1573
  msgid "Apply discount in category(ies)"
1574
  msgstr ""
1575
 
1576
+ #: view/view-pricing-rules.php:594
1577
  msgid "and get discount in "
1578
  msgstr ""
1579
 
1580
+ #: view/view-pricing-rules.php:597
1581
  msgid "First quantity(s)"
1582
  msgstr ""
1583
 
1584
+ #: view/view-pricing-rules.php:598
1585
  msgid "Skip first quantity(s)"
1586
  msgstr ""
1587
 
1588
+ #: view/view-pricing-rules.php:603
1589
  msgid " Product(s) "
1590
  msgstr ""
1591
 
1592
+ #: view/view-pricing-rules.php:607
1593
  msgid "Category(ies)"
1594
  msgstr ""
1595
 
1596
+ #: view/view-pricing-rules.php:618
1597
  msgid "Guide for product dependent rules"
1598
  msgstr ""
1599
 
1600
+ #: view/view-pricing-rules.php:634
1601
  msgid "Add New Range"
1602
  msgstr ""
1603
 
1604
+ #: view/view-pricing-rules.php:804
1605
  msgid "Guide to create perfect BOGO rules"
1606
  msgstr ""
1607
 
1608
+ #: view/view-pricing-rules.php:814
1609
  msgid "Percent"
1610
  msgstr ""
1611
 
1612
+ #: view/view-pricing-rules.php:815
1613
  msgid "Fixed"
1614
  msgstr ""
includes/cart-rules.php CHANGED
@@ -163,15 +163,23 @@ if (!class_exists('FlycartWooDiscountRulesCartRules')) {
163
  $request['status'] = 'publish';
164
  }
165
  $request['rule_order'] = FlycartWooDiscountRulesGeneralHelper::reOrderRuleIfExists($id, $request['rule_order'], $this->post_type);
166
-
 
167
  foreach ($request['discount_rule'] as $index => $value) {
 
 
 
 
 
 
 
168
  $request['discount_rule'][$index] = FlycartWooDiscountRulesGeneralHelper::makeString($value);
169
  }
170
 
171
  if (isset($request['discount_rule'])) $request['discount_rule'] = json_encode($request['discount_rule']);
172
 
173
  if (is_null($id) || !isset($id)) return false;
174
-
175
  $request['wpml_language'] = FlycartWooDiscountRulesGeneralHelper::getWPMLLanguage();
176
 
177
  foreach ($request as $index => $value) {
@@ -314,7 +322,7 @@ if (!class_exists('FlycartWooDiscountRulesCartRules')) {
314
  * @param string $old_coupon_code Existing Coupon
315
  * @return array|bool
316
  */
317
- public function addVirtualCoupon($unknown_param, $old_coupon_code)
318
  {
319
  $coupon_code = $this->coupon_code;
320
  // Getting Coupon Remove status from Session.
@@ -364,9 +372,11 @@ if (!class_exists('FlycartWooDiscountRulesCartRules')) {
364
  }
365
  return $coupon;
366
  }
 
 
367
  }
368
 
369
- public function addVirtualCouponForBOGO($unknown_param, $old_coupon_code)
370
  {
371
  $bogo_coupon_codes = $this->bogo_coupon_codes;
372
  $coupon_codes = array_keys($bogo_coupon_codes);
@@ -407,6 +417,8 @@ if (!class_exists('FlycartWooDiscountRulesCartRules')) {
407
  }
408
  return $coupon;
409
  }
 
 
410
  }
411
 
412
  /**
@@ -1511,7 +1523,7 @@ if (!class_exists('FlycartWooDiscountRulesCartRules')) {
1511
  // Iterate over all cart items and
1512
  foreach ($this->cart_items as $cart_item_key => $cart_item) {
1513
  $quantity = (isset($cart_item['quantity']) && $cart_item['quantity']) ? $cart_item['quantity'] : 1;
1514
- $cart_subtotal += ((float)FlycartWoocommerceProduct::get_price($cart_item['data'])) * $quantity;
1515
  }
1516
 
1517
  $this->sub_total = (float)$cart_subtotal;
@@ -1528,7 +1540,7 @@ if (!class_exists('FlycartWooDiscountRulesCartRules')) {
1528
 
1529
  //total should be specific to the products from certan categories
1530
  $quantity = (isset($cart_item['quantity']) && $cart_item['quantity']) ? $cart_item['quantity'] : 1;
1531
- $cart_subtotal += FlycartWoocommerceProduct::get_price($cart_item['data']) * $quantity;
1532
  }
1533
 
1534
  }
@@ -1607,7 +1619,7 @@ if (!class_exists('FlycartWooDiscountRulesCartRules')) {
1607
  continue;
1608
  }
1609
  $product_id = FlycartWoocommerceProduct::get_id($cart_item['data']);
1610
- $added_products[$product_id] = array('item_name'=> FlycartWoocommerceProduct::get_name($cart_item['data']), 'item_quantity' => $cart_item['quantity'], 'item' => $cart_item_key, 'item_price' => FlycartWoocommerceProduct::get_price($cart_item['data']));
1611
  }
1612
  foreach ($product_ids as $discounted_product_id) {
1613
  $discounted_price=0;
@@ -1627,8 +1639,9 @@ if (!class_exists('FlycartWooDiscountRulesCartRules')) {
1627
  $product = FlycartWoocommerceProduct::wc_get_product($discounted_product_id);
1628
  if($product) {
1629
  FlycartWoocommerceCart::add_to_cart($discounted_product_id, $discount_quantity);
1630
- $discounted_price = ($discount_quantity * FlycartWoocommerceProduct::get_price($product));
1631
- $coupon_msg = str_replace(array('{{product_name}}', '{{quantity}}'), array(FlycartWoocommerceProduct::get_name($product), $discount_quantity), $rule_text);
 
1632
  $this->bogo_coupon_codes[wc_strtolower($coupon_msg)] = array('product_id'=>$discounted_product_id,'amount'=>$discounted_price);
1633
  }
1634
  }
@@ -1674,7 +1687,7 @@ if (!class_exists('FlycartWooDiscountRulesCartRules')) {
1674
  foreach ($this->cart_items as $cart_items){
1675
  $product_id = FlycartWoocommerceProduct::get_id($cart_items['data']);
1676
  $cart[$product_id]['quantity'] = $cart_items['quantity'];
1677
- $cart[$product_id]['price'] = FlycartWoocommerceProduct::get_price($cart_items['data']);
1678
  $cart[$product_id]['subtotal'] = $cart[$product_id]['price'] * $cart[$product_id]['quantity'];
1679
  }
1680
  $discounted_products = (isset($rule_set->cart_discounted_products)) ? $rule_set->cart_discounted_products : '[]';
@@ -1686,7 +1699,7 @@ if (!class_exists('FlycartWooDiscountRulesCartRules')) {
1686
  $free_line_item += 1;
1687
  $free_quantity += $rule_discount_quantity;
1688
  $product = FlycartWoocommerceProduct::wc_get_product($discounted_product_id);
1689
- $product_price = FlycartWoocommerceProduct::get_price($product);
1690
  $free_item_price += $product_price;
1691
  }
1692
  }
163
  $request['status'] = 'publish';
164
  }
165
  $request['rule_order'] = FlycartWooDiscountRulesGeneralHelper::reOrderRuleIfExists($id, $request['rule_order'], $this->post_type);
166
+ $coupons_used = array();
167
+ $coupon_keys = array('coupon_applied_any_one','coupon_applied_all_selected');
168
  foreach ($request['discount_rule'] as $index => $value) {
169
+ foreach ($coupon_keys as $coupon_key){
170
+ if(isset($value[$coupon_key]) && !empty($value[$coupon_key])){
171
+ if(is_array($value[$coupon_key])){
172
+ $coupons_used = array_merge($coupons_used, $value[$coupon_key]);
173
+ }
174
+ }
175
+ }
176
  $request['discount_rule'][$index] = FlycartWooDiscountRulesGeneralHelper::makeString($value);
177
  }
178
 
179
  if (isset($request['discount_rule'])) $request['discount_rule'] = json_encode($request['discount_rule']);
180
 
181
  if (is_null($id) || !isset($id)) return false;
182
+ FlycartWooDiscountRulesGeneralHelper::resetUsedCoupons($id, $coupons_used);
183
  $request['wpml_language'] = FlycartWooDiscountRulesGeneralHelper::getWPMLLanguage();
184
 
185
  foreach ($request as $index => $value) {
322
  * @param string $old_coupon_code Existing Coupon
323
  * @return array|bool
324
  */
325
+ public function addVirtualCoupon($response, $old_coupon_code)
326
  {
327
  $coupon_code = $this->coupon_code;
328
  // Getting Coupon Remove status from Session.
372
  }
373
  return $coupon;
374
  }
375
+
376
+ return $response;
377
  }
378
 
379
+ public function addVirtualCouponForBOGO($response, $old_coupon_code)
380
  {
381
  $bogo_coupon_codes = $this->bogo_coupon_codes;
382
  $coupon_codes = array_keys($bogo_coupon_codes);
417
  }
418
  return $coupon;
419
  }
420
+
421
+ return $response;
422
  }
423
 
424
  /**
1523
  // Iterate over all cart items and
1524
  foreach ($this->cart_items as $cart_item_key => $cart_item) {
1525
  $quantity = (isset($cart_item['quantity']) && $cart_item['quantity']) ? $cart_item['quantity'] : 1;
1526
+ $cart_subtotal += ((float)FlycartWoocommerceProduct::get_price($cart_item['data'], true)) * $quantity;
1527
  }
1528
 
1529
  $this->sub_total = (float)$cart_subtotal;
1540
 
1541
  //total should be specific to the products from certan categories
1542
  $quantity = (isset($cart_item['quantity']) && $cart_item['quantity']) ? $cart_item['quantity'] : 1;
1543
+ $cart_subtotal += FlycartWoocommerceProduct::get_price($cart_item['data'], true) * $quantity;
1544
  }
1545
 
1546
  }
1619
  continue;
1620
  }
1621
  $product_id = FlycartWoocommerceProduct::get_id($cart_item['data']);
1622
+ $added_products[$product_id] = array('item_name'=> FlycartWoocommerceProduct::get_name($cart_item['data']), 'item_quantity' => $cart_item['quantity'], 'item' => $cart_item_key, 'item_price' => FlycartWoocommerceProduct::get_price($cart_item['data'], true));
1623
  }
1624
  foreach ($product_ids as $discounted_product_id) {
1625
  $discounted_price=0;
1639
  $product = FlycartWoocommerceProduct::wc_get_product($discounted_product_id);
1640
  if($product) {
1641
  FlycartWoocommerceCart::add_to_cart($discounted_product_id, $discount_quantity);
1642
+ do_action('woo_discount_rules_cart_rules_after_adding_free_product_to_cart');
1643
+ $discounted_price = ($discount_quantity * FlycartWoocommerceProduct::get_price($product, true));
1644
+ $coupon_msg = str_replace(array('{{product_name}}', '{{quantity}}'), array(FlycartWoocommerceProduct::get_name($product, true), $discount_quantity), $rule_text);
1645
  $this->bogo_coupon_codes[wc_strtolower($coupon_msg)] = array('product_id'=>$discounted_product_id,'amount'=>$discounted_price);
1646
  }
1647
  }
1687
  foreach ($this->cart_items as $cart_items){
1688
  $product_id = FlycartWoocommerceProduct::get_id($cart_items['data']);
1689
  $cart[$product_id]['quantity'] = $cart_items['quantity'];
1690
+ $cart[$product_id]['price'] = FlycartWoocommerceProduct::get_price($cart_items['data'], true);
1691
  $cart[$product_id]['subtotal'] = $cart[$product_id]['price'] * $cart[$product_id]['quantity'];
1692
  }
1693
  $discounted_products = (isset($rule_set->cart_discounted_products)) ? $rule_set->cart_discounted_products : '[]';
1699
  $free_line_item += 1;
1700
  $free_quantity += $rule_discount_quantity;
1701
  $product = FlycartWoocommerceProduct::wc_get_product($discounted_product_id);
1702
+ $product_price = FlycartWoocommerceProduct::get_price($product, true);
1703
  $free_item_price += $product_price;
1704
  }
1705
  }
includes/discount-base.php CHANGED
@@ -26,6 +26,8 @@ if (!class_exists('FlycartWooDiscountBase')) {
26
 
27
  public $has_free_shipping = 0;
28
 
 
 
29
  /**
30
  * FlycartWooDiscountBase constructor.
31
  */
@@ -52,6 +54,14 @@ if (!class_exists('FlycartWooDiscountBase')) {
52
  return $instance;
53
  }
54
 
 
 
 
 
 
 
 
 
55
  /**
56
  * Managing discount of Price and Cart.
57
  */
@@ -263,6 +273,72 @@ if (!class_exists('FlycartWooDiscountBase')) {
263
  die();
264
  }
265
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
266
  /**
267
  * Making the reliable end data to store.
268
  *
@@ -814,6 +890,7 @@ if (!class_exists('FlycartWooDiscountBase')) {
814
  wp_enqueue_style('woo_discount_style_select');
815
 
816
  wp_enqueue_script('woo_discount_script_select', WOO_DISCOUNT_URI . '/assets/js/bootstrap.select.min.js', array(), WOO_DISCOUNT_VERSION);
 
817
 
818
  wp_register_style('woo_discount_bootstrap', WOO_DISCOUNT_URI . '/assets/css/bootstrap.min.css', array(), WOO_DISCOUNT_VERSION);
819
  wp_enqueue_style('woo_discount_bootstrap');
@@ -944,6 +1021,7 @@ if (!class_exists('FlycartWooDiscountBase')) {
944
  'are_you_sure_to_delete' => esc_html__('Are you sure to remove the selected rules', 'woo-discount-rules'),
945
  'choose_products' => esc_html__('Choose product(s)', 'woo-discount-rules'),
946
  'choose_categories' => esc_html__('Choose category(ies)', 'woo-discount-rules'),
 
947
  'discount_product_option_tooltip' => esc_html__("Auto add all selected products - Automatically added to the cart <br> Same product - get discount in same product <br> Any one cheapest from selected - Get discount in one selected product <br> Any one cheapest from all products - Get discount in one cheapest product in cart <br> Cheapest in cart - selected category(ies) - cheapest product from the selected category will be discounted <br> Cheapest in cart - selected item(s) - get discount in chosen no.of quantities", 'woo-discount-rules'),
948
  );
949
  }
26
 
27
  public $has_free_shipping = 0;
28
 
29
+ protected static $self_instance;
30
+
31
  /**
32
  * FlycartWooDiscountBase constructor.
33
  */
54
  return $instance;
55
  }
56
 
57
+ public static function get_instance(){
58
+ if (empty(self::$self_instance))
59
+ {
60
+ self::$self_instance = new self();
61
+ }
62
+ return self::$self_instance;
63
+ }
64
+
65
  /**
66
  * Managing discount of Price and Cart.
67
  */
273
  die();
274
  }
275
 
276
+ /**
277
+ * load coupons
278
+ *
279
+ * @return bool
280
+ */
281
+ public function loadCoupons() {
282
+ $postData = \FlycartInput\FInput::getInstance();
283
+ $request = $postData->getArray();
284
+ $page = isset($request['page'])? $request['page']: 1;
285
+ $query = isset($request['q'])? $request['q']: '';
286
+ $args = array( 'posts_per_page' => 30, 's' => $query,
287
+ 'paged' => $page, 'post_type' => 'shop_coupon' );
288
+ $posts = get_posts($args);
289
+ echo json_encode($posts);
290
+ die();
291
+ }
292
+
293
+ /**
294
+ * Get coupon options
295
+ *
296
+ * @param array $selected
297
+ * @return string
298
+ * */
299
+ public static function loadSelectedCouponOptions($selected){
300
+ $html_options = '';
301
+ if(!empty($selected) && is_array($selected)){
302
+ $args = array( 'numberposts' => '-1', 'post_type' => 'shop_coupon', 'post_name__in' => $selected);
303
+ $posts = get_posts($args);
304
+ if(!empty($posts)){
305
+ if(count($posts)){
306
+ foreach ($posts as $post){
307
+ $html_options .= '<option value="'.$post->post_name.'" selected="selected">'.$post->post_title.'</option>';
308
+ }
309
+ }
310
+ }
311
+ }
312
+
313
+ return $html_options;
314
+ }
315
+
316
+ /**
317
+ * Get coupon count
318
+ *
319
+ * @return int
320
+ * */
321
+ public static function getWooCommerceCouponCount(){
322
+ $count = wp_count_posts( 'shop_coupon' );
323
+ $coupon_count = 0;
324
+ if(!empty($count) && isset($count->publish)){
325
+ if(!empty($count->publish)){
326
+ $coupon_count = $count->publish;
327
+ }
328
+ }
329
+
330
+ return $coupon_count;
331
+ }
332
+
333
+ /**
334
+ * Has large number of coupons
335
+ * */
336
+ public static function hasLargeNumberOfCoupon(){
337
+ $count = self::getWooCommerceCouponCount();
338
+ if($count > 50) return true;
339
+ return false;
340
+ }
341
+
342
  /**
343
  * Making the reliable end data to store.
344
  *
890
  wp_enqueue_style('woo_discount_style_select');
891
 
892
  wp_enqueue_script('woo_discount_script_select', WOO_DISCOUNT_URI . '/assets/js/bootstrap.select.min.js', array(), WOO_DISCOUNT_VERSION);
893
+ wp_enqueue_script('woo_discount_script_select2', WOO_DISCOUNT_URI . '/assets/js/select2.min.js', array(), WOO_DISCOUNT_VERSION);
894
 
895
  wp_register_style('woo_discount_bootstrap', WOO_DISCOUNT_URI . '/assets/css/bootstrap.min.css', array(), WOO_DISCOUNT_VERSION);
896
  wp_enqueue_style('woo_discount_bootstrap');
1021
  'are_you_sure_to_delete' => esc_html__('Are you sure to remove the selected rules', 'woo-discount-rules'),
1022
  'choose_products' => esc_html__('Choose product(s)', 'woo-discount-rules'),
1023
  'choose_categories' => esc_html__('Choose category(ies)', 'woo-discount-rules'),
1024
+ 'coupon_select_box_placeholder' => esc_html__('Search for a coupon', 'woo-discount-rules'),
1025
  'discount_product_option_tooltip' => esc_html__("Auto add all selected products - Automatically added to the cart <br> Same product - get discount in same product <br> Any one cheapest from selected - Get discount in one selected product <br> Any one cheapest from all products - Get discount in one cheapest product in cart <br> Cheapest in cart - selected category(ies) - cheapest product from the selected category will be discounted <br> Cheapest in cart - selected item(s) - get discount in chosen no.of quantities", 'woo-discount-rules'),
1026
  );
1027
  }
includes/pricing-rules.php CHANGED
@@ -75,6 +75,7 @@ if (!class_exists('FlycartWooDiscountRulesPricingRules')) {
75
  public static $product_categories = array();
76
  public static $product_attributes = array();
77
  public static $product_on_sale = array();
 
78
  public static $product_has_strike_out = array();
79
  public static $product_strike_out_price = array();
80
 
@@ -277,10 +278,13 @@ if (!class_exists('FlycartWooDiscountRulesPricingRules')) {
277
  $request['product_based_condition'] = '{}';
278
  $request['product_based_discount'] = '{}';
279
  }
280
-
281
  if(!isset($request['product_to_exclude'])) $request['product_to_exclude'] = array();
282
  if(!isset($request['coupons_to_apply'])) $request['coupons_to_apply'] = '';
283
  if(!empty($request['coupons_to_apply'])){
 
 
 
284
  $request['coupons_to_apply'] = implode(',', $request['coupons_to_apply']);
285
  }
286
 
@@ -288,6 +292,7 @@ if (!class_exists('FlycartWooDiscountRulesPricingRules')) {
288
  $request['wpml_language'] = FlycartWooDiscountRulesGeneralHelper::getWPMLLanguage();
289
 
290
  if (is_null($id) || !isset($id)) return false;
 
291
  foreach ($request as $index => $value) {
292
  if (in_array($index, $form)) {
293
  if (get_post_meta($id, $index)) {
@@ -1150,7 +1155,10 @@ if (!class_exists('FlycartWooDiscountRulesPricingRules')) {
1150
  $hasBOGO = 1;
1151
  }
1152
  }
1153
- if($hasBOGO) continue;
 
 
 
1154
  }
1155
  }
1156
  }
@@ -1177,7 +1185,7 @@ if (!class_exists('FlycartWooDiscountRulesPricingRules')) {
1177
  if(isset($rule['type']['is_cumulative']) && $rule['type']['is_cumulative']){
1178
  $totalQuantityInThisCategory = $this->getProductQuantityInThisCategory($rule['type']['specific_category'], $rule['product_to_exclude'], $rule['exclude_sale_items']);
1179
  if($product_page && !$bogo){
1180
- $quantity = $quantity+$totalQuantityInThisCategory;
1181
  } else {
1182
  $quantity = $totalQuantityInThisCategory;
1183
  }
@@ -1214,7 +1222,7 @@ if (!class_exists('FlycartWooDiscountRulesPricingRules')) {
1214
  if(isset($rule['type']['is_cumulative']) && $rule['type']['is_cumulative']){
1215
  $totalQuantityInThisAttribute = $this->getProductQuantityInThisAttribute($rule['type']['specific_attribute'], $rule['product_to_exclude'], $rule['exclude_sale_items'], $id);
1216
  if($product_page && !$bogo){
1217
- $quantity = $quantity+$totalQuantityInThisAttribute;
1218
  } else {
1219
  $quantity = $totalQuantityInThisAttribute;
1220
  }
@@ -1247,10 +1255,10 @@ if (!class_exists('FlycartWooDiscountRulesPricingRules')) {
1247
  case 'all_products':
1248
  default:
1249
  $is_not_in_exclude_sale_items = !$this->isItemInSaleItems($rule['exclude_sale_items'], $item['data']);
1250
- if (!$this->isItemInProductList($rule['product_to_exclude'], $item) && $is_not_in_exclude_sale_items) {
1251
- if(isset($rule['is_cumulative_for_products']) && $rule['is_cumulative_for_products']){
1252
  if($bogo) $quantity = $this->getProductQuantityForCumulativeProducts($item, 0, $rule);
1253
- else $quantity = $this->getProductQuantityForCumulativeProducts($item, $product_page, $rule);
1254
  }
1255
  $discount_amount = $this->getAdjustmentAmount($item, $quantity, $this->array_first($rule['discount']), $product_page, $bogo, $rule['product_to_exclude']);
1256
  $applied_rules[$i] = $this->formatRulesToApply($discount_amount, $rule['name'], $index, $item['product_id'], $id);
@@ -3058,8 +3066,14 @@ if (!class_exists('FlycartWooDiscountRulesPricingRules')) {
3058
  $original_product = FlycartWoocommerceProduct::wc_get_product($product_id);
3059
  if(isset($product->woo_discount_rules_applied) && $product->woo_discount_rules_applied) return ;
3060
  }
3061
-
3062
- $original_price_to_display = get_option('woocommerce_tax_display_cart') == 'excl' ? FlycartWoocommerceProduct::get_price_excluding_tax($original_product) : FlycartWoocommerceProduct::get_price_including_tax($original_product);
 
 
 
 
 
 
3063
  $original_price = FlycartWoocommerceProduct::get_price($original_product);
3064
  // Log changes
3065
  $woocommerce->cart->cart_contents[$item]['woo_discount'] = array(
@@ -3080,13 +3094,23 @@ if (!class_exists('FlycartWooDiscountRulesPricingRules')) {
3080
  }
3081
  }
3082
  }
 
 
3083
  //for future reference
3084
  $discount_amount = $original_price - $amount;
 
 
 
3085
  $woocommerce->cart->cart_contents[$item]['woo_discount']['discounted_price_per_product'] = $amount;
3086
  $woocommerce->cart->cart_contents[$item]['woo_discount']['discounted_price_total'] = $amount * $woocommerce->cart->cart_contents[$item]['quantity'];
3087
  $woocommerce->cart->cart_contents[$item]['woo_discount']['discount_amount'] = $discount_amount;
3088
  $woocommerce->cart->cart_contents[$item]['woo_discount']['discount_amount_total'] = $discount_amount * $woocommerce->cart->cart_contents[$item]['quantity'];
3089
 
 
 
 
 
 
3090
  // Actually adjust price in cart
3091
  // $woocommerce->cart->cart_contents[$item]['data']->price = $amount;
3092
  FlycartWoocommerceProduct::set_price($product, $amount);
@@ -3165,7 +3189,7 @@ if (!class_exists('FlycartWooDiscountRulesPricingRules')) {
3165
  $hasToRunMultipleStrikeOut = $this->hasToSplitTheStrikeOutInCart($cart_item, $additional_details);
3166
  }
3167
  if($hasToRunMultipleStrikeOut){
3168
- $item_price_first = '<div style="float: left;"><span class="cart_price">' . $original_price_to_display . '</span></div>';
3169
  $item_price = '';
3170
  $haslimitedDiscount = 0;
3171
  foreach ($additional_details as $key => $additional_detail){
@@ -3185,7 +3209,7 @@ if (!class_exists('FlycartWooDiscountRulesPricingRules')) {
3185
  $new_price_to_display = FlycartWoocommerceProduct::wc_price($new_price_to_display);
3186
  $quantity -= $additional_detail['discount_quantity'];
3187
  $item_price .= '<div style="float: left;">';
3188
- $item_price .= '<span class="cart_price"><del>' . $original_price_to_display . '</del> <ins>' . $new_price_to_display . '</ins></span>';
3189
  $item_price .= '</div>';
3190
  $item_price .= '<div style="float: right; padding-left: 1em;">';
3191
  $item_price .= 'x '.$additional_detail['discount_quantity'];
@@ -3201,15 +3225,15 @@ if (!class_exists('FlycartWooDiscountRulesPricingRules')) {
3201
  }
3202
 
3203
  if($quantity <= 0 || !$haslimitedDiscount){
3204
- $item_price = '<span class="cart_price"><del>' . $original_price_to_display . '</del> <ins>' . $price_to_display . '</ins></span>';
3205
  } else {
3206
  $item_price = $item_price_first.$item_price;
3207
  }
3208
  } else {
3209
- $item_price = '<span class="cart_price"><del>' . $original_price_to_display . '</del> <ins>' . $price_to_display . '</ins></span>';
3210
  }
3211
  } else {
3212
- $item_price = '<span class="cart_price"><del>' . $original_price_to_display . '</del> <ins>' . $price_to_display . '</ins></span>';
3213
  }
3214
  $item_price_cont = '<div style="display: inline-block;" class="woo-discount-rules-cart-strikeout-con">';
3215
  $item_price_cont .= $item_price;
@@ -3285,7 +3309,7 @@ if (!class_exists('FlycartWooDiscountRulesPricingRules')) {
3285
  self::$product_has_strike_out[$product_id]['new_strikeout_html'] = ($price_to_display).$product->get_price_suffix($discountPrice);
3286
  $item_price = preg_replace('/<del>.*<\/del>/', '', $item_price);
3287
  $item_price = apply_filters('woo_discount_rules_price_strikeout_before_discount_price', $item_price, $product);
3288
- $item_price = '<span class="cart_price"><del>' . $item_price . '</del> <ins>' . ($price_to_display).$product->get_price_suffix($discountPrice) . '</ins></span>';
3289
  $item_price = apply_filters('woo_discount_rules_price_strikeout_after_discount_price', $item_price, $product);
3290
  }
3291
  }
@@ -3294,6 +3318,28 @@ if (!class_exists('FlycartWooDiscountRulesPricingRules')) {
3294
  return $item_price;
3295
  }
3296
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3297
  /**
3298
  * Replace visible price if rule matches Optimized
3299
  * */
@@ -3320,6 +3366,17 @@ if (!class_exists('FlycartWooDiscountRulesPricingRules')) {
3320
  }
3321
  }
3322
 
 
 
 
 
 
 
 
 
 
 
 
3323
  $notAdmin = FlycartWooDiscountRulesGeneralHelper::doIHaveToRun();
3324
  $show_price_discount_on_product_page = (isset($this->baseConfig['show_price_discount_on_product_page']))? $this->baseConfig['show_price_discount_on_product_page']: 'show';
3325
  if($show_price_discount_on_product_page == 'show' && ($notAdmin || $runTheRulesEvenInAjax)){
@@ -3331,7 +3388,7 @@ if (!class_exists('FlycartWooDiscountRulesPricingRules')) {
3331
  if(self::$product_has_strike_out[$product_id]['has_strikeout'] && !empty(self::$product_has_strike_out[$product_id]['new_strikeout_html'])){
3332
  $item_price = preg_replace('/<del>.*<\/del>/', '', $item_price);
3333
  $item_price = apply_filters('woo_discount_rules_price_strikeout_before_discount_price', $item_price, $product);
3334
- $item_price = '<span class="cart_price"><del>' . $item_price . '</del> <ins>' . (self::$product_has_strike_out[$product_id]['new_strikeout_html']) . '</ins></span>';
3335
  $item_price = apply_filters('woo_discount_rules_price_strikeout_after_discount_price', $item_price, $product);
3336
  }
3337
  } else {
@@ -3370,6 +3427,15 @@ if (!class_exists('FlycartWooDiscountRulesPricingRules')) {
3370
  $on_sale = $this->displayProductIsOnSaleTag($on_sale, $product);
3371
  }
3372
  }
 
 
 
 
 
 
 
 
 
3373
  }
3374
  return $on_sale;
3375
  }
@@ -3387,6 +3453,75 @@ if (!class_exists('FlycartWooDiscountRulesPricingRules')) {
3387
  }
3388
  }
3389
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3390
  public function checkForHighestVariantIfExists($product, $price_to_display, &$show_original){
3391
  $display_only_lowest_price = apply_filters('woo_discount_rules_load_minimum_product_variant_price', false, $product);
3392
  $tax_display_mode = get_option( 'woocommerce_tax_display_shop' );
@@ -3690,8 +3825,15 @@ if (!class_exists('FlycartWooDiscountRulesPricingRules')) {
3690
 
3691
  $product_id = FlycartWoocommerceProduct::get_id($cart_item);
3692
  $adjustment_set = $this->matched_sets[$cart_item_key];
 
3693
  if(!($price > 0)){
3694
- $price = get_option('woocommerce_tax_display_shop') == 'excl' ? FlycartWoocommerceProduct::get_price_excluding_tax($cart_item) : FlycartWoocommerceProduct::get_price_including_tax($cart_item);
 
 
 
 
 
 
3695
  }
3696
 
3697
  if(!($price > 0)){
@@ -3700,7 +3842,12 @@ if (!class_exists('FlycartWooDiscountRulesPricingRules')) {
3700
  if(isset($children[0])){
3701
  $product = FlycartWoocommerceProduct::wc_get_product($children[0]);
3702
  $product_id = FlycartWoocommerceProduct::get_id($product);
3703
- $price = get_option('woocommerce_tax_display_shop') == 'excl' ? FlycartWoocommerceProduct::get_price_excluding_tax($product) : FlycartWoocommerceProduct::get_price_including_tax($product);
 
 
 
 
 
3704
  }
3705
  }
3706
  }
@@ -3814,10 +3961,9 @@ if (!class_exists('FlycartWooDiscountRulesPricingRules')) {
3814
  $subtotal_additional_text = '<span class="wdr_you_saved_con">';
3815
  $config = new FlycartWooDiscountBase();
3816
  $display_you_saved_string = $config->getConfigData('display_you_saved_text_value', " You saved: {{total_discount_price}}");
3817
- $display_you_saved_string = esc_html__($display_you_saved_string, 'woo-discount-rules');
3818
- $subtotal_additional_text .= str_replace('{{total_discount_price}}', $total_discounted_price, $display_you_saved_string);
3819
  $subtotal_additional_text .= '</span>';
3820
-
3821
  return $subtotal_additional_text;
3822
  }
3823
 
@@ -3881,5 +4027,19 @@ if (!class_exists('FlycartWooDiscountRulesPricingRules')) {
3881
  }
3882
  }
3883
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3884
  }
3885
  }
75
  public static $product_categories = array();
76
  public static $product_attributes = array();
77
  public static $product_on_sale = array();
78
+ public static $product_on_sale_details = array();
79
  public static $product_has_strike_out = array();
80
  public static $product_strike_out_price = array();
81
 
278
  $request['product_based_condition'] = '{}';
279
  $request['product_based_discount'] = '{}';
280
  }
281
+ $coupons_used = array();
282
  if(!isset($request['product_to_exclude'])) $request['product_to_exclude'] = array();
283
  if(!isset($request['coupons_to_apply'])) $request['coupons_to_apply'] = '';
284
  if(!empty($request['coupons_to_apply'])){
285
+ if(isset($request['coupons_to_apply_option']) && $request['coupons_to_apply_option'] != 'none'){
286
+ $coupons_used = $request['coupons_to_apply'];
287
+ }
288
  $request['coupons_to_apply'] = implode(',', $request['coupons_to_apply']);
289
  }
290
 
292
  $request['wpml_language'] = FlycartWooDiscountRulesGeneralHelper::getWPMLLanguage();
293
 
294
  if (is_null($id) || !isset($id)) return false;
295
+ FlycartWooDiscountRulesGeneralHelper::resetUsedCoupons($id, $coupons_used);
296
  foreach ($request as $index => $value) {
297
  if (in_array($index, $form)) {
298
  if (get_post_meta($id, $index)) {
1155
  $hasBOGO = 1;
1156
  }
1157
  }
1158
+ if($hasBOGO){
1159
+ self::$product_on_sale_details[$index] = array('type' => 'bogo', 'bogo_details' => $discount_rules);
1160
+ continue;
1161
+ }
1162
  }
1163
  }
1164
  }
1185
  if(isset($rule['type']['is_cumulative']) && $rule['type']['is_cumulative']){
1186
  $totalQuantityInThisCategory = $this->getProductQuantityInThisCategory($rule['type']['specific_category'], $rule['product_to_exclude'], $rule['exclude_sale_items']);
1187
  if($product_page && !$bogo){
1188
+ $quantity = 1+$totalQuantityInThisCategory;
1189
  } else {
1190
  $quantity = $totalQuantityInThisCategory;
1191
  }
1222
  if(isset($rule['type']['is_cumulative']) && $rule['type']['is_cumulative']){
1223
  $totalQuantityInThisAttribute = $this->getProductQuantityInThisAttribute($rule['type']['specific_attribute'], $rule['product_to_exclude'], $rule['exclude_sale_items'], $id);
1224
  if($product_page && !$bogo){
1225
+ $quantity = 1+$totalQuantityInThisAttribute;
1226
  } else {
1227
  $quantity = $totalQuantityInThisAttribute;
1228
  }
1255
  case 'all_products':
1256
  default:
1257
  $is_not_in_exclude_sale_items = !$this->isItemInSaleItems($rule['exclude_sale_items'], $item['data']);
1258
+ if (!$this->isItemInProductList($rule['product_to_exclude'], $item) && $is_not_in_exclude_sale_items) {
1259
+ if(isset($rule['is_cumulative_for_products']) && $rule['is_cumulative_for_products']){
1260
  if($bogo) $quantity = $this->getProductQuantityForCumulativeProducts($item, 0, $rule);
1261
+ else $quantity = $this->getProductQuantityForCumulativeProducts($item, $product_page, $rule);
1262
  }
1263
  $discount_amount = $this->getAdjustmentAmount($item, $quantity, $this->array_first($rule['discount']), $product_page, $bogo, $rule['product_to_exclude']);
1264
  $applied_rules[$i] = $this->formatRulesToApply($discount_amount, $rule['name'], $index, $item['product_id'], $id);
3066
  $original_product = FlycartWoocommerceProduct::wc_get_product($product_id);
3067
  if(isset($product->woo_discount_rules_applied) && $product->woo_discount_rules_applied) return ;
3068
  }
3069
+ $do_discount_from_regular_price = FlycartWooDiscountRulesGeneralHelper::applyDiscountFromRegularPrice();
3070
+ if($do_discount_from_regular_price){
3071
+ $product_for_getting_regular_price = FlycartWoocommerceProduct::wc_get_product($product_id);
3072
+ $regular_price = FlycartWoocommerceProduct::get_price($product_for_getting_regular_price);
3073
+ $original_price_to_display = get_option('woocommerce_tax_display_cart') == 'excl' ? FlycartWoocommerceProduct::get_price_excluding_tax($product_for_getting_regular_price, 1, $regular_price) : FlycartWoocommerceProduct::get_price_including_tax($product_for_getting_regular_price, 1, $regular_price);
3074
+ } else {
3075
+ $original_price_to_display = get_option('woocommerce_tax_display_cart') == 'excl' ? FlycartWoocommerceProduct::get_price_excluding_tax($original_product) : FlycartWoocommerceProduct::get_price_including_tax($original_product);
3076
+ }
3077
  $original_price = FlycartWoocommerceProduct::get_price($original_product);
3078
  // Log changes
3079
  $woocommerce->cart->cart_contents[$item]['woo_discount'] = array(
3094
  }
3095
  }
3096
  }
3097
+ $original_price_excluding_tax = FlycartWoocommerceProduct::get_price_excluding_tax($original_product);
3098
+ $amount_excluding_tax = FlycartWoocommerceProduct::get_price_excluding_tax($original_product, 1, $amount);
3099
  //for future reference
3100
  $discount_amount = $original_price - $amount;
3101
+ $discount_amount = get_option('woocommerce_tax_display_cart') == 'excl' ? FlycartWoocommerceProduct::get_price_excluding_tax($original_product, 1, $discount_amount) : FlycartWoocommerceProduct::get_price_including_tax($original_product, 1, $discount_amount);
3102
+
3103
+ $discount_amount_excluding_tax = $original_price_excluding_tax - $amount_excluding_tax;
3104
  $woocommerce->cart->cart_contents[$item]['woo_discount']['discounted_price_per_product'] = $amount;
3105
  $woocommerce->cart->cart_contents[$item]['woo_discount']['discounted_price_total'] = $amount * $woocommerce->cart->cart_contents[$item]['quantity'];
3106
  $woocommerce->cart->cart_contents[$item]['woo_discount']['discount_amount'] = $discount_amount;
3107
  $woocommerce->cart->cart_contents[$item]['woo_discount']['discount_amount_total'] = $discount_amount * $woocommerce->cart->cart_contents[$item]['quantity'];
3108
 
3109
+ $woocommerce->cart->cart_contents[$item]['woo_discount']['discounted_price_per_product_excluding_tax'] = $amount_excluding_tax;
3110
+ $woocommerce->cart->cart_contents[$item]['woo_discount']['discounted_price_total_excluding_tax'] = $amount_excluding_tax * $woocommerce->cart->cart_contents[$item]['quantity'];
3111
+ $woocommerce->cart->cart_contents[$item]['woo_discount']['discount_amount_excluding_tax'] = $discount_amount_excluding_tax;
3112
+ $woocommerce->cart->cart_contents[$item]['woo_discount']['discount_amount_total_excluding_tax'] = $discount_amount_excluding_tax * $woocommerce->cart->cart_contents[$item]['quantity'];
3113
+
3114
  // Actually adjust price in cart
3115
  // $woocommerce->cart->cart_contents[$item]['data']->price = $amount;
3116
  FlycartWoocommerceProduct::set_price($product, $amount);
3189
  $hasToRunMultipleStrikeOut = $this->hasToSplitTheStrikeOutInCart($cart_item, $additional_details);
3190
  }
3191
  if($hasToRunMultipleStrikeOut){
3192
+ $item_price_first = '<div style="float: left;"><span class="cart_price wdr_cart_strikeout">' . $original_price_to_display . '</span></div>';
3193
  $item_price = '';
3194
  $haslimitedDiscount = 0;
3195
  foreach ($additional_details as $key => $additional_detail){
3209
  $new_price_to_display = FlycartWoocommerceProduct::wc_price($new_price_to_display);
3210
  $quantity -= $additional_detail['discount_quantity'];
3211
  $item_price .= '<div style="float: left;">';
3212
+ $item_price .= '<span class="cart_price wdr_cart_strikeout"><del>' . $original_price_to_display . '</del> <ins>' . $new_price_to_display . '</ins></span>';
3213
  $item_price .= '</div>';
3214
  $item_price .= '<div style="float: right; padding-left: 1em;">';
3215
  $item_price .= 'x '.$additional_detail['discount_quantity'];
3225
  }
3226
 
3227
  if($quantity <= 0 || !$haslimitedDiscount){
3228
+ $item_price = '<span class="cart_price wdr_cart_strikeout"><del>' . $original_price_to_display . '</del> <ins>' . $price_to_display . '</ins></span>';
3229
  } else {
3230
  $item_price = $item_price_first.$item_price;
3231
  }
3232
  } else {
3233
+ $item_price = '<span class="cart_price wdr_cart_strikeout"><del>' . $original_price_to_display . '</del> <ins>' . $price_to_display . '</ins></span>';
3234
  }
3235
  } else {
3236
+ $item_price = '<span class="cart_price wdr_cart_strikeout"><del>' . $original_price_to_display . '</del> <ins>' . $price_to_display . '</ins></span>';
3237
  }
3238
  $item_price_cont = '<div style="display: inline-block;" class="woo-discount-rules-cart-strikeout-con">';
3239
  $item_price_cont .= $item_price;
3309
  self::$product_has_strike_out[$product_id]['new_strikeout_html'] = ($price_to_display).$product->get_price_suffix($discountPrice);
3310
  $item_price = preg_replace('/<del>.*<\/del>/', '', $item_price);
3311
  $item_price = apply_filters('woo_discount_rules_price_strikeout_before_discount_price', $item_price, $product);
3312
+ $item_price = '<span class="cart_price wdr_product_strikeout"><del>' . $item_price . '</del> <ins>' . ($price_to_display).$product->get_price_suffix($discountPrice) . '</ins></span>';
3313
  $item_price = apply_filters('woo_discount_rules_price_strikeout_after_discount_price', $item_price, $product);
3314
  }
3315
  }
3318
  return $item_price;
3319
  }
3320
 
3321
+ public function replaceVisiblePricesForSalePriceAdjustment($item_price, $product)
3322
+ {
3323
+ $show_price_discount_on_product_page = (isset($this->baseConfig['show_sale_tag_on_product_page']))? $this->baseConfig['show_sale_tag_on_product_page']: 'show';
3324
+ if($show_price_discount_on_product_page == 'show') {
3325
+ if (!$product->is_type(array('variable', 'subscription_variation', 'variable-subscription'))) {
3326
+ $product_id = FlycartWoocommerceProduct::get_id($product);
3327
+ // if(!empty(self::$product_on_sale_details[$product_id])){
3328
+ $sale_price = FlycartWoocommerceProduct::get_price($product);
3329
+ $regular_price = FlycartWoocommerceProduct::get_regular_price($product);
3330
+ if($sale_price == $regular_price){
3331
+ $item_price = '<span class="cart_price wdr_product_strikeout">';
3332
+ $item_price .= FlycartWoocommerceProduct::wc_price($regular_price);
3333
+ $item_price .= '</span>';
3334
+ return $item_price;
3335
+ }
3336
+ // }
3337
+ }
3338
+ }
3339
+
3340
+ return $item_price;
3341
+ }
3342
+
3343
  /**
3344
  * Replace visible price if rule matches Optimized
3345
  * */
3366
  }
3367
  }
3368
 
3369
+ $do_discount_from_regular_price = FlycartWooDiscountRulesGeneralHelper::applyDiscountFromRegularPrice();
3370
+ if($do_discount_from_regular_price){
3371
+ if($product->is_type(array('variable', 'subscription_variation', 'variable-subscription'))){
3372
+ $item_price = $this->getVariantMinAndMaxRegularPrice($product, $item_price);
3373
+ } else {
3374
+ $regular_price = FlycartWoocommerceProduct::get_price($product);
3375
+ $regular_price = get_option('woocommerce_tax_display_shop') == 'excl' ? FlycartWoocommerceProduct::get_price_excluding_tax($product, 1, $regular_price) : FlycartWoocommerceProduct::get_price_including_tax($product, 1, $regular_price);
3376
+ $item_price = FlycartWoocommerceProduct::wc_price($regular_price);
3377
+ }
3378
+ }
3379
+
3380
  $notAdmin = FlycartWooDiscountRulesGeneralHelper::doIHaveToRun();
3381
  $show_price_discount_on_product_page = (isset($this->baseConfig['show_price_discount_on_product_page']))? $this->baseConfig['show_price_discount_on_product_page']: 'show';
3382
  if($show_price_discount_on_product_page == 'show' && ($notAdmin || $runTheRulesEvenInAjax)){
3388
  if(self::$product_has_strike_out[$product_id]['has_strikeout'] && !empty(self::$product_has_strike_out[$product_id]['new_strikeout_html'])){
3389
  $item_price = preg_replace('/<del>.*<\/del>/', '', $item_price);
3390
  $item_price = apply_filters('woo_discount_rules_price_strikeout_before_discount_price', $item_price, $product);
3391
+ $item_price = '<span class="cart_price wdr_product_strikeout"><del>' . $item_price . '</del> <ins>' . (self::$product_has_strike_out[$product_id]['new_strikeout_html']) . '</ins></span>';
3392
  $item_price = apply_filters('woo_discount_rules_price_strikeout_after_discount_price', $item_price, $product);
3393
  }
3394
  } else {
3427
  $on_sale = $this->displayProductIsOnSaleTag($on_sale, $product);
3428
  }
3429
  }
3430
+ if(!$on_sale){
3431
+ $product_id = FlycartWoocommerceProduct::get_id($product);
3432
+ if(!empty($this->matched_sets[$product_id])){
3433
+ $on_sale = true;
3434
+ }
3435
+ if(!empty(self::$product_on_sale_details[$product_id])){
3436
+ $on_sale = true;
3437
+ }
3438
+ }
3439
  }
3440
  return $on_sale;
3441
  }
3453
  }
3454
  }
3455
 
3456
+ /**
3457
+ * get variant min - max regular price
3458
+ * */
3459
+ public function getVariantMinAndMaxRegularPrice($product, $original_price_to_display){
3460
+ $display_only_lowest_price = apply_filters('woo_discount_rules_load_minimum_product_variant_price', false, $product);
3461
+ $tax_display_mode = get_option( 'woocommerce_tax_display_shop' );
3462
+ $child_prices = array();
3463
+
3464
+ if(FlycartWoocommerceVersion::wcVersion('3.1.0')){
3465
+ $children = array_filter( array_map( 'wc_get_product', FlycartWoocommerceProduct::get_children($product) ), 'wc_products_array_filter_visible_grouped' );
3466
+ foreach ( $children as $child ) {
3467
+ if ( '' !== FlycartWoocommerceProduct::get_price($child) ) {
3468
+ $child_prices[FlycartWoocommerceProduct::get_id($child)] = 'incl' === $tax_display_mode ? FlycartWoocommerceProduct::get_price_including_tax($child) : FlycartWoocommerceProduct::get_price_excluding_tax( $child );
3469
+ }
3470
+ }
3471
+ } else {
3472
+ $children = $product->get_children();
3473
+ foreach ( $children as $child_id ) {
3474
+ $child = FlycartWoocommerceProduct::wc_get_product($child_id);
3475
+ if ( '' !== FlycartWoocommerceProduct::get_price($child) ) {
3476
+ $child_prices[FlycartWoocommerceProduct::get_id($child)] = 'incl' === $tax_display_mode ? FlycartWoocommerceProduct::get_price_including_tax($child) : FlycartWoocommerceProduct::get_price_excluding_tax( $child );
3477
+ }
3478
+ }
3479
+ }
3480
+
3481
+ $maxProductId = 0;
3482
+ $minProductId = 0;
3483
+ if ( ! empty( $child_prices ) ) {
3484
+ $min_price = min( $child_prices );
3485
+ $max_price = max( $child_prices );
3486
+ if($min_price != $max_price){
3487
+ $maxProductIds = array_keys($child_prices, $max_price);
3488
+ $minProductIds = array_keys($child_prices, $min_price);
3489
+ if(isset($maxProductIds[0]))
3490
+ $maxProductId = $maxProductIds[0];
3491
+ if(isset($minProductIds[0]))
3492
+ $minProductId = $minProductIds[0];
3493
+ }
3494
+ }
3495
+ $leastPrice = '';
3496
+ if($minProductId){
3497
+ $minProduct = FlycartWoocommerceProduct::wc_get_product($minProductId);
3498
+ $leastPrice = FlycartWoocommerceProduct::get_price($minProduct);
3499
+ $leastPrice = FlycartWoocommerceProduct::wc_price($leastPrice);
3500
+ }
3501
+ if($maxProductId){
3502
+ $maxProduct = FlycartWoocommerceProduct::wc_get_product($maxProductId);
3503
+ $greatestPrice = FlycartWoocommerceProduct::get_price($maxProduct);
3504
+ $greatestPrice = FlycartWoocommerceProduct::wc_price($greatestPrice);
3505
+ if(!empty($leastPrice)){
3506
+ $minProduct = FlycartWoocommerceProduct::wc_get_product($minProductId);
3507
+ $leastPrice = FlycartWoocommerceProduct::get_price($minProduct);
3508
+ $leastPrice = FlycartWoocommerceProduct::wc_price($leastPrice);
3509
+ if($display_only_lowest_price){
3510
+ $price_to_display = $leastPrice;
3511
+ } else {
3512
+ $price_to_display = $leastPrice.' - '.$greatestPrice;
3513
+ }
3514
+ } else {
3515
+ $price_to_display = $greatestPrice;
3516
+ }
3517
+ } else {
3518
+ $price_to_display = $leastPrice;
3519
+ }
3520
+ if(empty($price_to_display)) $price_to_display = $original_price_to_display;
3521
+
3522
+ return $price_to_display;
3523
+ }
3524
+
3525
  public function checkForHighestVariantIfExists($product, $price_to_display, &$show_original){
3526
  $display_only_lowest_price = apply_filters('woo_discount_rules_load_minimum_product_variant_price', false, $product);
3527
  $tax_display_mode = get_option( 'woocommerce_tax_display_shop' );
3825
 
3826
  $product_id = FlycartWoocommerceProduct::get_id($cart_item);
3827
  $adjustment_set = $this->matched_sets[$cart_item_key];
3828
+ $do_discount_from_regular_price = FlycartWooDiscountRulesGeneralHelper::applyDiscountFromRegularPrice();
3829
  if(!($price > 0)){
3830
+ if($do_discount_from_regular_price){
3831
+ $product_for_getting_regular_price = FlycartWoocommerceProduct::wc_get_product($product_id);
3832
+ $regular_price = FlycartWoocommerceProduct::get_price($product_for_getting_regular_price);
3833
+ $price = get_option('woocommerce_tax_display_shop') == 'excl' ? FlycartWoocommerceProduct::get_price_excluding_tax($product_for_getting_regular_price, 1, $regular_price) : FlycartWoocommerceProduct::get_price_including_tax($product_for_getting_regular_price, 1, $regular_price);
3834
+ } else {
3835
+ $price = get_option('woocommerce_tax_display_shop') == 'excl' ? FlycartWoocommerceProduct::get_price_excluding_tax($cart_item) : FlycartWoocommerceProduct::get_price_including_tax($cart_item);
3836
+ }
3837
  }
3838
 
3839
  if(!($price > 0)){
3842
  if(isset($children[0])){
3843
  $product = FlycartWoocommerceProduct::wc_get_product($children[0]);
3844
  $product_id = FlycartWoocommerceProduct::get_id($product);
3845
+ if($do_discount_from_regular_price){
3846
+ $regular_price = FlycartWoocommerceProduct::get_price($product);
3847
+ $price = get_option('woocommerce_tax_display_shop') == 'excl' ? FlycartWoocommerceProduct::get_price_excluding_tax($product, 1, $regular_price) : FlycartWoocommerceProduct::get_price_including_tax($product, 1, $regular_price);
3848
+ } else {
3849
+ $price = get_option('woocommerce_tax_display_shop') == 'excl' ? FlycartWoocommerceProduct::get_price_excluding_tax($product) : FlycartWoocommerceProduct::get_price_including_tax($product);
3850
+ }
3851
  }
3852
  }
3853
  }
3961
  $subtotal_additional_text = '<span class="wdr_you_saved_con">';
3962
  $config = new FlycartWooDiscountBase();
3963
  $display_you_saved_string = $config->getConfigData('display_you_saved_text_value', " You saved: {{total_discount_price}}");
3964
+ $display_you_saved_string = str_replace('{{total_discount_price}}', '%s', $display_you_saved_string);
3965
+ $subtotal_additional_text .= sprintf(esc_html__($display_you_saved_string, 'woo-discount-rules'), $total_discounted_price);
3966
  $subtotal_additional_text .= '</span>';
 
3967
  return $subtotal_additional_text;
3968
  }
3969
 
4027
  }
4028
  }
4029
  }
4030
+
4031
+ /**
4032
+ * Replace sale tag text
4033
+ * */
4034
+ public function replaceSaleTagText($html, $post, $_product){
4035
+ $config = FlycartWooDiscountBase::get_instance();
4036
+ $customize_sale_tag = $config->getConfigData('customize_sale_tag', 0);
4037
+ if($customize_sale_tag){
4038
+ $customize_sale_tag_html = $config->getConfigData('customize_sale_tag_html', '<span class="onsale">Sale!</span>');
4039
+ $html = __($customize_sale_tag_html, 'woo-discount-rules');
4040
+ }
4041
+
4042
+ return $html;
4043
+ }
4044
  }
4045
  }
loader.php CHANGED
@@ -77,12 +77,12 @@ if(!class_exists('FlycartWooDiscountRules')){
77
  * To include Files
78
  * */
79
  protected function includeFiles(){
80
- include_once('helper/woo-function.php');
81
- include_once('includes/pricing-rules.php');
82
- include_once('helper/general-helper.php');
83
- include_once('includes/cart-rules.php');
84
- include_once('includes/discount-base.php');
85
- include_once('helper/purchase.php');
86
  require_once __DIR__ . '/vendor/autoload.php';
87
  }
88
 
@@ -124,6 +124,7 @@ if(!class_exists('FlycartWooDiscountRules')){
124
  add_action('wp_ajax_saveConfig', array($this->discountBase, 'saveConfig'));
125
  add_action('wp_ajax_resetWDRCache', array($this->discountBase, 'resetWDRCache'));
126
  add_action('wp_ajax_loadProductSelectBox', array($this->discountBase, 'loadProductSelectBox'));
 
127
 
128
  add_action('wp_ajax_UpdateStatus', array($this->discountBase, 'updateStatus'));
129
  add_action('wp_ajax_RemoveRule', array($this->discountBase, 'removeRule'));
@@ -337,12 +338,17 @@ if(!class_exists('FlycartWooDiscountRules')){
337
 
338
  //replace visible price in product page
339
  add_filter('woocommerce_get_price_html', array($this->pricingRules, 'replaceVisiblePricesOptimized'), 100, 3);
 
 
340
  //replace visible price in product page for variant
341
  add_filter('woocommerce_available_variation', array($this->pricingRules, 'replaceVisiblePricesForVariant'), 100, 3);
342
 
343
  // Older Version support this hook.
344
  add_filter('woocommerce_cart_item_price_html', array($this->pricingRules, 'replaceVisiblePricesCart'), 1000, 3);
345
 
 
 
 
346
  // Pricing Table of Individual Product.
347
  $discount_table_placement = $this->discountBase->getConfigData('discount_table_placement', 'before_cart_form');
348
  if($discount_table_placement == 'before_cart_form'){
@@ -509,9 +515,9 @@ if ( is_plugin_active( 'woocommerce/woocommerce.php' ) ) {
509
  $flycart_woo_discount_rules = FlycartWooDiscountRules::init();
510
  $purchase_helper = new FlycartWooDiscountRulesPurchase();
511
  if($purchase_helper->isPro()){
512
- include_once('includes/advanced/free_shipping_method.php');
513
- include_once('includes/advanced/pricing-productdependent.php');
514
- include_once('includes/advanced/cart-totals.php');
515
- include_once('includes/advanced/advanced-helper.php');
516
  }
517
- }
77
  * To include Files
78
  * */
79
  protected function includeFiles(){
80
+ include_once(dirname(__FILE__).'/helper/woo-function.php');
81
+ include_once(dirname(__FILE__).'/includes/pricing-rules.php');
82
+ include_once(dirname(__FILE__).'/helper/general-helper.php');
83
+ include_once(dirname(__FILE__).'/includes/cart-rules.php');
84
+ include_once(dirname(__FILE__).'/includes/discount-base.php');
85
+ include_once(dirname(__FILE__).'/helper/purchase.php');
86
  require_once __DIR__ . '/vendor/autoload.php';
87
  }
88
 
124
  add_action('wp_ajax_saveConfig', array($this->discountBase, 'saveConfig'));
125
  add_action('wp_ajax_resetWDRCache', array($this->discountBase, 'resetWDRCache'));
126
  add_action('wp_ajax_loadProductSelectBox', array($this->discountBase, 'loadProductSelectBox'));
127
+ add_action('wp_ajax_loadCoupons', array($this->discountBase, 'loadCoupons'));
128
 
129
  add_action('wp_ajax_UpdateStatus', array($this->discountBase, 'updateStatus'));
130
  add_action('wp_ajax_RemoveRule', array($this->discountBase, 'removeRule'));
338
 
339
  //replace visible price in product page
340
  add_filter('woocommerce_get_price_html', array($this->pricingRules, 'replaceVisiblePricesOptimized'), 100, 3);
341
+ add_filter('woocommerce_get_price_html', array($this->pricingRules, 'replaceVisiblePricesForSalePriceAdjustment'), 99, 3);
342
+
343
  //replace visible price in product page for variant
344
  add_filter('woocommerce_available_variation', array($this->pricingRules, 'replaceVisiblePricesForVariant'), 100, 3);
345
 
346
  // Older Version support this hook.
347
  add_filter('woocommerce_cart_item_price_html', array($this->pricingRules, 'replaceVisiblePricesCart'), 1000, 3);
348
 
349
+ //For changing the sale tag text
350
+ add_filter( 'woocommerce_sale_flash', array($this->pricingRules, 'replaceSaleTagText'), 100, 3);
351
+
352
  // Pricing Table of Individual Product.
353
  $discount_table_placement = $this->discountBase->getConfigData('discount_table_placement', 'before_cart_form');
354
  if($discount_table_placement == 'before_cart_form'){
515
  $flycart_woo_discount_rules = FlycartWooDiscountRules::init();
516
  $purchase_helper = new FlycartWooDiscountRulesPurchase();
517
  if($purchase_helper->isPro()){
518
+ include_once(dirname(__FILE__).'/includes/advanced/free_shipping_method.php');
519
+ include_once(dirname(__FILE__).'/includes/advanced/pricing-productdependent.php');
520
+ include_once(dirname(__FILE__).'/includes/advanced/cart-totals.php');
521
+ include_once(dirname(__FILE__).'/includes/advanced/advanced-helper.php');
522
  }
523
+ }
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://flycart.org/
4
  Tags: woocommerce, discounts, dynamic pricing, Buy One Get One Free, pricing deals, price rules, bulk discounts, advanced discounts, pricing deals
5
  Requires at least: 4.4.1
6
  Tested up to: 5.0
7
- Stable tag: 1.7.6
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -312,6 +312,15 @@ Discount - Enter minimum & Maximum quantity -> Adjustment Type -> Product Discou
312
 
313
  == Changelog ==
314
 
 
 
 
 
 
 
 
 
 
315
  = 1.7.6 - 11/01/19 =
316
  * Fix - Error because of action woocommerce_before_calculate_totals
317
  * Fix - Discount calculation for Free variant product on cart rules
4
  Tags: woocommerce, discounts, dynamic pricing, Buy One Get One Free, pricing deals, price rules, bulk discounts, advanced discounts, pricing deals
5
  Requires at least: 4.4.1
6
  Tested up to: 5.0
7
+ Stable tag: 1.7.7
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
312
 
313
  == Changelog ==
314
 
315
+ = 1.7.7 - 28/01/19 =
316
+ * Feature - Option to apply discount based on regular price
317
+ * Feature - Option to customize sale tag(Pro)
318
+ * Fix - Woo discount backend page doesn't loads when having large number of coupons
319
+ * Fix - Avoid path issue in few sites
320
+ * Fix - Translating the shortcode {{total_discount_price}}
321
+ * Improvement - Ignore the coupon used in our plugin while having the option Don't apply rules on having coupon
322
+ * Improvement - Save discounted price(excluding tax) for future reference in order meta
323
+
324
  = 1.7.6 - 11/01/19 =
325
  * Fix - Error because of action woocommerce_before_calculate_totals
326
  * Fix - Discount calculation for Free variant product on cart rules
view/settings.php CHANGED
@@ -176,6 +176,29 @@ $isPro = $flycartWooDiscountRulesPurchase->isPro();
176
  </select>
177
  </div>
178
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
179
  <div class="row form-group">
180
  <?php $data['show_price_discount_on_product_page'] = (isset($data['show_price_discount_on_product_page']) ? $data['show_price_discount_on_product_page'] : 'show'); ?>
181
  <div class="col-md-2">
@@ -214,6 +237,46 @@ $isPro = $flycartWooDiscountRulesPurchase->isPro();
214
  <div class="notice notice-info"><p><?php esc_html_e('It displays only if any rule matches', 'woo-discount-rules'); ?></p></div>
215
  </div>
216
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
217
  <div class="row form-group">
218
  <?php $data['show_discount_table'] = (isset($data['show_discount_table']) ? $data['show_discount_table'] : 'show'); ?>
219
  <div class="col-md-2">
176
  </select>
177
  </div>
178
  </div>
179
+ <div class="row form-group">
180
+ <div class="col-md-2">
181
+ <label>
182
+ <?php esc_html_e('Apply discount based on', 'woo-discount-rules'); ?>
183
+ </label>
184
+ </div>
185
+ <?php $data['do_discount_from_regular_price'] = (isset($data['do_discount_from_regular_price']) ? $data['do_discount_from_regular_price'] : 'sale'); ?>
186
+ <div class="col-md-6">
187
+ <select class="selectpicker" name="do_discount_from_regular_price" id="do_discount_from_regular_price">
188
+ <option <?php if ($data['do_discount_from_regular_price'] == 'sale') { ?> selected=selected <?php } ?>
189
+ value="sale"><?php esc_html_e('Sale price', 'woo-discount-rules'); ?>
190
+ </option>
191
+ <option <?php if ($data['do_discount_from_regular_price'] == 'regular') { ?> selected=selected <?php } ?>
192
+ value="regular"><?php esc_html_e('Regular price', 'woo-discount-rules'); ?>
193
+ </option>
194
+ </select>
195
+ <div class="wdr_desc_text_con">
196
+ <span class="wdr_desc_text">
197
+ <?php esc_html_e('If sale price is not entered in your products, the regular price will be taken', 'woo-discount-rules'); ?>
198
+ </span>
199
+ </div>
200
+ </div>
201
+ </div>
202
  <div class="row form-group">
203
  <?php $data['show_price_discount_on_product_page'] = (isset($data['show_price_discount_on_product_page']) ? $data['show_price_discount_on_product_page'] : 'show'); ?>
204
  <div class="col-md-2">
237
  <div class="notice notice-info"><p><?php esc_html_e('It displays only if any rule matches', 'woo-discount-rules'); ?></p></div>
238
  </div>
239
  </div>
240
+ <div class="row form-group">
241
+ <?php $data['customize_sale_tag'] = (isset($data['customize_sale_tag']) ? $data['customize_sale_tag'] : 0); ?>
242
+ <div class="col-md-2">
243
+ <label for="customize_sale_tag">
244
+ <?php esc_html_e('Customize sale tag', 'woo-discount-rules'); ?>
245
+ </label>
246
+ </div>
247
+ <div class="col-md-6">
248
+ <?php
249
+ if($isPro){
250
+ ?>
251
+ <input type="checkbox" name="customize_sale_tag" id="customize_sale_tag" value="1" <?php if ($data['customize_sale_tag'] == 1) { ?> checked <?php } ?>> <label for="customize_sale_tag"><?php esc_html_e('Customize sale tag', 'woo-discount-rules'); ?></label>
252
+ <?php
253
+ } else {
254
+ esc_html_e('Supported in PRO version', 'woo-discount-rules');
255
+ }
256
+ ?>
257
+ </div>
258
+ </div>
259
+ <?php
260
+ if($isPro){
261
+ ?>
262
+ <div class="row form-group customize_sale_tag_option">
263
+ <?php $data['customize_sale_tag_html'] = (isset($data['customize_sale_tag_html']) ? $data['customize_sale_tag_html'] : '<span class="onsale">Sale!</span>'); ?>
264
+ <div class="col-md-2">
265
+ <label>
266
+ <?php esc_html_e('Customize html for sale tag', 'woo-discount-rules'); ?>
267
+ </label>
268
+ </div>
269
+ <div class="col-md-6">
270
+ <textarea name="customize_sale_tag_html" id="customize_sale_tag_html_textarea" class="customize_sale_tag_html_textarea" value="<?php echo esc_attr($data['customize_sale_tag_html']); ?>"><?php echo $data['customize_sale_tag_html']; ?></textarea>
271
+ <div class="wdr_desc_text_con">
272
+ <span class="wdr_desc_text">
273
+ <?php esc_html_e('Eg:', 'woo-discount-rules'); echo htmlentities('<span class="onsale">Sale!</span>'); ?>
274
+ </span>
275
+ </div>
276
+ </div>
277
+ </div>
278
+ <?php
279
+ } ?>
280
  <div class="row form-group">
281
  <?php $data['show_discount_table'] = (isset($data['show_discount_table']) ? $data['show_discount_table'] : 'show'); ?>
282
  <div class="col-md-2">
view/view-cart-rules.php CHANGED
@@ -43,8 +43,8 @@ if (empty($discount_rules)) {
43
  $flycartWooDiscountRulesPurchase = new FlycartWooDiscountRulesPurchase();
44
  $isPro = $flycartWooDiscountRulesPurchase->isPro();
45
  $woo_settings = new FlycartWooDiscountBase();
46
- $do_not_run_while_have_third_party_coupon = $woo_settings->getConfigData('do_not_run_while_have_third_party_coupon', 0);
47
  $current_date_and_time = FlycartWooDiscountRulesGeneralHelper::getCurrentDateAndTimeBasedOnTimeZone();
 
48
  ?>
49
  <div class="container-fluid woo_discount_loader_outer">
50
  <form id="form_cart_rule">
@@ -447,16 +447,26 @@ $current_date_and_time = FlycartWooDiscountRulesGeneralHelper::getCurrentDateAnd
447
  }
448
  ?>
449
  <div id="coupon_div_<?php echo $i; ?>" <?php echo $class; ?>>
450
- <select class="coupon_list selectpicker"
451
- id="cart_coupon_list_<?php echo $i; ?>"
452
- multiple
453
- title="<?php esc_html_e('None selected', 'woo-discount-rules'); ?>"
454
- name="discount_rule[<?php echo $i; ?>][coupon_to_apply][]">
455
- <?php foreach ($coupons as $coupon_code => $coupon_name) { ?>
456
- <option
457
- value="<?php echo $coupon_code; ?>"<?php if (in_array($coupon_code, $coupon_list)) { ?> selected=selected <?php } ?>><?php echo $coupon_name; ?></option>
458
- <?php } ?>
459
- </select>
 
 
 
 
 
 
 
 
 
 
460
  </div>
461
  <?php
462
  $roles_list = array();
@@ -559,18 +569,6 @@ $current_date_and_time = FlycartWooDiscountRulesGeneralHelper::getCurrentDateAnd
559
  value="<?php echo(isset($discount_rules[$type]) && !is_array($discount_rules[$type]) ? $discount_rules[$type] : ''); ?>"
560
  name="discount_rule[<?php echo $i; ?>][option_value]">
561
  </div>
562
- <?php
563
- if (in_array($type, array('coupon_applied_any_one', 'coupon_applied_all_selected')))
564
- if($do_not_run_while_have_third_party_coupon){
565
- ?>
566
- <div class="notice notice-warning">
567
- <p>
568
- <?php esc_html_e('To get this condition work,', 'woo-discount-rules'); ?> <a target="_blank" href="?page=woo_discount_rules&tab=settings"><?php esc_html_e('please change the option', 'woo-discount-rules'); ?> <b><?php esc_html_e('Disable the rules while have coupon(Third party)', 'woo-discount-rules'); ?></b> <?php esc_html_e('in cart to', 'woo-discount-rules'); ?> <b><?php esc_html_e('No', 'woo-discount-rules'); ?></b></a>.
569
- </p>
570
- </div>
571
- <?php
572
- }
573
- ?>
574
  </label>
575
  </div>
576
  <div class="col-md-1"><label> <?php esc_html_e('Action', 'woo-discount-rules'); ?> </label><br>
@@ -691,6 +689,7 @@ $current_date_and_time = FlycartWooDiscountRulesGeneralHelper::getCurrentDateAnd
691
  <?php include_once(__DIR__ . '/template/sidebar.php'); ?>
692
  <!-- Sidebar END -->
693
  <?php } ?>
 
694
  <input type="hidden" name="rule_id" id="rule_id" value="<?php echo $rule_id; ?>">
695
  <input type="hidden" name="form" value="<?php echo $form; ?>">
696
  <input type="hidden" id="ajax_path" value="<?php echo admin_url('admin-ajax.php'); ?>">
43
  $flycartWooDiscountRulesPurchase = new FlycartWooDiscountRulesPurchase();
44
  $isPro = $flycartWooDiscountRulesPurchase->isPro();
45
  $woo_settings = new FlycartWooDiscountBase();
 
46
  $current_date_and_time = FlycartWooDiscountRulesGeneralHelper::getCurrentDateAndTimeBasedOnTimeZone();
47
+ $has_large_no_of_coupon = FlycartWooDiscountBase::hasLargeNumberOfCoupon();
48
  ?>
49
  <div class="container-fluid woo_discount_loader_outer">
50
  <form id="form_cart_rule">
447
  }
448
  ?>
449
  <div id="coupon_div_<?php echo $i; ?>" <?php echo $class; ?>>
450
+ <?php
451
+ if($has_large_no_of_coupon){
452
+ ?>
453
+ <select class="coupons_selectbox_multi_select_wdr" multiple id="cart_coupon_list_<?php echo $i; ?>" name="discount_rule[<?php echo $i; ?>][coupon_to_apply][]">
454
+ <?php echo FlycartWooDiscountBase::loadSelectedCouponOptions($coupon_list); ?>
455
+ </select>
456
+ <?php
457
+ } else {
458
+ ?>
459
+ <select class="coupon_list selectpicker"
460
+ id="cart_coupon_list_<?php echo $i; ?>"
461
+ multiple
462
+ title="<?php esc_html_e('None selected', 'woo-discount-rules'); ?>"
463
+ name="discount_rule[<?php echo $i; ?>][coupon_to_apply][]">
464
+ <?php foreach ($coupons as $coupon_code => $coupon_name) { ?>
465
+ <option
466
+ value="<?php echo $coupon_code; ?>"<?php if (in_array($coupon_code, $coupon_list)) { ?> selected=selected <?php } ?>><?php echo $coupon_name; ?></option>
467
+ <?php } ?>
468
+ </select>
469
+ <?php } ?>
470
  </div>
471
  <?php
472
  $roles_list = array();
569
  value="<?php echo(isset($discount_rules[$type]) && !is_array($discount_rules[$type]) ? $discount_rules[$type] : ''); ?>"
570
  name="discount_rule[<?php echo $i; ?>][option_value]">
571
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
572
  </label>
573
  </div>
574
  <div class="col-md-1"><label> <?php esc_html_e('Action', 'woo-discount-rules'); ?> </label><br>
689
  <?php include_once(__DIR__ . '/template/sidebar.php'); ?>
690
  <!-- Sidebar END -->
691
  <?php } ?>
692
+ <input type="hidden" name="has_large_number_of_coupon" id="has_large_number_of_coupon" value="<?php echo $has_large_no_of_coupon; ?>">
693
  <input type="hidden" name="rule_id" id="rule_id" value="<?php echo $rule_id; ?>">
694
  <input type="hidden" name="form" value="<?php echo $form; ?>">
695
  <input type="hidden" id="ajax_path" value="<?php echo admin_url('admin-ajax.php'); ?>">
view/view-pricing-rules.php CHANGED
@@ -27,7 +27,6 @@ if($isPro){
27
  $attributes = FlycartWooDiscountRulesAdvancedHelper::get_all_product_attributes();
28
  }
29
  $woo_settings = new FlycartWooDiscountBase();
30
- $do_not_run_while_have_third_party_coupon = $woo_settings->getConfigData('do_not_run_while_have_third_party_coupon', 0);
31
  $current_date_and_time = FlycartWooDiscountRulesGeneralHelper::getCurrentDateAndTimeBasedOnTimeZone();
32
  ?>
33
  <div class="container-fluid woo_discount_loader_outer">
@@ -377,24 +376,40 @@ $current_date_and_time = FlycartWooDiscountRulesGeneralHelper::getCurrentDateAnd
377
  <option value="any_selected"<?php if ($coupons_to_apply_option == 'any_selected') { ?> selected=selected <?php } ?>><?php esc_html_e('Apply if any one coupon applied', 'woo-discount-rules'); ?></option>
378
  <option value="all_selected"<?php if ($coupons_to_apply_option == 'all_selected') { ?> selected=selected <?php } ?>><?php esc_html_e('Apply if all coupon applied', 'woo-discount-rules'); ?></option>
379
  </select>
380
- <?php echo FlycartWooDiscountRulesGeneralHelper::docsURLHTML('coupon-based-discounts/activate-discount-rule-using-a-coupon-code-in-woocommerce', 'coupon'); ?>
 
 
 
 
 
 
 
 
 
381
  <div class="coupons_to_apply_price_rule_con">
382
- <select class="form-control coupons_to_apply selectpicker" multiple id="coupons_to_apply" name="coupons_to_apply[]">
 
 
 
 
 
383
  <?php
384
- if(!empty($coupons)){
385
- if(!empty($coupons_to_apply)){
386
- if(is_string($coupons_to_apply)) $coupons_to_apply = explode(',', $coupons_to_apply);
387
- } else {
388
- $coupons_to_apply = array();
389
- }
390
- foreach ($coupons as $coupon_code => $coupon_title){
391
- ?>
392
- <option value="<?php echo $coupon_code; ?>"<?php if(in_array($coupon_code, $coupons_to_apply)) { ?> selected=selected <?php } ?>><?php echo $coupon_title ?></option>
393
- <?php
394
  }
395
- }
396
- ?>
397
- </select>
 
 
398
  <span class="woo-discount-hint">
399
  <a target="_blank" href="https://docs.flycart.org/woocommerce-discount-rules/coupon-based-discounts/activate-discount-rule-using-a-coupon-code-in-woocommerce">
400
  <?php
@@ -402,17 +417,6 @@ $current_date_and_time = FlycartWooDiscountRulesGeneralHelper::getCurrentDateAnd
402
  ?>
403
  </a>
404
  </span>
405
- <?php
406
- if($do_not_run_while_have_third_party_coupon){
407
- ?>
408
- <div class="notice notice-warning">
409
- <p>
410
- <?php esc_html_e('To get this condition work,', 'woo-discount-rules'); ?> <a target="_blank" href="?page=woo_discount_rules&tab=settings"><?php esc_html_e('please change the option', 'woo-discount-rules'); ?> <b><?php esc_html_e('Disable the rules while have coupon(Third party)', 'woo-discount-rules'); ?></b> <?php esc_html_e('in cart to', 'woo-discount-rules'); ?> <b><?php esc_html_e('No', 'woo-discount-rules'); ?></b></a>.
411
- </p>
412
- </div>
413
- <?php
414
- }
415
- ?>
416
  </div>
417
  <?php
418
  } else {
27
  $attributes = FlycartWooDiscountRulesAdvancedHelper::get_all_product_attributes();
28
  }
29
  $woo_settings = new FlycartWooDiscountBase();
 
30
  $current_date_and_time = FlycartWooDiscountRulesGeneralHelper::getCurrentDateAndTimeBasedOnTimeZone();
31
  ?>
32
  <div class="container-fluid woo_discount_loader_outer">
376
  <option value="any_selected"<?php if ($coupons_to_apply_option == 'any_selected') { ?> selected=selected <?php } ?>><?php esc_html_e('Apply if any one coupon applied', 'woo-discount-rules'); ?></option>
377
  <option value="all_selected"<?php if ($coupons_to_apply_option == 'all_selected') { ?> selected=selected <?php } ?>><?php esc_html_e('Apply if all coupon applied', 'woo-discount-rules'); ?></option>
378
  </select>
379
+ <?php echo FlycartWooDiscountRulesGeneralHelper::docsURLHTML('coupon-based-discounts/activate-discount-rule-using-a-coupon-code-in-woocommerce', 'coupon');
380
+
381
+ if(!empty($coupons_to_apply)){
382
+ if(is_string($coupons_to_apply)) $coupons_to_apply = explode(',', $coupons_to_apply);
383
+ } else {
384
+ $coupons_to_apply = array();
385
+ }
386
+
387
+ $has_large_no_of_coupon = FlycartWooDiscountBase::hasLargeNumberOfCoupon();
388
+ ?>
389
  <div class="coupons_to_apply_price_rule_con">
390
+ <?php
391
+ if($has_large_no_of_coupon){
392
+ ?>
393
+ <select class="coupons_selectbox_multi_select_wdr" multiple id="coupons_to_apply" name="coupons_to_apply[]">
394
+ <?php echo FlycartWooDiscountBase::loadSelectedCouponOptions($coupons_to_apply); ?>
395
+ </select>
396
  <?php
397
+ } else {
398
+ ?>
399
+ <select class="form-control coupons_to_apply selectpicker" multiple id="coupons_to_apply" name="coupons_to_apply[]">
400
+ <?php
401
+ if(!empty($coupons)){
402
+ foreach ($coupons as $coupon_code => $coupon_title){
403
+ ?>
404
+ <option value="<?php echo $coupon_code; ?>"<?php if(in_array($coupon_code, $coupons_to_apply)) { ?> selected=selected <?php } ?>><?php echo $coupon_title ?></option>
405
+ <?php
406
+ }
407
  }
408
+ ?>
409
+ </select>
410
+ <?php
411
+ }
412
+ ?>
413
  <span class="woo-discount-hint">
414
  <a target="_blank" href="https://docs.flycart.org/woocommerce-discount-rules/coupon-based-discounts/activate-discount-rule-using-a-coupon-code-in-woocommerce">
415
  <?php
417
  ?>
418
  </a>
419
  </span>
 
 
 
 
 
 
 
 
 
 
 
420
  </div>
421
  <?php
422
  } else {
woo-discount-rules.php CHANGED
@@ -5,7 +5,7 @@
5
  * Description: Simple Discount Rules for WooCommerce.
6
  * Author: Flycart Technologies LLP
7
  * Author URI: https://www.flycart.org
8
- * Version: 1.7.6
9
  * Slug: woo-discount-rules
10
  * Text Domain: woo-discount-rules
11
  * Domain Path: /i18n/languages/
@@ -16,6 +16,6 @@
16
 
17
  if (!defined('ABSPATH')) exit; // Exit if accessed directly
18
 
19
- include_once('helper/activation-helper.php');
20
 
21
- include_once('loader.php');
5
  * Description: Simple Discount Rules for WooCommerce.
6
  * Author: Flycart Technologies LLP
7
  * Author URI: https://www.flycart.org
8
+ * Version: 1.7.7
9
  * Slug: woo-discount-rules
10
  * Text Domain: woo-discount-rules
11
  * Domain Path: /i18n/languages/
16
 
17
  if (!defined('ABSPATH')) exit; // Exit if accessed directly
18
 
19
+ include_once(dirname(__FILE__).'/helper/activation-helper.php');
20
 
21
+ include_once(dirname(__FILE__).'/loader.php');