Discount Rules for WooCommerce - Version 1.7.8

Version Description

  • 06/02/19 =
  • Fix - Coupon based rule doesn't work when Woocommerce coupon title updated
  • Fix - Warning when regular price returns string value
  • Improvement - Alert while having non supported plugin(WooCommerce Bulk Discount) is active
  • Improvement - Event apply_filters('woo_discount_rules_before_apply_discount', $amount, $product, $woocommerce->cart->cart_contents[$item]);
  • Improvement - Display 1 for min qty when min qty is 0 or null in product discount table
  • Improvement - Additional option for sale badge, Show if product is part of any active rules
  • Improvement - Customize sale badge should loads only for the products rules matches
Download this release

Release Info

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

Code changes from version 1.7.7 to 1.7.8

assets/js/app.js CHANGED
@@ -531,6 +531,15 @@ function trigger_woocommerce_tooltip(){
531
  });
532
  $('#message_on_apply_price_discount').trigger('change');
533
 
 
 
 
 
 
 
 
 
 
534
  $('#display_you_saved_text').on('change', function () {
535
  var option = $(this).val();
536
  if (option == 'no') {
@@ -539,7 +548,7 @@ function trigger_woocommerce_tooltip(){
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")) {
531
  });
532
  $('#message_on_apply_price_discount').trigger('change');
533
 
534
+ $('select[name="show_sale_tag_on_product_page"]').on('change', function () {
535
+ var option = $(this).val();
536
+ if (option == 'show' || option == 'show_on_any_rules_matches') {
537
+ $('#customize_sale_tag').prop('checked', true).trigger('change');
538
+ } else {
539
+ $('#customize_sale_tag').prop('checked', false).trigger('change');
540
+ }
541
+ });
542
+
543
  $('#display_you_saved_text').on('change', function () {
544
  var option = $(this).val();
545
  if (option == 'no') {
548
  $('.display_you_saved_text_options').show();
549
  }
550
  });
551
+ $('#display_you_saved_text').trigger('change');
552
 
553
  $('#customize_sale_tag').on('change', function () {
554
  if ($("#customize_sale_tag").is(":checked")) {
helper/general-helper.php CHANGED
@@ -90,7 +90,14 @@ if ( ! class_exists( 'FlycartWooDiscountRulesGeneralHelper' ) ) {
90
  $coupons = get_posts( $args );
91
  if(!empty($coupons)){
92
  foreach ($coupons as $coupon){
93
- $coupon_list[$coupon->post_name] = $coupon->post_title;
 
 
 
 
 
 
 
94
  }
95
  }
96
 
90
  $coupons = get_posts( $args );
91
  if(!empty($coupons)){
92
  foreach ($coupons as $coupon){
93
+ //$coupon_list[$coupon->post_name] = $coupon->post_title;
94
+ if(function_exists('wc_strtolower')){
95
+ $coupon_name = wc_strtolower($coupon->post_title);
96
+ } else {
97
+ $coupon_name = strtolower($coupon->post_title);
98
+ }
99
+
100
+ $coupon_list[$coupon_name] = $coupon->post_title;
101
  }
102
  }
103
 
helper/woo-function.php CHANGED
@@ -192,7 +192,9 @@ if(!class_exists('FlycartWoocommerceProduct')){
192
  * @return int/float
193
  */
194
  public static function get_regular_price($product){
195
- return FlycartWoocommerceVersion::wcVersion('3.0') ? $product->get_regular_price() : $product->regular_price;
 
 
196
  }
197
 
198
  /**
192
  * @return int/float
193
  */
194
  public static function get_regular_price($product){
195
+ $price = FlycartWoocommerceVersion::wcVersion('3.0') ? $product->get_regular_price() : $product->regular_price;
196
+ $price = floatval($price);
197
+ return $price;
198
  }
199
 
200
  /**
i18n/languages/woo-discount-rules.pot CHANGED
@@ -15,31 +15,31 @@ msgstr ""
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,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:378 helper/woo-function.php:388
107
  msgid "Search for a product…"
108
  msgstr ""
109
 
110
- #: helper/woo-function.php:421 helper/woo-function.php:433
111
  msgid "Search for a user…"
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: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
 
@@ -147,426 +147,426 @@ 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
@@ -575,45 +575,44 @@ msgstr ""
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,92 +623,92 @@ msgid ""
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
 
@@ -896,7 +895,7 @@ msgstr ""
896
  msgid "Please contact our support team"
897
  msgstr ""
898
 
899
- #: view/includes/header.php:13
900
  #, php-format
901
  msgid ""
902
  "An another discount plugin %s is active. Please disable this plugin, Woo "
@@ -960,14 +959,14 @@ msgid "Enable dropdowns (applies only for the rule engine in the backend.)"
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
 
@@ -996,20 +995,20 @@ msgid "Price rules settings"
996
  msgstr ""
997
 
998
  #: view/settings.php:150
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
 
@@ -1032,193 +1031,216 @@ msgid ""
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
 
15
  msgid "Guest"
16
  msgstr ""
17
 
18
+ #: helper/general-helper.php:551
19
  msgid "Start date and time is set in the future date"
20
  msgstr ""
21
 
22
+ #: helper/general-helper.php:554
23
  msgid "Validity expired"
24
  msgstr ""
25
 
26
+ #: helper/general-helper.php:571
27
  msgid "Will run in future"
28
  msgstr ""
29
 
30
+ #: helper/general-helper.php:574
31
  msgid "Not running - validity expired"
32
  msgstr ""
33
 
34
+ #: helper/general-helper.php:591
35
  msgid "Running"
36
  msgstr ""
37
 
38
+ #: helper/general-helper.php:596
39
  msgid "Your server current date and time: "
40
  msgstr ""
41
 
42
+ #: helper/general-helper.php:712
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:380 helper/woo-function.php:390
107
  msgid "Search for a product&hellip;"
108
  msgstr ""
109
 
110
+ #: helper/woo-function.php:423 helper/woo-function.php:435
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:574
123
  msgid "Free Shipping"
124
  msgstr ""
125
 
126
+ #: includes/advanced/free_shipping_method.php:73 includes/discount-base.php:990
127
+ #: view/cart-rules.php:133 view/pricing-rules.php:163 view/settings.php:655
128
+ #: view/settings.php:690
129
  msgid "Enable"
130
  msgstr ""
131
 
147
  msgstr ""
148
 
149
  #: includes/discount-base.php:190 view/cart-rules.php:149
150
+ #: view/pricing-rules.php:179 view/settings.php:297 view/settings.php:444
151
+ #: view/settings.php:543 view/settings.php:550 view/settings.php:652
152
+ #: view/settings.php:687
153
  msgid "Disabled"
154
  msgstr ""
155
 
156
+ #: includes/discount-base.php:478
157
  msgid "Cache cleared successfully"
158
  msgstr ""
159
 
160
+ #: includes/discount-base.php:480
161
  msgid "Failed to clear cache"
162
  msgstr ""
163
 
164
+ #: includes/discount-base.php:586 includes/discount-base.php:621
165
  msgid "Failed to do action"
166
  msgstr ""
167
 
168
+ #: includes/discount-base.php:625
169
  msgid "Disabled successfully"
170
  msgstr ""
171
 
172
+ #: includes/discount-base.php:628
173
  msgid "Deleted successfully"
174
  msgstr ""
175
 
176
+ #: includes/discount-base.php:631
177
  msgid "Enabled successfully"
178
  msgstr ""
179
 
180
+ #: includes/discount-base.php:651 includes/discount-base.php:652
181
+ #: includes/discount-base.php:669
182
  msgid "copy"
183
  msgstr ""
184
 
185
+ #: includes/discount-base.php:677
186
  msgid "Duplicate rule created successfully"
187
  msgstr ""
188
 
189
+ #: includes/discount-base.php:681
190
  msgid "Failed to create duplicate rule"
191
  msgstr ""
192
 
193
+ #: includes/discount-base.php:945
194
  msgid "Please fill this field"
195
  msgstr ""
196
 
197
+ #: includes/discount-base.php:946
198
  msgid "Please Enter the Rule Name to Create / Save."
199
  msgstr ""
200
 
201
+ #: includes/discount-base.php:947
202
  msgid "Saving..."
203
  msgstr ""
204
 
205
+ #: includes/discount-base.php:948 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:949
211
  msgid "Please enter a Key"
212
  msgstr ""
213
 
214
+ #: includes/discount-base.php:950 view/view-pricing-rules.php:654
215
  msgid "Min Quantity"
216
  msgstr ""
217
 
218
+ #: includes/discount-base.php:951 view/view-pricing-rules.php:661
219
  msgid "Max Quantity"
220
  msgstr ""
221
 
222
+ #: includes/discount-base.php:952 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:953 view/view-pricing-rules.php:787
230
  msgid "ex. 10"
231
  msgstr ""
232
 
233
+ #: includes/discount-base.php:954 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:955
239
  msgid "Search for a user"
240
  msgstr ""
241
 
242
+ #: includes/discount-base.php:956 view/view-pricing-rules.php:667
243
  msgid "Adjustment Type"
244
  msgstr ""
245
 
246
+ #: includes/discount-base.php:957 view/view-pricing-rules.php:776
247
  msgid "Discount percentage"
248
  msgstr ""
249
 
250
+ #: includes/discount-base.php:958 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:959 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:960 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:961
267
  msgid "Product Discount - Not support for subtotal based rule"
268
  msgstr ""
269
 
270
+ #: includes/discount-base.php:962 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:963 view/view-pricing-rules.php:708
276
  msgid "receive discount for"
277
  msgstr ""
278
 
279
+ #: includes/discount-base.php:964 view/view-pricing-rules.php:710
280
  msgid "Auto add all selected products"
281
  msgstr ""
282
 
283
+ #: includes/discount-base.php:965 view/view-pricing-rules.php:711
284
  msgid "Same product"
285
  msgstr ""
286
 
287
+ #: includes/discount-base.php:966 view/view-pricing-rules.php:712
288
  msgid "Any one cheapest from selected"
289
  msgstr ""
290
 
291
+ #: includes/discount-base.php:967 view/view-pricing-rules.php:713
292
  msgid "Any one cheapest from all products"
293
  msgstr ""
294
 
295
+ #: includes/discount-base.php:968 view/view-pricing-rules.php:714
296
  msgid "Cheapest in cart - selected category(ies)"
297
  msgstr ""
298
 
299
+ #: includes/discount-base.php:969 view/view-pricing-rules.php:715
300
  msgid "Cheapest in cart - selected item(s)"
301
  msgstr ""
302
 
303
+ #: includes/discount-base.php:970 view/view-pricing-rules.php:716
304
  msgid "Cheapest among all items in cart"
305
  msgstr ""
306
 
307
+ #: includes/discount-base.php:971 view/view-pricing-rules.php:720
308
  msgid "Free quantity"
309
  msgstr ""
310
 
311
+ #: includes/discount-base.php:972 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:973 view/view-pricing-rules.php:734
316
  msgid "Fixed item count (not recommended)"
317
  msgstr ""
318
 
319
+ #: includes/discount-base.php:974 view/view-pricing-rules.php:733
320
  msgid "Dynamic item count"
321
  msgstr ""
322
 
323
+ #: includes/discount-base.php:975 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:976 view/view-pricing-rules.php:737
330
  msgid "Item count"
331
  msgstr ""
332
 
333
+ #: includes/discount-base.php:977 view/view-pricing-rules.php:737
334
  msgid "Discount for number of item(s) in cart"
335
  msgstr ""
336
 
337
+ #: includes/discount-base.php:978 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:979 view/view-pricing-rules.php:744
342
  msgid "Item quantity"
343
  msgstr ""
344
 
345
+ #: includes/discount-base.php:980
346
  msgid "Search for a products"
347
  msgstr ""
348
 
349
+ #: includes/discount-base.php:981
350
  msgid "and"
351
  msgstr ""
352
 
353
+ #: includes/discount-base.php:982 view/view-pricing-rules.php:778
354
  msgid "100% percent"
355
  msgstr ""
356
 
357
+ #: includes/discount-base.php:983 view/view-pricing-rules.php:779
358
  msgid "Limited percent"
359
  msgstr ""
360
 
361
+ #: includes/discount-base.php:984 view/view-pricing-rules.php:787
362
  msgid "Percentage"
363
  msgstr ""
364
 
365
+ #: includes/discount-base.php:985
366
  msgid "as discount"
367
  msgstr ""
368
 
369
+ #: includes/discount-base.php:986 view/view-cart-rules.php:575
370
  #: view/view-pricing-rules.php:793
371
  msgid "Remove"
372
  msgstr ""
373
 
374
+ #: includes/discount-base.php:987 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:988
380
  msgid "none"
381
  msgstr ""
382
 
383
+ #: includes/discount-base.php:989
384
  msgid "Are you sure to remove this ?"
385
  msgstr ""
386
 
387
+ #: includes/discount-base.php:991 view/cart-rules.php:130
388
  #: view/pricing-rules.php:160
389
  msgid "Disable"
390
  msgstr ""
391
 
392
+ #: includes/discount-base.php:992
393
  msgid "Are you sure to remove ?"
394
  msgstr ""
395
 
396
+ #: includes/discount-base.php:993 view/view-cart-rules.php:171
397
  msgid "Type"
398
  msgstr ""
399
 
400
+ #: includes/discount-base.php:994 view/view-cart-rules.php:175
401
  msgid "Cart Subtotal"
402
  msgstr ""
403
 
404
+ #: includes/discount-base.php:995 view/view-cart-rules.php:178
405
  msgid "Subtotal at least"
406
  msgstr ""
407
 
408
+ #: includes/discount-base.php:996 view/view-cart-rules.php:182
409
  msgid "Subtotal less than"
410
  msgstr ""
411
 
412
+ #: includes/discount-base.php:997 view/view-cart-rules.php:185
413
  msgid "Cart Item Count"
414
  msgstr ""
415
 
416
+ #: includes/discount-base.php:998 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:999 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:1000 view/view-cart-rules.php:195
425
  msgid "Quantity Sum"
426
  msgstr ""
427
 
428
+ #: includes/discount-base.php:1001 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:1002 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:1003 view/view-cart-rules.php:225
439
  msgid "Categories in cart"
440
  msgstr ""
441
 
442
+ #: includes/discount-base.php:1004 view/view-cart-rules.php:231
443
  msgid "Including sub-categories in cart"
444
  msgstr ""
445
 
446
+ #: includes/discount-base.php:1005 view/view-cart-rules.php:240
447
  msgid "Customer Details (must be logged in)"
448
  msgstr ""
449
 
450
+ #: includes/discount-base.php:1006 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:1007 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:1008 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:1009 view/view-cart-rules.php:272
466
  msgid "Customer Email"
467
  msgstr ""
468
 
469
+ #: includes/discount-base.php:1010
470
  msgid "Email with TLD (Ege: edu)"
471
  msgstr ""
472
 
473
+ #: includes/discount-base.php:1011 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:1012 view/view-cart-rules.php:294
479
  msgid "Customer Billing Details"
480
  msgstr ""
481
 
482
+ #: includes/discount-base.php:1013 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:1014 view/view-cart-rules.php:306
488
  msgid "Customer Shipping Details"
489
  msgstr ""
490
 
491
+ #: includes/discount-base.php:1015 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:1016 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:1017 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:1018 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:1019 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:1020 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:1021 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:1022 view/view-cart-rules.php:370
527
  msgid "Coupon applied"
528
  msgstr ""
529
 
530
+ #: includes/discount-base.php:1023 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:1024 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:1025 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:1026 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:1027 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:1028 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:1029 view/settings.php:21
562
  msgid "Save"
563
  msgstr ""
564
 
565
+ #: includes/discount-base.php:1030
566
  msgid "Saved Successfully!"
567
  msgstr ""
568
 
569
+ #: includes/discount-base.php:1031 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
575
  msgid "None selected"
576
  msgstr ""
577
 
578
+ #: includes/discount-base.php:1032 view/view-cart-rules.php:237
579
  msgid "In each category"
580
  msgstr ""
581
 
582
+ #: includes/discount-base.php:1033 view/settings.php:212 view/settings.php:336
583
+ #: view/settings.php:354 view/settings.php:372 view/settings.php:390
 
584
  msgid "Show"
585
  msgstr ""
586
 
587
+ #: includes/discount-base.php:1034 view/template/sidebar.php:12
588
  msgid "Hide"
589
  msgstr ""
590
 
591
+ #: includes/discount-base.php:1035
592
  msgid "Please select at least one rule"
593
  msgstr ""
594
 
595
+ #: includes/discount-base.php:1036
596
  msgid "Please select an action to apply"
597
  msgstr ""
598
 
599
+ #: includes/discount-base.php:1037
600
  msgid "Are you sure to remove the selected rules"
601
  msgstr ""
602
 
603
+ #: includes/discount-base.php:1038 view/view-pricing-rules.php:753
604
  msgid "Choose product(s)"
605
  msgstr ""
606
 
607
+ #: includes/discount-base.php:1039 view/view-pricing-rules.php:763
608
  msgid "Choose category(ies)"
609
  msgstr ""
610
 
611
+ #: includes/discount-base.php:1040
612
  msgid "Search for a coupon"
613
  msgstr ""
614
 
615
+ #: includes/discount-base.php:1041 view/view-pricing-rules.php:718
616
  msgid ""
617
  "Auto add all selected products - Automatically added to the cart <br> Same "
618
  "product - get discount in same product <br> Any one cheapest from selected - "
623
  "no.of quantities"
624
  msgstr ""
625
 
626
+ #: includes/pricing-rules.php:2582 view/view-pricing-rules.php:565
627
  msgid "Buy"
628
  msgstr ""
629
 
630
+ #: includes/pricing-rules.php:2586
631
  msgid " less than or equal to "
632
  msgstr ""
633
 
634
+ #: includes/pricing-rules.php:2586 includes/pricing-rules.php:2592
635
  msgid " Quantity"
636
  msgstr ""
637
 
638
+ #: includes/pricing-rules.php:2589
639
  msgid " Quantity "
640
  msgstr ""
641
 
642
+ #: includes/pricing-rules.php:2596
643
  msgid " or more Quantity"
644
  msgstr ""
645
 
646
+ #: includes/pricing-rules.php:2605
647
  msgid " any "
648
  msgstr ""
649
 
650
+ #: includes/pricing-rules.php:2605
651
  msgid " products from "
652
  msgstr ""
653
 
654
+ #: includes/pricing-rules.php:2612
655
  msgid " in each products"
656
  msgstr ""
657
 
658
+ #: includes/pricing-rules.php:2624
659
  msgid " and get discount in "
660
  msgstr ""
661
 
662
+ #: includes/pricing-rules.php:2627
663
  msgid " first "
664
  msgstr ""
665
 
666
+ #: includes/pricing-rules.php:2629 includes/pricing-rules.php:2633
667
  msgid " quantity of product(s) - "
668
  msgstr ""
669
 
670
+ #: includes/pricing-rules.php:2631
671
  msgid " after first "
672
  msgstr ""
673
 
674
+ #: includes/pricing-rules.php:2649
675
  msgid "Category(ies) "
676
  msgstr ""
677
 
678
+ #: includes/pricing-rules.php:2716
679
  msgid "Get "
680
  msgstr ""
681
 
682
+ #: includes/pricing-rules.php:2718
683
  #, php-format
684
  msgid "% discount in "
685
  msgstr ""
686
 
687
+ #: includes/pricing-rules.php:2721
688
  msgid "same product"
689
  msgstr ""
690
 
691
+ #: includes/pricing-rules.php:2723
692
  msgid "any cheapest one from cart"
693
  msgstr ""
694
 
695
+ #: includes/pricing-rules.php:2726
696
  msgid "any cheapest one of "
697
  msgstr ""
698
 
699
+ #: includes/pricing-rules.php:2731
700
  msgid " quantity of any "
701
  msgstr ""
702
 
703
+ #: includes/pricing-rules.php:2733
704
  msgid " cheapest item "
705
  msgstr ""
706
 
707
+ #: includes/pricing-rules.php:2736
708
  msgid " quantity of cheapest item "
709
  msgstr ""
710
 
711
+ #: includes/pricing-rules.php:2740
712
  msgid "from the category "
713
  msgstr ""
714
 
895
  msgid "Please contact our support team"
896
  msgstr ""
897
 
898
+ #: view/includes/header.php:14
899
  #, php-format
900
  msgid ""
901
  "An another discount plugin %s is active. Please disable this plugin, Woo "
959
  msgstr ""
960
 
961
  #: view/settings.php:88 view/settings.php:105 view/settings.php:117
962
+ #: view/settings.php:130 view/settings.php:406 view/settings.php:418
963
+ #: view/settings.php:430 view/settings.php:617
964
  msgid "Yes"
965
  msgstr ""
966
 
967
  #: view/settings.php:89 view/settings.php:106 view/settings.php:118
968
+ #: view/settings.php:131 view/settings.php:407 view/settings.php:419
969
+ #: view/settings.php:431 view/settings.php:618
970
  msgid "No"
971
  msgstr ""
972
 
995
  msgstr ""
996
 
997
  #: view/settings.php:150
998
+ msgid "Rule Setup"
999
  msgstr ""
1000
 
1001
+ #: view/settings.php:156 view/settings.php:507
1002
  msgid "Apply first matched rule"
1003
  msgstr ""
1004
 
1005
+ #: view/settings.php:162 view/settings.php:164 view/settings.php:513
1006
+ #: view/settings.php:515
1007
  msgid "Apply all matched rules"
1008
  msgstr ""
1009
 
1010
+ #: view/settings.php:171 view/settings.php:173 view/settings.php:522
1011
+ #: view/settings.php:524
1012
  msgid "Apply biggest discount"
1013
  msgstr ""
1014
 
1031
  msgstr ""
1032
 
1033
  #: view/settings.php:206
1034
+ msgid "Show Price discount on product pages :"
1035
  msgstr ""
1036
 
1037
+ #: view/settings.php:215 view/settings.php:339 view/settings.php:357
1038
+ #: view/settings.php:375 view/settings.php:393
1039
  msgid "Don't Show"
1040
  msgstr ""
1041
 
1042
+ #: view/settings.php:225
1043
+ msgid "Show a Sale badge on product pages :"
1044
  msgstr ""
1045
 
1046
+ #: view/settings.php:231
1047
+ msgid "Do not show"
1048
+ msgstr ""
1049
+
1050
+ #: view/settings.php:234
1051
+ msgid "Show only after a rule condition is matched exactly"
1052
+ msgstr ""
1053
+
1054
+ #: view/settings.php:237
1055
+ msgid ""
1056
+ "Show on products that are covered under any price based discount rule in the "
1057
+ "plugin"
1058
+ msgstr ""
1059
+
1060
+ #: view/settings.php:247
1061
+ msgid "Do you want to customize the sale badge?"
1062
  msgstr ""
1063
 
1064
+ #: view/settings.php:254
1065
+ msgid "Yes, I would like to customize the sale badge"
1066
  msgstr ""
1067
 
1068
+ #: view/settings.php:257 view/settings.php:540 view/view-pricing-rules.php:299
1069
  #: view/view-pricing-rules.php:356 view/view-pricing-rules.php:426
1070
  #: view/view-pricing-rules.php:472 view/view-pricing-rules.php:501
1071
  msgid "Supported in PRO version"
1072
  msgstr ""
1073
 
1074
+ #: view/settings.php:269
1075
+ msgid "Sale badge content (TIP: You can use HTML inside)"
1076
  msgstr ""
1077
 
1078
+ #: view/settings.php:276
1079
+ msgid ""
1080
+ "IMPORTANT NOTE: This customized sale badge will be applicable only for "
1081
+ "products that are part of the discount rules configured in this plugin"
1082
+ msgstr ""
1083
+
1084
+ #: view/settings.php:280
1085
  msgid "Eg:"
1086
  msgstr ""
1087
 
1088
+ #: view/settings.php:291
1089
  msgid "Discount Table :"
1090
  msgstr ""
1091
 
1092
+ #: view/settings.php:300
1093
  msgid "Default layout"
1094
  msgstr ""
1095
 
1096
+ #: view/settings.php:303
1097
  msgid "Advance layout"
1098
  msgstr ""
1099
 
1100
+ #: view/settings.php:312
1101
  msgid "Table placement:"
1102
  msgstr ""
1103
 
1104
+ #: view/settings.php:318
1105
  msgid "Before cart form"
1106
  msgstr ""
1107
 
1108
+ #: view/settings.php:321
1109
  msgid "After cart form"
1110
  msgstr ""
1111
 
1112
+ #: view/settings.php:330
1113
  msgid "Table header :"
1114
  msgstr ""
1115
 
1116
+ #: view/settings.php:348
1117
  msgid "Title column on table :"
1118
  msgstr ""
1119
 
1120
+ #: view/settings.php:366
1121
  msgid "Range column on table :"
1122
  msgstr ""
1123
 
1124
+ #: view/settings.php:384
1125
  msgid "Discount column on table :"
1126
  msgstr ""
1127
 
1128
+ #: view/settings.php:401
1129
+ msgid ""
1130
+ "Show a crossed-out original price along with discounted price at line items "
1131
+ "in cart"
1132
  msgstr ""
1133
 
1134
+ #: view/settings.php:413
1135
+ msgid ""
1136
+ "Auto add free product when coupon is applied (For coupon-activated rules)"
1137
  msgstr ""
1138
 
1139
+ #: view/settings.php:425
1140
+ msgid "Include variants when just parent products are chosen in the rules"
1141
  msgstr ""
1142
 
1143
+ #: view/settings.php:438
1144
  msgid "Display savings text"
1145
  msgstr ""
1146
 
1147
+ #: view/settings.php:447
1148
  msgid "On each line item"
1149
  msgstr ""
1150
 
1151
+ #: view/settings.php:450
1152
  msgid "On after total"
1153
  msgstr ""
1154
 
1155
+ #: view/settings.php:453
1156
  msgid "Both in line item and after total"
1157
  msgstr ""
1158
 
1159
+ #: view/settings.php:461
1160
  msgid "Savings text to show"
1161
  msgstr ""
1162
 
1163
+ #: view/settings.php:469
1164
  msgid "{{total_discount_price}} -> Total discount applied"
1165
  msgstr ""
1166
 
1167
+ #: view/settings.php:481
1168
  msgid "Cart rules settings"
1169
  msgstr ""
1170
 
1171
+ #: view/settings.php:488
1172
  msgid "Coupon Name to be displayed :"
1173
  msgstr ""
1174
 
1175
+ #: view/settings.php:494
1176
  msgid "Discount Coupon Name"
1177
  msgstr ""
1178
 
1179
+ #: view/settings.php:501
1180
  msgid "Rule Setup for Cart:"
1181
  msgstr ""
1182
 
1183
+ #: view/settings.php:533
1184
  msgid "Enable free shipping option"
1185
  msgstr ""
1186
 
1187
+ #: view/settings.php:553
1188
  msgid "Use Woocommerce free shipping"
1189
  msgstr ""
1190
 
1191
+ #: view/settings.php:556
1192
  msgid "Use Woo-Discount free shipping"
1193
  msgstr ""
1194
 
1195
+ #: view/settings.php:570
1196
  msgid "Free shipping text to be displayed"
1197
  msgstr ""
1198
 
1199
+ #: view/settings.php:577
1200
  msgid "Free Shipping title"
1201
  msgstr ""
1202
 
1203
+ #: view/settings.php:584
1204
  msgid "Draft"
1205
  msgstr ""
1206
 
1207
+ #: view/settings.php:594
1208
  msgid "Exclude Draft products in product select box."
1209
  msgstr ""
1210
 
1211
+ #: view/settings.php:604
1212
  msgid "Performance settings"
1213
  msgstr ""
1214
 
1215
+ #: view/settings.php:612
1216
  msgid "Enable cache for variable products table content"
1217
  msgstr ""
1218
 
1219
+ #: view/settings.php:624 view/settings.php:628
1220
  msgid "Clear cache"
1221
  msgstr ""
1222
 
1223
+ #: view/settings.php:638
1224
  msgid "Promotion settings"
1225
  msgstr ""
1226
 
1227
+ #: view/settings.php:645
1228
  msgid "Show a message on applying price rules in cart"
1229
  msgstr ""
1230
 
1231
+ #: view/settings.php:663 view/settings.php:698
1232
  msgid "Message"
1233
  msgstr ""
1234
 
1235
+ #: view/settings.php:671 view/settings.php:706
1236
  msgid "{{title}} -> Rule title"
1237
  msgstr ""
1238
 
1239
+ #: view/settings.php:672 view/settings.php:707
1240
  msgid "{{description}} -> Rule description"
1241
  msgstr ""
1242
 
1243
+ #: view/settings.php:680
1244
  msgid "Show a message on applying cart rules in cart"
1245
  msgstr ""
1246
 
includes/discount-base.php CHANGED
@@ -286,6 +286,17 @@ if (!class_exists('FlycartWooDiscountBase')) {
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
  }
@@ -304,7 +315,12 @@ if (!class_exists('FlycartWooDiscountBase')) {
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
  }
286
  $args = array( 'posts_per_page' => 30, 's' => $query,
287
  'paged' => $page, 'post_type' => 'shop_coupon' );
288
  $posts = get_posts($args);
289
+ if(!empty($posts) && count($posts) > 0){
290
+ foreach ($posts as $post){
291
+ if(function_exists('wc_strtolower')){
292
+ $coupon_name = wc_strtolower($post->post_title);
293
+ } else {
294
+ $coupon_name = strtolower($post->post_title);
295
+ }
296
+ $post->post_name = $coupon_name;
297
+ }
298
+ }
299
+
300
  echo json_encode($posts);
301
  die();
302
  }
315
  if(!empty($posts)){
316
  if(count($posts)){
317
  foreach ($posts as $post){
318
+ if(function_exists('wc_strtolower')){
319
+ $coupon_name = wc_strtolower($post->post_title);
320
+ } else {
321
+ $coupon_name = strtolower($post->post_title);
322
+ }
323
+ $html_options .= '<option value="'.$coupon_name.'" selected="selected">'.$post->post_title.'</option>';
324
  }
325
  }
326
  }
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_on_sale_details = array();
79
  public static $product_has_strike_out = array();
80
  public static $product_strike_out_price = array();
@@ -2692,7 +2693,8 @@ if (!class_exists('FlycartWooDiscountRulesPricingRules')) {
2692
  }
2693
  } else {
2694
  $title = isset($value->title) ? $value->title : '';
2695
- $min = isset($value->min_qty) ? $value->min_qty : 0;
 
2696
  $max = isset($value->max_qty) ? $value->max_qty : 0;
2697
  if($max == 0 || $max == '' || $max == false) $max = 999;
2698
  $discount_type = isset($value->discount_type) ? $value->discount_type : 0;
@@ -3113,6 +3115,7 @@ if (!class_exists('FlycartWooDiscountRulesPricingRules')) {
3113
 
3114
  // Actually adjust price in cart
3115
  // $woocommerce->cart->cart_contents[$item]['data']->price = $amount;
 
3116
  FlycartWoocommerceProduct::set_price($product, $amount);
3117
  $apply_rules_repeatedly = apply_filters('woo_discount_rules_apply_rules_repeatedly', false, $product);
3118
  if(!$apply_rules_repeatedly){
@@ -3321,7 +3324,7 @@ if (!class_exists('FlycartWooDiscountRulesPricingRules')) {
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])){
@@ -3407,11 +3410,12 @@ if (!class_exists('FlycartWooDiscountRulesPricingRules')) {
3407
  $runTheRulesEvenInAjax = apply_filters('woo_discount_rules_run_sale_tag_for_ajax', false, $product);
3408
  $notAdmin = FlycartWooDiscountRulesGeneralHelper::doIHaveToRun();
3409
  $show_price_discount_on_product_page = (isset($this->baseConfig['show_sale_tag_on_product_page']))? $this->baseConfig['show_sale_tag_on_product_page']: 'show';
3410
- if($show_price_discount_on_product_page == 'show' && ($notAdmin || $runTheRulesEvenInAjax)){
3411
  $product_id = FlycartWoocommerceProduct::get_id($product);
3412
  if(isset(self::$product_on_sale[$product_id])){
3413
  if(self::$product_on_sale[$product_id]){
3414
  $on_sale = true;
 
3415
  }
3416
  } else {
3417
  $show_price_discount_on_product_page = (isset($this->baseConfig['show_price_discount_on_product_page']))? $this->baseConfig['show_price_discount_on_product_page']: 'show';
@@ -3421,19 +3425,25 @@ if (!class_exists('FlycartWooDiscountRulesPricingRules')) {
3421
  if(isset(self::$product_on_sale[$product_id])){
3422
  if(self::$product_on_sale[$product_id]){
3423
  $on_sale = true;
 
3424
  }
3425
  }
3426
  } 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
  }
@@ -4034,12 +4044,15 @@ if (!class_exists('FlycartWooDiscountRulesPricingRules')) {
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
- }
75
  public static $product_categories = array();
76
  public static $product_attributes = array();
77
  public static $product_on_sale = array();
78
+ public static $woo_discount_product_on_sale_is_active = array();
79
  public static $product_on_sale_details = array();
80
  public static $product_has_strike_out = array();
81
  public static $product_strike_out_price = array();
2693
  }
2694
  } else {
2695
  $title = isset($value->title) ? $value->title : '';
2696
+ $min = isset($value->min_qty) ? $value->min_qty : 1;
2697
+ if(((int)$min) <= 0) $min = 1;
2698
  $max = isset($value->max_qty) ? $value->max_qty : 0;
2699
  if($max == 0 || $max == '' || $max == false) $max = 999;
2700
  $discount_type = isset($value->discount_type) ? $value->discount_type : 0;
3115
 
3116
  // Actually adjust price in cart
3117
  // $woocommerce->cart->cart_contents[$item]['data']->price = $amount;
3118
+ $amount = apply_filters('woo_discount_rules_before_apply_discount', $amount, $product, $woocommerce->cart->cart_contents[$item]);
3119
  FlycartWoocommerceProduct::set_price($product, $amount);
3120
  $apply_rules_repeatedly = apply_filters('woo_discount_rules_apply_rules_repeatedly', false, $product);
3121
  if(!$apply_rules_repeatedly){
3324
  public function replaceVisiblePricesForSalePriceAdjustment($item_price, $product)
3325
  {
3326
  $show_price_discount_on_product_page = (isset($this->baseConfig['show_sale_tag_on_product_page']))? $this->baseConfig['show_sale_tag_on_product_page']: 'show';
3327
+ if($show_price_discount_on_product_page == 'show_on_any_rules_matches') {
3328
  if (!$product->is_type(array('variable', 'subscription_variation', 'variable-subscription'))) {
3329
  $product_id = FlycartWoocommerceProduct::get_id($product);
3330
  // if(!empty(self::$product_on_sale_details[$product_id])){
3410
  $runTheRulesEvenInAjax = apply_filters('woo_discount_rules_run_sale_tag_for_ajax', false, $product);
3411
  $notAdmin = FlycartWooDiscountRulesGeneralHelper::doIHaveToRun();
3412
  $show_price_discount_on_product_page = (isset($this->baseConfig['show_sale_tag_on_product_page']))? $this->baseConfig['show_sale_tag_on_product_page']: 'show';
3413
+ if(($show_price_discount_on_product_page == 'show' || $show_price_discount_on_product_page == 'show_on_any_rules_matches') && ($notAdmin || $runTheRulesEvenInAjax)){
3414
  $product_id = FlycartWoocommerceProduct::get_id($product);
3415
  if(isset(self::$product_on_sale[$product_id])){
3416
  if(self::$product_on_sale[$product_id]){
3417
  $on_sale = true;
3418
+ self::$woo_discount_product_on_sale_is_active[$product_id] = true;
3419
  }
3420
  } else {
3421
  $show_price_discount_on_product_page = (isset($this->baseConfig['show_price_discount_on_product_page']))? $this->baseConfig['show_price_discount_on_product_page']: 'show';
3425
  if(isset(self::$product_on_sale[$product_id])){
3426
  if(self::$product_on_sale[$product_id]){
3427
  $on_sale = true;
3428
+ self::$woo_discount_product_on_sale_is_active[$product_id] = true;
3429
  }
3430
  }
3431
  } else {
3432
  $on_sale = $this->displayProductIsOnSaleTag($on_sale, $product);
3433
+ if($on_sale){
3434
+ self::$woo_discount_product_on_sale_is_active[$product_id] = true;
3435
+ }
3436
  }
3437
  }
3438
+ if($show_price_discount_on_product_page == 'show_on_any_rules_matches'){
3439
  $product_id = FlycartWoocommerceProduct::get_id($product);
3440
  if(!empty($this->matched_sets[$product_id])){
3441
  $on_sale = true;
3442
+ self::$woo_discount_product_on_sale_is_active[$product_id] = true;
3443
  }
3444
  if(!empty(self::$product_on_sale_details[$product_id])){
3445
  $on_sale = true;
3446
+ self::$woo_discount_product_on_sale_is_active[$product_id] = true;
3447
  }
3448
  }
3449
  }
4044
  public function replaceSaleTagText($html, $post, $_product){
4045
  $config = FlycartWooDiscountBase::get_instance();
4046
  $customize_sale_tag = $config->getConfigData('customize_sale_tag', 0);
4047
+ $product_id = FlycartWoocommerceProduct::get_id($_product);
4048
  if($customize_sale_tag){
4049
+ if(!empty(self::$woo_discount_product_on_sale_is_active[$product_id])){
4050
+ $customize_sale_tag_html = $config->getConfigData('customize_sale_tag_html', '<span class="onsale">Sale!</span>');
4051
+ $html = __($customize_sale_tag_html, 'woo-discount-rules');
4052
+ }
4053
  }
4054
 
4055
  return $html;
4056
  }
4057
  }
4058
+ }
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.7
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.7 - 28/01/19 =
316
  * Feature - Option to apply discount based on regular price
317
  * Feature - Option to customize sale tag(Pro)
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.8
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.8 - 06/02/19 =
316
+ * Fix - Coupon based rule doesn't work when Woocommerce coupon title updated
317
+ * Fix - Warning when regular price returns string value
318
+ * Improvement - Alert while having non supported plugin(WooCommerce Bulk Discount) is active
319
+ * Improvement - Event apply_filters('woo_discount_rules_before_apply_discount', $amount, $product, $woocommerce->cart->cart_contents[$item]);
320
+ * Improvement - Display 1 for min qty when min qty is 0 or null in product discount table
321
+ * Improvement - Additional option for sale badge, Show if product is part of any active rules
322
+ * Improvement - Customize sale badge should loads only for the products rules matches
323
+
324
  = 1.7.7 - 28/01/19 =
325
  * Feature - Option to apply discount based on regular price
326
  * Feature - Option to customize sale tag(Pro)
view/includes/header.php CHANGED
@@ -1,5 +1,6 @@
1
  <?php if (!defined('ABSPATH')) exit; // Exit if accessed directly
2
  $unsupported_plugins = array(
 
3
  'woocommerce-dynamic-pricing/woocommerce-dynamic-pricing.php' => 'WooCommerce Dynamic Pricing',
4
  'pricing-deals-for-woocommerce/vt-pricing-deals.php' => 'VarkTech Pricing Deals for WooCommerce',
5
  'dynamic-pricing-and-discounts-for-woocommerce-basic-version/dynamic-pricing-and-discounts-for-woocommerce-basic-version.php' => 'Dynamic Pricing and Discounts for WooCommerce Basic Version',
1
  <?php if (!defined('ABSPATH')) exit; // Exit if accessed directly
2
  $unsupported_plugins = array(
3
+ 'woocommerce-bulk-discount/woocommerce-bulk-discount.php' => 'WooCommerce Bulk Discount',
4
  'woocommerce-dynamic-pricing/woocommerce-dynamic-pricing.php' => 'WooCommerce Dynamic Pricing',
5
  'pricing-deals-for-woocommerce/vt-pricing-deals.php' => 'VarkTech Pricing Deals for WooCommerce',
6
  'dynamic-pricing-and-discounts-for-woocommerce-basic-version/dynamic-pricing-and-discounts-for-woocommerce-basic-version.php' => 'Dynamic Pricing and Discounts for WooCommerce Basic Version',
view/settings.php CHANGED
@@ -147,7 +147,7 @@ $isPro = $flycartWooDiscountRulesPurchase->isPro();
147
  <?php $data['price_setup'] = (isset($data['price_setup']) ? $data['price_setup'] : 'first'); ?>
148
  <div class="col-md-2">
149
  <label>
150
- <?php esc_html_e('Rule Setup for Price:', 'woo-discount-rules'); ?>
151
  </label>
152
  </div>
153
  <div class="col-md-6">
@@ -203,7 +203,7 @@ $isPro = $flycartWooDiscountRulesPurchase->isPro();
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">
205
  <label>
206
- <?php esc_html_e('Show Price discount on product page :', 'woo-discount-rules'); ?>
207
  </label>
208
  </div>
209
  <div class="col-md-6">
@@ -215,40 +215,43 @@ $isPro = $flycartWooDiscountRulesPurchase->isPro();
215
  value="dont"><?php esc_html_e("Don't Show", 'woo-discount-rules'); ?>
216
  </option>
217
  </select>
218
- <div class="notice notice-info"><p><?php esc_html_e('It displays only if any rule matches', 'woo-discount-rules'); ?></p></div>
219
  </div>
220
  </div>
221
  <div class="row form-group">
222
  <?php $data['show_sale_tag_on_product_page'] = (isset($data['show_sale_tag_on_product_page']) ? $data['show_sale_tag_on_product_page'] : 'show'); ?>
223
  <div class="col-md-2">
224
  <label>
225
- <?php esc_html_e('Show Sale badge on product page :', 'woo-discount-rules'); ?>
226
  </label>
227
  </div>
228
  <div class="col-md-6">
229
  <select class="selectpicker" name="show_sale_tag_on_product_page">
 
 
 
230
  <option <?php if ($data['show_sale_tag_on_product_page'] == 'show') { ?> selected=selected <?php } ?>
231
- value="show"><?php esc_html_e('Show', 'woo-discount-rules'); ?>
232
  </option>
233
- <option <?php if ($data['show_sale_tag_on_product_page'] == 'dont') { ?> selected=selected <?php } ?>
234
- value="dont"><?php esc_html_e("Don't Show", 'woo-discount-rules'); ?>
235
  </option>
236
  </select>
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');
@@ -263,15 +266,19 @@ $isPro = $flycartWooDiscountRulesPurchase->isPro();
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>
@@ -391,7 +398,7 @@ $isPro = $flycartWooDiscountRulesPurchase->isPro();
391
  <div class="row form-group">
392
  <div class="col-md-2">
393
  <label>
394
- <?php esc_html_e('Strikeout discount in cart item', 'woo-discount-rules'); ?>
395
  </label>
396
  </div>
397
  <?php $data['show_strikeout_in_cart'] = (isset($data['show_strikeout_in_cart']) ? $data['show_strikeout_in_cart'] : 1); ?>
@@ -403,7 +410,7 @@ $isPro = $flycartWooDiscountRulesPurchase->isPro();
403
  <div class="row form-group">
404
  <div class="col-md-2">
405
  <label>
406
- <?php esc_html_e('Auto add free product on coupon applied (For coupon based rules)', 'woo-discount-rules'); ?>
407
  </label>
408
  </div>
409
  <?php $data['add_free_product_on_coupon_applied'] = (isset($data['add_free_product_on_coupon_applied']) ? $data['add_free_product_on_coupon_applied'] : 0); ?>
@@ -415,7 +422,7 @@ $isPro = $flycartWooDiscountRulesPurchase->isPro();
415
  <div class="row form-group">
416
  <div class="col-md-2">
417
  <label>
418
- <?php esc_html_e('Include variants when just parent product is chosen in the rules', 'woo-discount-rules'); ?>
419
  </label>
420
  </div>
421
  <?php $data['include_variants_on_select_parent_product'] = (isset($data['include_variants_on_select_parent_product']) ? $data['include_variants_on_select_parent_product'] : 0); ?>
147
  <?php $data['price_setup'] = (isset($data['price_setup']) ? $data['price_setup'] : 'first'); ?>
148
  <div class="col-md-2">
149
  <label>
150
+ <?php esc_html_e('Rule Setup', 'woo-discount-rules'); ?>
151
  </label>
152
  </div>
153
  <div class="col-md-6">
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">
205
  <label>
206
+ <?php esc_html_e('Show Price discount on product pages :', 'woo-discount-rules'); ?>
207
  </label>
208
  </div>
209
  <div class="col-md-6">
215
  value="dont"><?php esc_html_e("Don't Show", 'woo-discount-rules'); ?>
216
  </option>
217
  </select>
218
+
219
  </div>
220
  </div>
221
  <div class="row form-group">
222
  <?php $data['show_sale_tag_on_product_page'] = (isset($data['show_sale_tag_on_product_page']) ? $data['show_sale_tag_on_product_page'] : 'show'); ?>
223
  <div class="col-md-2">
224
  <label>
225
+ <?php esc_html_e('Show a Sale badge on product pages :', 'woo-discount-rules'); ?>
226
  </label>
227
  </div>
228
  <div class="col-md-6">
229
  <select class="selectpicker" name="show_sale_tag_on_product_page">
230
+ <option <?php if ($data['show_sale_tag_on_product_page'] == 'dont') { ?> selected=selected <?php } ?>
231
+ value="dont"><?php esc_html_e("Do not show", 'woo-discount-rules'); ?>
232
+ </option>
233
  <option <?php if ($data['show_sale_tag_on_product_page'] == 'show') { ?> selected=selected <?php } ?>
234
+ value="show"><?php esc_html_e('Show only after a rule condition is matched exactly', 'woo-discount-rules'); ?>
235
  </option>
236
+ <option <?php if ($data['show_sale_tag_on_product_page'] == 'show_on_any_rules_matches') { ?> selected=selected <?php } ?>
237
+ value="show_on_any_rules_matches"><?php esc_html_e('Show on products that are covered under any price based discount rule in the plugin', 'woo-discount-rules'); ?>
238
  </option>
239
  </select>
240
+
241
  </div>
242
  </div>
243
  <div class="row form-group">
244
  <?php $data['customize_sale_tag'] = (isset($data['customize_sale_tag']) ? $data['customize_sale_tag'] : 0); ?>
245
  <div class="col-md-2">
246
  <label for="customize_sale_tag">
247
+ <?php esc_html_e('Do you want to customize the sale badge?', 'woo-discount-rules'); ?>
248
  </label>
249
  </div>
250
  <div class="col-md-6">
251
  <?php
252
  if($isPro){
253
  ?>
254
+ <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('Yes, I would like to customize the sale badge', 'woo-discount-rules'); ?></label>
255
  <?php
256
  } else {
257
  esc_html_e('Supported in PRO version', 'woo-discount-rules');
266
  <?php $data['customize_sale_tag_html'] = (isset($data['customize_sale_tag_html']) ? $data['customize_sale_tag_html'] : '<span class="onsale">Sale!</span>'); ?>
267
  <div class="col-md-2">
268
  <label>
269
+ <?php esc_html_e('Sale badge content (TIP: You can use HTML inside)', 'woo-discount-rules'); ?>
270
  </label>
271
  </div>
272
  <div class="col-md-6">
273
  <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>
274
  <div class="wdr_desc_text_con">
275
+ <span class="wdr_desc_text">
276
+ <?php esc_html_e('IMPORTANT NOTE: This customized sale badge will be applicable only for products that are part of the discount rules configured in this plugin', 'woo-discount-rules'); ?>
277
+ </span>
278
+ <br/>
279
+ <span class="wdr_desc_text">
280
+ <?php esc_html_e('Eg:', 'woo-discount-rules'); echo htmlentities('<span class="onsale">Sale!</span>'); ?>
281
+ </span>
282
  </div>
283
  </div>
284
  </div>
398
  <div class="row form-group">
399
  <div class="col-md-2">
400
  <label>
401
+ <?php esc_html_e('Show a crossed-out original price along with discounted price at line items in cart', 'woo-discount-rules'); ?>
402
  </label>
403
  </div>
404
  <?php $data['show_strikeout_in_cart'] = (isset($data['show_strikeout_in_cart']) ? $data['show_strikeout_in_cart'] : 1); ?>
410
  <div class="row form-group">
411
  <div class="col-md-2">
412
  <label>
413
+ <?php esc_html_e('Auto add free product when coupon is applied (For coupon-activated rules)', 'woo-discount-rules'); ?>
414
  </label>
415
  </div>
416
  <?php $data['add_free_product_on_coupon_applied'] = (isset($data['add_free_product_on_coupon_applied']) ? $data['add_free_product_on_coupon_applied'] : 0); ?>
422
  <div class="row form-group">
423
  <div class="col-md-2">
424
  <label>
425
+ <?php esc_html_e('Include variants when just parent products are chosen in the rules', 'woo-discount-rules'); ?>
426
  </label>
427
  </div>
428
  <?php $data['include_variants_on_select_parent_product'] = (isset($data['include_variants_on_select_parent_product']) ? $data['include_variants_on_select_parent_product'] : 0); ?>
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.7
9
  * Slug: woo-discount-rules
10
  * Text Domain: woo-discount-rules
11
  * Domain Path: /i18n/languages/
5
  * Description: Simple Discount Rules for WooCommerce.
6
  * Author: Flycart Technologies LLP
7
  * Author URI: https://www.flycart.org
8
+ * Version: 1.7.8
9
  * Slug: woo-discount-rules
10
  * Text Domain: woo-discount-rules
11
  * Domain Path: /i18n/languages/