Discount Rules for WooCommerce - Version 2.0.0

Version Description

  • 14/07/20 =
  • Fix - Cart discount price for single product.
  • Fix - Displaying strikeout when chosen apply as coupon.
  • Fix - Coupon code not migrated while migration.
  • Fix - Not in list condition not working.
  • Improvement - Displayed max rule limit reach msg and limits.
  • Improvement - select2 to selectWoo.
  • Improvement - Individual rule report.
  • Improvement - Download exported csv without storing in server.
  • Improvement - Report for BOGO rules.
  • Feature - Import option.
Download this release

Release Info

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

Code changes from version 1.9.12 to 2.0.0

common.php CHANGED
@@ -74,8 +74,8 @@ add_action('advanced_woo_discount_rules_on_settings_head', function () {
74
  global $awdr_load_version;
75
  $version = ($awdr_load_version == "v1") ? "v2" : "v1";
76
  $url = admin_url('admin.php?page=' . $page . '&awdr_switch_plugin_to=' . $version);
77
- $message = __('Switch to Discount Rules 2.0 which comes with a better UI and advanced rules. (You can switch back any time. Your settings and rules in V1 are kept as is)', WDR_TEXT_DOMAIN);
78
- $button_text = __("Switch to 2.0 <span style='background-color: #FF8C00 ; padding: 3px; border-radius: 4px'>Public beta</span>", WDR_TEXT_DOMAIN);
79
  if($version == "v1"){
80
  $has_switch = \Wdr\App\Helpers\Migration::hasSwitchBackOption();
81
  $message = __('Would you like to switch to older Woo Discount Rules?', WDR_TEXT_DOMAIN);
74
  global $awdr_load_version;
75
  $version = ($awdr_load_version == "v1") ? "v2" : "v1";
76
  $url = admin_url('admin.php?page=' . $page . '&awdr_switch_plugin_to=' . $version);
77
+ $message = __('Switch to Discount Rules V2 which comes with a better UI and advanced rules. (You can switch back any time. Your settings and rules in V1 are kept as is)', WDR_TEXT_DOMAIN);
78
+ $button_text = __("Switch to v2", WDR_TEXT_DOMAIN);
79
  if($version == "v1"){
80
  $has_switch = \Wdr\App\Helpers\Migration::hasSwitchBackOption();
81
  $message = __('Would you like to switch to older Woo Discount Rules?', WDR_TEXT_DOMAIN);
i18n/languages/woo-discount-rules.pot CHANGED
@@ -4,8 +4,8 @@ msgstr ""
4
  "Content-Type: text/plain; charset=UTF-8\n"
5
  "Content-Transfer-Encoding: 8bit\n"
6
  "Project-Id-Version: Woo Discount Rules\n"
7
- "POT-Creation-Date: 2020-04-08 10:44+0000\n"
8
- "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
9
  "Last-Translator: \n"
10
  "Language-Team: Flycart\n"
11
  "MIME-Version: 1.0\n"
@@ -66,15 +66,13 @@ msgstr ""
66
 
67
  #: common.php:77
68
  msgid ""
69
- "Switch to Discount Rules 2.0 which comes with a better UI and advanced "
70
  "rules. (You can switch back any time. Your settings and rules in V1 are "
71
  "kept as is)"
72
  msgstr ""
73
 
74
  #: common.php:78
75
- msgid ""
76
- "Switch to 2.0 <span style='background-color: #FF8C00 ; padding: 3px; border-"
77
- "radius: 4px'>Public beta</span>"
78
  msgstr ""
79
 
80
  #: common.php:81
@@ -150,7 +148,7 @@ msgstr ""
150
  msgid "License key for the %s is not entered. %s, you can get it from %s"
151
  msgstr ""
152
 
153
- #: v1/helper/general-helper.php:48 v2/App/Controllers/Admin/Settings.php:298
154
  msgid "Guest"
155
  msgstr ""
156
 
@@ -183,7 +181,7 @@ msgid "Read Docs"
183
  msgstr ""
184
 
185
  #: v1/helper/general-helper.php:1034 v1/view/view-cart-rules.php:697
186
- #: v1/view/view-pricing-rules.php:433 v2/App/Helpers/Woocommerce.php:1477
187
  msgid "Coupon already exists in WooCommerce. Please select another name"
188
  msgstr ""
189
 
@@ -256,7 +254,7 @@ msgstr ""
256
  #: v1/includes/advanced/free_shipping_method.php:73
257
  #: v1/includes/discount-base.php:1063 v1/view/cart-rules.php:133
258
  #: v1/view/pricing-rules.php:163 v1/view/settings_promotion.php:65
259
- #: v1/view/settings_promotion.php:100 v2/App/Controllers/Admin/Settings.php:408
260
  #: v2/App/Views/Admin/Tabs/DiscountRule.php:76
261
  msgid "Enable"
262
  msgstr ""
@@ -267,7 +265,7 @@ msgstr ""
267
 
268
  #: v1/includes/advanced/free_shipping_method.php:80
269
  #: v2/App/Views/Admin/Tabs/DiscountRule.php:103
270
- #: v2/App/Views/Admin/Tabs/DiscountRule.php:310
271
  msgid "Title"
272
  msgstr ""
273
 
@@ -284,7 +282,7 @@ msgid "Failed to save"
284
  msgstr ""
285
 
286
  #: v1/includes/discount-base.php:203 v1/view/cart-rules.php:162
287
- #: v1/view/pricing-rules.php:192 v2/App/Controllers/Admin/Settings.php:407
288
  msgid "Active"
289
  msgstr ""
290
 
@@ -294,7 +292,7 @@ msgstr ""
294
  #: v1/view/settings_promotion.php:22 v1/view/settings_promotion.php:62
295
  #: v1/view/settings_promotion.php:97 v1/view/settings_promotion.php:132
296
  #: v2/App/Views/Admin/Tabs/DiscountRule.php:250
297
- #: v2/App/Views/Admin/Tabs/settings.php:339
298
  msgid "Disabled"
299
  msgstr ""
300
 
@@ -366,7 +364,7 @@ msgstr ""
366
 
367
  #: v1/includes/discount-base.php:1024 v1/view/view-pricing-rules.php:654
368
  #: v1/view/view-pricing-rules.php:657 v1/view/view-pricing-rules.php:677
369
- #: v2/App/Controllers/Admin/Settings.php:425
370
  msgid "Quantity"
371
  msgstr ""
372
 
@@ -395,7 +393,7 @@ msgid "Adjustment Type"
395
  msgstr ""
396
 
397
  #: v1/includes/discount-base.php:1030 v1/view/view-pricing-rules.php:954
398
- #: v2/App/Controllers/Admin/Settings.php:428
399
  msgid "Discount percentage"
400
  msgstr ""
401
 
@@ -529,7 +527,7 @@ msgstr ""
529
 
530
  #: v1/includes/discount-base.php:1060 v1/view/cart-rules.php:185
531
  #: v1/view/pricing-rules.php:215 v1/view/view-pricing-rules.php:971
532
- #: v2/App/Views/Admin/Tabs/DiscountRule.php:283
533
  msgid "Duplicate"
534
  msgstr ""
535
 
@@ -542,7 +540,7 @@ msgid "Are you sure to remove this ?"
542
  msgstr ""
543
 
544
  #: v1/includes/discount-base.php:1064 v1/view/cart-rules.php:130
545
- #: v1/view/pricing-rules.php:160 v2/App/Controllers/Admin/Settings.php:406
546
  #: v2/App/Views/Admin/Tabs/DiscountRule.php:77
547
  msgid "Disable"
548
  msgstr ""
@@ -727,12 +725,12 @@ msgstr ""
727
  #: v1/view/cart-rules.php:224 v1/view/pricing-rules.php:144
728
  #: v1/view/pricing-rules.php:254 v1/view/view-cart-rules.php:700
729
  #: v2/App/Views/Admin/Tabs/DiscountRule.php:127
730
- #: v2/App/Views/Admin/Tabs/DiscountRule.php:334
731
  msgid "Action"
732
  msgstr ""
733
 
734
  #: v1/includes/discount-base.php:1104 v1/view/settings.php:33
735
- #: v1/view/settings_taxonomy.php:21 v2/App/Views/Admin/Rules/Manage.php:75
736
  msgid "Save"
737
  msgstr ""
738
 
@@ -756,7 +754,7 @@ msgstr ""
756
  #: v1/includes/discount-base.php:1108 v1/view/settings_price_rules.php:208
757
  #: v1/view/settings_price_rules.php:226 v1/view/settings_price_rules.php:244
758
  #: v1/view/settings_price_rules.php:262
759
- #: v2/App/Views/Admin/Tabs/settings.php:518
760
  msgid "Show"
761
  msgstr ""
762
 
@@ -994,7 +992,7 @@ msgid ""
994
  "defined in WooCommerce -> Attributes. <a href=\"%s\">Read docs</a>.</span>"
995
  msgstr ""
996
 
997
- #: v1/includes/discount-base.php:1237 v2/App/Controllers/ManageDiscount.php:804
998
  #, php-format
999
  msgid ""
1000
  "Sorry, it is not possible to apply coupon <b>\"%s\"</b> as you already have "
@@ -1238,27 +1236,27 @@ msgstr ""
1238
  #: v1/view/cart-rules.php:99 v1/view/cart-rules.php:209
1239
  #: v1/view/pricing-rules.php:129 v1/view/pricing-rules.php:239
1240
  #: v2/App/Views/Admin/Tabs/DiscountRule.php:110
1241
- #: v2/App/Views/Admin/Tabs/DiscountRule.php:317
1242
  msgid "Start Date"
1243
  msgstr ""
1244
 
1245
  #: v1/view/cart-rules.php:100 v1/view/cart-rules.php:210
1246
  #: v1/view/pricing-rules.php:130 v1/view/pricing-rules.php:240
1247
  #: v2/App/Views/Admin/Tabs/DiscountRule.php:112
1248
- #: v2/App/Views/Admin/Tabs/DiscountRule.php:319
1249
  msgid "Expired On"
1250
  msgstr ""
1251
 
1252
  #: v1/view/cart-rules.php:101 v1/view/cart-rules.php:211
1253
  #: v1/view/pricing-rules.php:131 v1/view/pricing-rules.php:241
1254
  #: v2/App/Views/Admin/Tabs/DiscountRule.php:125
1255
- #: v2/App/Views/Admin/Tabs/DiscountRule.php:332
1256
  msgid "Status"
1257
  msgstr ""
1258
 
1259
  #: v1/view/cart-rules.php:104 v1/view/cart-rules.php:214
1260
  #: v1/view/pricing-rules.php:134 v1/view/pricing-rules.php:244
1261
- #: v2/App/Views/Admin/Rules/Conditions/Main.php:199
1262
  msgid "Language"
1263
  msgstr ""
1264
 
@@ -1268,13 +1266,13 @@ msgid "Order"
1268
  msgstr ""
1269
 
1270
  #: v1/view/cart-rules.php:181 v1/view/pricing-rules.php:211
1271
- #: v2/App/Views/Admin/Tabs/DiscountRule.php:281
1272
  msgid "Edit"
1273
  msgstr ""
1274
 
1275
  #: v1/view/cart-rules.php:192 v1/view/pricing-rules.php:222
1276
  #: v2/App/Views/Admin/Tabs/DiscountRule.php:78
1277
- #: v2/App/Views/Admin/Tabs/DiscountRule.php:286
1278
  msgid "Delete"
1279
  msgstr ""
1280
 
@@ -1413,9 +1411,9 @@ msgstr ""
1413
 
1414
  #: v1/view/includes/cart-menu.php:13 v1/view/includes/sub-menu.php:13
1415
  #: v1/view/template/discount-table.php:42 v1/view/view-cart-rules.php:756
1416
- #: v1/view/view-pricing-rules.php:708 v2/App/Controllers/Admin/Settings.php:433
1417
  #: v2/App/Views/Admin/Rules/Discounts/Bulk.php:59
1418
- #: v2/App/Views/Admin/Rules/Manage.php:175
1419
  msgid "Discount"
1420
  msgstr ""
1421
 
@@ -1472,7 +1470,7 @@ msgstr ""
1472
  msgid "Performance"
1473
  msgstr ""
1474
 
1475
- #: v1/view/settings.php:42 v2/App/Views/Admin/Tabs/settings.php:295
1476
  msgid "Promotion"
1477
  msgstr ""
1478
 
@@ -1594,11 +1592,12 @@ msgstr ""
1594
  #: v2/App/Views/Admin/Rules/DiscountBatch/Main.php:43
1595
  #: v2/App/Views/Admin/Tabs/settings.php:55
1596
  #: v2/App/Views/Admin/Tabs/settings.php:86
1597
- #: v2/App/Views/Admin/Tabs/settings.php:158
1598
- #: v2/App/Views/Admin/Tabs/settings.php:253
1599
- #: v2/App/Views/Admin/Tabs/settings.php:270
1600
- #: v2/App/Views/Admin/Tabs/settings.php:308
1601
- #: v2/App/Views/Admin/Tabs/settings.php:366
 
1602
  msgid "Yes"
1603
  msgstr ""
1604
 
@@ -1609,11 +1608,12 @@ msgstr ""
1609
  #: v2/App/Views/Admin/Rules/DiscountBatch/Main.php:48
1610
  #: v2/App/Views/Admin/Tabs/settings.php:59
1611
  #: v2/App/Views/Admin/Tabs/settings.php:90
1612
- #: v2/App/Views/Admin/Tabs/settings.php:161
1613
- #: v2/App/Views/Admin/Tabs/settings.php:257
1614
- #: v2/App/Views/Admin/Tabs/settings.php:276
1615
- #: v2/App/Views/Admin/Tabs/settings.php:314
1616
- #: v2/App/Views/Admin/Tabs/settings.php:371
 
1617
  msgid "No"
1618
  msgstr ""
1619
 
@@ -1725,24 +1725,24 @@ msgid "Show Price discount on product pages :"
1725
  msgstr ""
1726
 
1727
  #: v1/view/settings_price_rules.php:128
1728
- #: v2/App/Views/Admin/Tabs/settings.php:228
1729
  msgid "Show when a rule condition is matched"
1730
  msgstr ""
1731
 
1732
  #: v1/view/settings_price_rules.php:131
1733
- #: v2/App/Views/Admin/Tabs/settings.php:229
1734
  msgid "Show after a rule condition is matched"
1735
  msgstr ""
1736
 
1737
  #: v1/view/settings_price_rules.php:134
1738
- #: v2/App/Views/Admin/Tabs/settings.php:230
1739
  msgid "Shown on quantity update (dynamic)"
1740
  msgstr ""
1741
 
1742
  #: v1/view/settings_price_rules.php:137 v1/view/settings_price_rules.php:211
1743
  #: v1/view/settings_price_rules.php:229 v1/view/settings_price_rules.php:247
1744
  #: v1/view/settings_price_rules.php:265
1745
- #: v2/App/Views/Admin/Tabs/settings.php:521
1746
  msgid "Don't Show"
1747
  msgstr ""
1748
 
@@ -1797,12 +1797,12 @@ msgid "Show a Sale badge on product pages :"
1797
  msgstr ""
1798
 
1799
  #: v1/view/settings_price_rules.php:284
1800
- #: v2/App/Views/Admin/Tabs/settings.php:115
1801
  msgid "Do not show"
1802
  msgstr ""
1803
 
1804
  #: v1/view/settings_price_rules.php:287
1805
- #: v2/App/Views/Admin/Tabs/settings.php:113
1806
  msgid "Show only after a rule condition is matched exactly"
1807
  msgstr ""
1808
 
@@ -1813,17 +1813,17 @@ msgid ""
1813
  msgstr ""
1814
 
1815
  #: v1/view/settings_price_rules.php:301
1816
- #: v2/App/Views/Admin/Tabs/settings.php:121
1817
  msgid "Do you want to customize the sale badge?"
1818
  msgstr ""
1819
 
1820
  #: v1/view/settings_price_rules.php:308
1821
- #: v2/App/Views/Admin/Tabs/settings.php:131
1822
  msgid "Yes, I would like to customize the sale badge"
1823
  msgstr ""
1824
 
1825
  #: v1/view/settings_price_rules.php:310
1826
- #: v2/App/Views/Admin/Tabs/settings.php:135
1827
  msgid ""
1828
  "Force override the label for sale badge (useful when your theme has override "
1829
  "for sale badge)."
@@ -1851,19 +1851,19 @@ msgstr ""
1851
  msgid "Display savings text (for price rules)"
1852
  msgstr ""
1853
 
1854
- #: v1/view/settings_promotion.php:25 v2/App/Views/Admin/Tabs/settings.php:340
1855
  msgid "On each line item"
1856
  msgstr ""
1857
 
1858
- #: v1/view/settings_promotion.php:28 v2/App/Views/Admin/Tabs/settings.php:341
1859
  msgid "On after total"
1860
  msgstr ""
1861
 
1862
- #: v1/view/settings_promotion.php:31 v2/App/Views/Admin/Tabs/settings.php:342
1863
  msgid "Both in line item and after total"
1864
  msgstr ""
1865
 
1866
- #: v1/view/settings_promotion.php:39 v2/App/Views/Admin/Tabs/settings.php:349
1867
  msgid "Savings text to show"
1868
  msgstr ""
1869
 
@@ -1899,19 +1899,19 @@ msgid ""
1899
  "discounts)"
1900
  msgstr ""
1901
 
1902
- #: v1/view/settings_promotion.php:134 v2/App/Views/Admin/Tabs/settings.php:325
1903
  msgid "Shop page"
1904
  msgstr ""
1905
 
1906
- #: v1/view/settings_promotion.php:137 v2/App/Views/Admin/Tabs/settings.php:326
1907
  msgid "Product page"
1908
  msgstr ""
1909
 
1910
- #: v1/view/settings_promotion.php:140 v2/App/Views/Admin/Tabs/settings.php:327
1911
  msgid "Cart page"
1912
  msgstr ""
1913
 
1914
- #: v1/view/settings_promotion.php:143 v2/App/Views/Admin/Tabs/settings.php:328
1915
  msgid "Checkout page"
1916
  msgstr ""
1917
 
@@ -1951,64 +1951,64 @@ msgstr ""
1951
  msgid "Sale!"
1952
  msgstr ""
1953
 
1954
- #: v1/view/template/sidebar.php:7 v2/App/Views/Admin/Tabs/DiscountRule.php:367
1955
  msgid "Looking for more features? Upgrade to PRO"
1956
  msgstr ""
1957
 
1958
- #: v1/view/template/sidebar.php:19 v2/App/Views/Admin/Tabs/DiscountRule.php:372
1959
  msgid "With PRO version, you can create:"
1960
  msgstr ""
1961
 
1962
- #: v1/view/template/sidebar.php:20 v2/App/Views/Admin/Tabs/DiscountRule.php:373
1963
  msgid "- Categories based discounts"
1964
  msgstr ""
1965
 
1966
- #: v1/view/template/sidebar.php:21 v2/App/Views/Admin/Tabs/DiscountRule.php:374
1967
  msgid "- User roles based discounts"
1968
  msgstr ""
1969
 
1970
- #: v1/view/template/sidebar.php:22 v2/App/Views/Admin/Tabs/DiscountRule.php:375
1971
  msgid "- Buy One Get One Free deals"
1972
  msgstr ""
1973
 
1974
- #: v1/view/template/sidebar.php:23 v2/App/Views/Admin/Tabs/DiscountRule.php:376
1975
  msgid "- Buy X Get Y deals"
1976
  msgstr ""
1977
 
1978
- #: v1/view/template/sidebar.php:24 v2/App/Views/Admin/Tabs/DiscountRule.php:377
1979
  #, php-format
1980
  msgid "- Buy 2, get 1 at 50% discount"
1981
  msgstr ""
1982
 
1983
- #: v1/view/template/sidebar.php:25 v2/App/Views/Admin/Tabs/DiscountRule.php:378
1984
  msgid "- Buy 3 for $10 (Package / Bundle [Set] Discount)"
1985
  msgstr ""
1986
 
1987
- #: v1/view/template/sidebar.php:26 v2/App/Views/Admin/Tabs/DiscountRule.php:379
1988
  msgid "- Different discounts with one coupon code"
1989
  msgstr ""
1990
 
1991
- #: v1/view/template/sidebar.php:27 v2/App/Views/Admin/Tabs/DiscountRule.php:380
1992
  msgid "- Purchase history based discounts"
1993
  msgstr ""
1994
 
1995
- #: v1/view/template/sidebar.php:28 v2/App/Views/Admin/Tabs/DiscountRule.php:381
1996
  msgid "- Free product / gift"
1997
  msgstr ""
1998
 
1999
- #: v1/view/template/sidebar.php:29 v2/App/Views/Admin/Tabs/DiscountRule.php:382
2000
  msgid "- Discount for variants"
2001
  msgstr ""
2002
 
2003
- #: v1/view/template/sidebar.php:30 v2/App/Views/Admin/Tabs/DiscountRule.php:383
2004
  msgid "- Conditional discounts"
2005
  msgstr ""
2006
 
2007
- #: v1/view/template/sidebar.php:31 v2/App/Views/Admin/Tabs/DiscountRule.php:384
2008
  msgid "- Fixed cost discounts"
2009
  msgstr ""
2010
 
2011
- #: v1/view/template/sidebar.php:32 v2/App/Views/Admin/Tabs/DiscountRule.php:385
2012
  msgid "- Offer fixed price on certain conditions"
2013
  msgstr ""
2014
 
@@ -2025,8 +2025,11 @@ msgid "Edit Cart Rule"
2025
  msgstr ""
2026
 
2027
  #: v1/view/view-cart-rules.php:75 v1/view/view-pricing-rules.php:57
2028
- #: v2/App/Views/Admin/Rules/Manage.php:16
2029
- #: v2/App/Views/Admin/Rules/Manage.php:23
 
 
 
2030
  msgid "This rule is not running currently: "
2031
  msgstr ""
2032
 
@@ -2041,6 +2044,7 @@ msgid ""
2041
  msgstr ""
2042
 
2043
  #: v1/view/view-cart-rules.php:98 v1/view/view-pricing-rules.php:81
 
2044
  msgid "Rule Name"
2045
  msgstr ""
2046
 
@@ -2075,7 +2079,7 @@ msgid "To"
2075
  msgstr ""
2076
 
2077
  #: v1/view/view-cart-rules.php:140 v1/view/view-pricing-rules.php:149
2078
- #: v2/App/Views/Admin/Rules/Conditions/Main.php:134
2079
  #, php-format
2080
  msgid "Current date and time: %s"
2081
  msgstr ""
@@ -2514,11 +2518,11 @@ msgstr ""
2514
  msgid "Fixed"
2515
  msgstr ""
2516
 
2517
- #: v2/App/Compatibility/CompositeProductsBySomewhereWarm.php:44
2518
  msgid "Add compatible for WooCommerce Composite Products"
2519
  msgstr ""
2520
 
2521
- #: v2/App/Compatibility/CompositeProductsBySomewhereWarm.php:47
2522
  msgid ""
2523
  "Limitation: Product page strikeout. We suggest to disable strikeout on "
2524
  "product page."
@@ -2553,7 +2557,7 @@ msgstr ""
2553
  #: v2/App/Conditions/CartLineItemsCount.php:16
2554
  #: v2/App/Conditions/CartSubTotal.php:18 v2/App/Helpers/ProOptions.php:80
2555
  #: v2/App/Helpers/ProOptions.php:136 v2/App/Helpers/ProOptions.php:144
2556
- #: v2/App/Helpers/ProOptions.php:152 v2/App/Views/Admin/Tabs/settings.php:241
2557
  msgid "Cart"
2558
  msgstr ""
2559
 
@@ -2563,137 +2567,137 @@ msgid ""
2563
  "disable it!"
2564
  msgstr ""
2565
 
2566
- #: v2/App/Controllers/Admin/Settings.php:219
2567
  msgid "no results"
2568
  msgstr ""
2569
 
2570
- #: v2/App/Controllers/Admin/Settings.php:220
2571
  msgid "Select Values"
2572
  msgstr ""
2573
 
2574
- #: v2/App/Controllers/Admin/Settings.php:409
2575
- #: v2/App/Views/Admin/Tabs/DiscountRule.php:274
2576
  msgid " - (Running)"
2577
  msgstr ""
2578
 
2579
- #: v2/App/Controllers/Admin/Settings.php:410
2580
  msgid "Oops!! something went wrong!"
2581
  msgstr ""
2582
 
2583
- #: v2/App/Controllers/Admin/Settings.php:411
2584
  msgid "Rule duplicated successfully!"
2585
  msgstr ""
2586
 
2587
- #: v2/App/Controllers/Admin/Settings.php:412
2588
  msgid "Rule deleted successfully!"
2589
  msgstr ""
2590
 
2591
- #: v2/App/Controllers/Admin/Settings.php:413
2592
  msgid "Are you sure want to delete this rule!"
2593
  msgstr ""
2594
 
2595
- #: v2/App/Controllers/Admin/Settings.php:414
2596
  msgid "Rule disabled successfully!"
2597
  msgstr ""
2598
 
2599
- #: v2/App/Controllers/Admin/Settings.php:415
2600
  msgid "Rule enabled successfully!"
2601
  msgstr ""
2602
 
2603
- #: v2/App/Controllers/Admin/Settings.php:416
2604
  msgid "Rule saved successfully!"
2605
  msgstr ""
2606
 
2607
- #: v2/App/Controllers/Admin/Settings.php:417
2608
  msgid "Settings saved successfully!"
2609
  msgstr ""
2610
 
2611
- #: v2/App/Controllers/Admin/Settings.php:418
2612
  msgid "Rule priority changed successfully!"
2613
  msgstr ""
2614
 
2615
- #: v2/App/Controllers/Admin/Settings.php:419
2616
  msgid "Rule priority not changed !"
2617
  msgstr ""
2618
 
2619
- #: v2/App/Controllers/Admin/Settings.php:420
2620
  msgid "No data for this period"
2621
  msgstr ""
2622
 
2623
- #: v2/App/Controllers/Admin/Settings.php:421
2624
  msgid "Oops! Coupon already exists in Woocommerce"
2625
  msgstr ""
2626
 
2627
- #: v2/App/Controllers/Admin/Settings.php:422
2628
  msgid "Copied!"
2629
  msgstr ""
2630
 
2631
- #: v2/App/Controllers/Admin/Settings.php:423
2632
- #: v2/App/Views/Admin/Tabs/settings.php:481
2633
  msgid "Copy ShortCode"
2634
  msgstr ""
2635
 
2636
- #: v2/App/Controllers/Admin/Settings.php:424
2637
  msgid "If you make this recursive other row(s) will be removed!"
2638
  msgstr ""
2639
 
2640
- #: v2/App/Controllers/Admin/Settings.php:426
2641
  msgid "Minimum Quantity"
2642
  msgstr ""
2643
 
2644
- #: v2/App/Controllers/Admin/Settings.php:427
2645
  msgid "Discount value"
2646
  msgstr ""
2647
 
2648
- #: v2/App/Controllers/Admin/Settings.php:429
2649
  msgid "Filter (Buy)"
2650
  msgstr ""
2651
 
2652
- #: v2/App/Controllers/Admin/Settings.php:430
2653
- #: v2/App/Views/Admin/Rules/Manage.php:130
2654
  msgid "Filter"
2655
  msgstr ""
2656
 
2657
- #: v2/App/Controllers/Admin/Settings.php:431
2658
  msgid ""
2659
  "<p>Choose <b>what gets discount</b> (products/categories/attributes/SKU and "
2660
  "so on )</p>\n"
2661
  "<p>Note : You can also exclude products/categories.</p>"
2662
  msgstr ""
2663
 
2664
- #: v2/App/Controllers/Admin/Settings.php:434
2665
  msgid ""
2666
  "<p>Select discount type and its value (percentage/price/fixed price)</p>"
2667
  msgstr ""
2668
 
2669
- #: v2/App/Controllers/Admin/Settings.php:435
2670
  msgid "Rules (optional)"
2671
  msgstr ""
2672
 
2673
- #: v2/App/Controllers/Admin/Settings.php:436
2674
  msgid ""
2675
  "<p>Include additional conditions (if necessary) to apply discount for "
2676
  "product filters.</p>"
2677
  msgstr ""
2678
 
2679
- #: v2/App/Controllers/Admin/Settings.php:437
2680
  msgid ""
2681
  "<p>Choose Buy Products. (products/categories/attributes/tags/sku) Example : "
2682
  "For Buy X get Y scenarios, choose X here.</p>"
2683
  msgstr ""
2684
 
2685
- #: v2/App/Controllers/Admin/Settings.php:438
2686
  msgid ""
2687
  "<p>Choose on which products the discount should be applied (This can be "
2688
  "products/categories/SKU)</p>"
2689
  msgstr ""
2690
 
2691
- #: v2/App/Controllers/Admin/Settings.php:439
2692
- #: v2/App/Controllers/Admin/Settings.php:441
2693
  msgid "Get Discount"
2694
  msgstr ""
2695
 
2696
- #: v2/App/Controllers/Admin/Settings.php:440
2697
  msgid ""
2698
  "<p>Enter the min/max ranges and choose free item quantity.</p><p>Note : "
2699
  "Enable recursive checkbox if the discounts should be applied in sequential "
@@ -2701,7 +2705,7 @@ msgid ""
2701
  "p>"
2702
  msgstr ""
2703
 
2704
- #: v2/App/Controllers/Admin/Settings.php:442
2705
  msgid ""
2706
  "<p>Choose the adjustment type to which the discount should be applied. You "
2707
  "can choose from products/categories/all products.</p><p>Note : Enable "
@@ -2709,7 +2713,7 @@ msgid ""
2709
  "</p>"
2710
  msgstr ""
2711
 
2712
- #: v2/App/Controllers/Admin/Settings.php:443
2713
  msgid ""
2714
  "<p>Choose the adjustment type to which the discount should be applied. You "
2715
  "can choose from products/categories/all products.</p><p>Note : Enable "
@@ -2720,45 +2724,45 @@ msgid ""
2720
  "td><td>5</td><td>2</td></tr></tbody></table>"
2721
  msgstr ""
2722
 
2723
- #: v2/App/Controllers/Admin/Settings.php:444
2724
- #: v2/App/Controllers/Admin/Settings.php:445
2725
  msgid "<p>Include additional conditions (if necessary)</p>"
2726
  msgstr ""
2727
 
2728
- #: v2/App/Controllers/Admin/Settings.php:446
2729
  msgid "<p>Processing migration, please wait...</p>"
2730
  msgstr ""
2731
 
2732
- #: v2/App/Controllers/Admin/Settings.php:447
2733
  msgid "<p>Migration completed.</p>"
2734
  msgstr ""
2735
 
2736
- #: v2/App/Controllers/Admin/Settings.php:448
2737
  msgid "<p>Migration skipped.</p>"
2738
  msgstr ""
2739
 
2740
- #: v2/App/Controllers/Admin/Settings.php:449
2741
  msgid "<p>Skipping migration, please wait...</p>"
2742
  msgstr ""
2743
 
2744
- #: v2/App/Controllers/Admin/Settings.php:450
2745
  msgid ""
2746
  "<span><b>Example:</b> Product A - Small and Product A - Medium will be "
2747
  "counted as 2 quantity</span>"
2748
  msgstr ""
2749
 
2750
- #: v2/App/Controllers/Admin/Settings.php:451
2751
  msgid "<span>Discount applies to all eligible products in the store</span>"
2752
  msgstr ""
2753
 
2754
- #: v2/App/Controllers/Admin/Settings.php:452
2755
  msgid ""
2756
  "<span>Choose products that get the discount using \"In List\". If you want "
2757
  "to exclude a few products, choose \"Not In List\" and select the products "
2758
  "you wanted to exclude from discount. (You can add multiple filters)</span>"
2759
  msgstr ""
2760
 
2761
- #: v2/App/Controllers/Admin/Settings.php:453
2762
  msgid ""
2763
  "<span>Choose categories that get the discount using \"In List\". If you want "
2764
  "to exclude a few categories, choose \"Not In List\" and select the "
@@ -2766,7 +2770,7 @@ msgid ""
2766
  "filters of same type)</span>"
2767
  msgstr ""
2768
 
2769
- #: v2/App/Controllers/Admin/Settings.php:454
2770
  msgid ""
2771
  "<span> Choose attributes that get the discount using \"In List\". If you "
2772
  "want to exclude a few attributes, choose \"Not In List\" and select the "
@@ -2774,42 +2778,61 @@ msgid ""
2774
  "filters of same type)</span>"
2775
  msgstr ""
2776
 
2777
- #: v2/App/Controllers/Admin/Settings.php:455
2778
  msgid ""
2779
  "<span>Choose tags that get the discount using \"In List\". If you want to "
2780
  "exclude a few tags, choose \"Not In List\" and select the tags you wanted to "
2781
  "exclude from discount. (You can add multiple filters of same type)</span>"
2782
  msgstr ""
2783
 
2784
- #: v2/App/Controllers/Admin/Settings.php:456
2785
  msgid ""
2786
  "<span>Choose SKUs that get the discount using \"In List\". If you want to "
2787
  "exclude a few SKUs, choose \"Not In List\" and select the SKUs you wanted to "
2788
  "exclude from discount. (You can add multiple filters of same type)</span>"
2789
  msgstr ""
2790
 
2791
- #: v2/App/Controllers/Admin/Settings.php:457
2792
  msgid ""
2793
  "<span>Choose whether you want to include (or exclude) products on sale "
2794
  "(those having a sale price) for the discount </span>"
2795
  msgstr ""
2796
 
2797
- #: v2/App/Controllers/Admin/Settings.php:458
2798
  msgid "<span>Discount applies to custom taxonomy</span>"
2799
  msgstr ""
2800
 
2801
- #: v2/App/Controllers/Admin/Settings.php:459
2802
  msgid "Processing please wait.."
2803
  msgstr ""
2804
 
2805
- #: v2/App/Controllers/Admin/Settings.php:460
2806
  msgid "Rebuild index processed"
2807
  msgstr ""
2808
 
2809
- #: v2/App/Controllers/Admin/Settings.php:461
2810
  msgid "Please select the rules to build index"
2811
  msgstr ""
2812
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2813
  #: v2/App/Controllers/Admin/Tabs/Compatible.php:21
2814
  msgid "Compatibility"
2815
  msgstr ""
@@ -2824,42 +2847,35 @@ msgid "Read Documentation"
2824
  msgstr ""
2825
 
2826
  #: v2/App/Controllers/Admin/Tabs/ImportExport.php:19
2827
- #: v2/App/Views/Admin/Tabs/ImportExport.php:60
2828
- msgid "Export"
2829
  msgstr ""
2830
 
2831
  #: v2/App/Controllers/Admin/Tabs/Reports/RuleAmount.php:14
2832
- msgid "Rule amount data without cart adjustments"
2833
- msgstr ""
2834
-
2835
- #: v2/App/Controllers/Admin/Tabs/Reports/RuleAmount.php:18
2836
- #: v2/App/Controllers/Admin/Tabs/Reports/RuleAmountWithCartDiscount.php:14
2837
- msgid "TOP 5"
2838
  msgstr ""
2839
 
2840
- #: v2/App/Controllers/Admin/Tabs/Reports/RuleAmount.php:32
 
2841
  msgid "Date"
2842
  msgstr ""
2843
 
2844
- #: v2/App/Controllers/Admin/Tabs/Reports/RuleAmountWithCartDiscount.php:10
2845
- msgid "Rule amount data with cart discounts"
2846
- msgstr ""
2847
-
2848
- #: v2/App/Controllers/Admin/Tabs/Statistics.php:23
2849
  msgid "Reports"
2850
  msgstr ""
2851
 
2852
- #: v2/App/Controllers/Admin/Tabs/Statistics.php:28
2853
- msgid "Rule amount"
2854
  msgstr ""
2855
 
2856
- #: v2/App/Controllers/Admin/Tabs/Statistics.php:29
2857
- #: v2/App/Controllers/Admin/Tabs/Statistics.php:34
2858
  msgid "Rule"
2859
  msgstr ""
2860
 
2861
- #: v2/App/Controllers/Admin/Tabs/Statistics.php:33
2862
- msgid "Rule amount with cart discount"
2863
  msgstr ""
2864
 
2865
  #: v2/App/Controllers/Base.php:42
@@ -2869,7 +2885,7 @@ msgstr ""
2869
  #: v2/App/Controllers/Base.php:43 v2/App/Controllers/Base.php:48
2870
  #: v2/App/Helpers/ProOptions.php:34 v2/App/Helpers/ProOptions.php:40
2871
  #: v2/App/Helpers/ProOptions.php:46 v2/App/Helpers/ProOptions.php:52
2872
- #: v2/App/Helpers/ProOptions.php:58 v2/App/Views/Admin/Tabs/settings.php:99
2873
  msgid "Product"
2874
  msgstr ""
2875
 
@@ -2892,11 +2908,11 @@ msgstr ""
2892
  msgid "Bulk Discount"
2893
  msgstr ""
2894
 
2895
- #: v2/App/Controllers/ManageDiscount.php:619
2896
  msgid "cart discount"
2897
  msgstr ""
2898
 
2899
- #: v2/App/Controllers/ManageDiscount.php:818
2900
  msgid "Coupon code applied successfully."
2901
  msgstr ""
2902
 
@@ -3070,147 +3086,142 @@ msgstr ""
3070
  msgid "Bundle (Set) Discount - PRO -"
3071
  msgstr ""
3072
 
3073
- #: v2/App/Helpers/Rule.php:1161 v2/App/Helpers/Rule.php:1172
3074
  msgid "discount"
3075
  msgstr ""
3076
 
3077
- #: v2/App/Helpers/Rule.php:1232 v2/App/Helpers/Rule.php:1310
 
3078
  msgid "Untitled Rule"
3079
  msgstr ""
3080
 
3081
- #: v2/App/Helpers/Woocommerce.php:907
3082
  msgid "Sunday"
3083
  msgstr ""
3084
 
3085
- #: v2/App/Helpers/Woocommerce.php:908
3086
  msgid "Monday"
3087
  msgstr ""
3088
 
3089
- #: v2/App/Helpers/Woocommerce.php:909
3090
  msgid "Tuesday"
3091
  msgstr ""
3092
 
3093
- #: v2/App/Helpers/Woocommerce.php:910
3094
  msgid "Wednesday"
3095
  msgstr ""
3096
 
3097
- #: v2/App/Helpers/Woocommerce.php:911
3098
  msgid "Thursday"
3099
  msgstr ""
3100
 
3101
- #: v2/App/Helpers/Woocommerce.php:912
3102
  msgid "Friday"
3103
  msgstr ""
3104
 
3105
- #: v2/App/Helpers/Woocommerce.php:913
3106
  msgid "Saturday"
3107
  msgstr ""
3108
 
3109
- #: v2/App/Helpers/Woocommerce.php:924
3110
  msgid ""
3111
  "Woocommerce before main content(Archive / Shop / Cat Pages / single product)"
3112
  msgstr ""
3113
 
3114
- #: v2/App/Helpers/Woocommerce.php:925
3115
  msgid "Woocommerce archive description(Archive / Shop / Cat Pages)"
3116
  msgstr ""
3117
 
3118
- #: v2/App/Helpers/Woocommerce.php:926
3119
  msgid "Woocommerce before shop loop(Archive / Shop / Cat Pages)"
3120
  msgstr ""
3121
 
3122
- #: v2/App/Helpers/Woocommerce.php:927
3123
  msgid "Woocommerce after shop loop(Archive / Shop / Cat Pages)"
3124
  msgstr ""
3125
 
3126
- #: v2/App/Helpers/Woocommerce.php:928
3127
  msgid ""
3128
  "Woocommerce after main content(Archive / Shop / Cat Pages / single product)"
3129
  msgstr ""
3130
 
3131
- #: v2/App/Helpers/Woocommerce.php:929 v2/App/Views/Admin/Tabs/settings.php:179
3132
- #: v2/App/Views/Admin/Tabs/settings.php:197
3133
  msgid "Woocommerce before single product"
3134
  msgstr ""
3135
 
3136
- #: v2/App/Helpers/Woocommerce.php:930 v2/App/Views/Admin/Tabs/settings.php:181
3137
- #: v2/App/Views/Admin/Tabs/settings.php:199
3138
  msgid "Woocommerce before single product summary"
3139
  msgstr ""
3140
 
3141
- #: v2/App/Helpers/Woocommerce.php:931 v2/App/Views/Admin/Tabs/settings.php:180
3142
- #: v2/App/Views/Admin/Tabs/settings.php:198
3143
  msgid "Woocommerce after single product summary"
3144
  msgstr ""
3145
 
3146
- #: v2/App/Helpers/Woocommerce.php:932 v2/App/Views/Admin/Tabs/settings.php:178
3147
- #: v2/App/Views/Admin/Tabs/settings.php:196
3148
  msgid "Woocommerce after single product"
3149
  msgstr ""
3150
 
3151
- #: v2/App/Helpers/Woocommerce.php:933
3152
  msgid "Woocommerce before cart"
3153
  msgstr ""
3154
 
3155
- #: v2/App/Helpers/Woocommerce.php:934
3156
  msgid "Woocommerce before cart table"
3157
  msgstr ""
3158
 
3159
- #: v2/App/Helpers/Woocommerce.php:935
3160
  msgid "Woocommerce before cart contents"
3161
  msgstr ""
3162
 
3163
- #: v2/App/Helpers/Woocommerce.php:936
3164
  msgid "Woocommerce cart contents"
3165
  msgstr ""
3166
 
3167
- #: v2/App/Helpers/Woocommerce.php:937
3168
  msgid "Woocommerce after cart contents"
3169
  msgstr ""
3170
 
3171
- #: v2/App/Helpers/Woocommerce.php:938
3172
  msgid "Woocommerce after cart table"
3173
  msgstr ""
3174
 
3175
- #: v2/App/Helpers/Woocommerce.php:939
3176
  msgid "Woocommerce after cart"
3177
  msgstr ""
3178
 
3179
- #: v2/App/Helpers/Woocommerce.php:940
3180
  msgid "Woocommerce before checkout form"
3181
  msgstr ""
3182
 
3183
- #: v2/App/Helpers/Woocommerce.php:942
3184
  msgid "Woocommerce before checkout billing form"
3185
  msgstr ""
3186
 
3187
- #: v2/App/Helpers/Woocommerce.php:943
3188
  msgid "Woocommerce after checkout billing form"
3189
  msgstr ""
3190
 
3191
- #: v2/App/Helpers/Woocommerce.php:944
3192
  msgid "Woocommerce before checkout shipping form"
3193
  msgstr ""
3194
 
3195
- #: v2/App/Helpers/Woocommerce.php:945
3196
  msgid "Woocommerce after checkout shipping form"
3197
  msgstr ""
3198
 
3199
- #: v2/App/Helpers/Woocommerce.php:946
3200
  msgid "Woocommerce before order notes"
3201
  msgstr ""
3202
 
3203
- #: v2/App/Helpers/Woocommerce.php:947
3204
  msgid "Woocommerce after order notes"
3205
  msgstr ""
3206
 
3207
- #: v2/App/Views/Admin/Menu.php:24
3208
- msgid ""
3209
- "<span style='color: #FF8C00 ; padding: 3px; border-radius: 4px'> (public "
3210
- "beta) </span>"
3211
- msgstr ""
3212
-
3213
- #: v2/App/Views/Admin/Menu.php:34
3214
  msgid "Rebuild index"
3215
  msgstr ""
3216
 
@@ -3292,12 +3303,12 @@ msgid "Conditions Relationship "
3292
  msgstr ""
3293
 
3294
  #: v2/App/Views/Admin/Rules/Conditions/Main.php:24
3295
- #: v2/App/Views/Admin/Rules/Conditions/Main.php:112
3296
  msgid "Match All"
3297
  msgstr ""
3298
 
3299
  #: v2/App/Views/Admin/Rules/Conditions/Main.php:26
3300
- #: v2/App/Views/Admin/Rules/Conditions/Main.php:114
3301
  msgid "Many Any"
3302
  msgstr ""
3303
 
@@ -3306,44 +3317,48 @@ msgstr ""
3306
  msgid "Condition Type"
3307
  msgstr ""
3308
 
3309
- #: v2/App/Views/Admin/Rules/Conditions/Main.php:102
3310
- #: v2/App/Views/Admin/Rules/Conditions/Main.php:122
3311
  msgid "Add condition"
3312
  msgstr ""
3313
 
3314
- #: v2/App/Views/Admin/Rules/Conditions/Main.php:110
3315
  msgid "Conditions Relationship"
3316
  msgstr ""
3317
 
3318
- #: v2/App/Views/Admin/Rules/Conditions/Main.php:132
3319
  msgid "Rule Limits"
3320
  msgstr ""
3321
 
3322
- #: v2/App/Views/Admin/Rules/Conditions/Main.php:144
 
 
 
 
3323
  msgid "Unlimited"
3324
  msgstr ""
3325
 
3326
- #: v2/App/Views/Admin/Rules/Conditions/Main.php:151
3327
  msgid "Maximum usage limit"
3328
  msgstr ""
3329
 
3330
- #: v2/App/Views/Admin/Rules/Conditions/Main.php:159
3331
  msgid "Rule Vaild From"
3332
  msgstr ""
3333
 
3334
- #: v2/App/Views/Admin/Rules/Conditions/Main.php:164
3335
  msgid "Vaild from"
3336
  msgstr ""
3337
 
3338
- #: v2/App/Views/Admin/Rules/Conditions/Main.php:171
3339
  msgid "Rule Valid To"
3340
  msgstr ""
3341
 
3342
- #: v2/App/Views/Admin/Rules/Conditions/Main.php:175
3343
  msgid "Vaild to"
3344
  msgstr ""
3345
 
3346
- #: v2/App/Views/Admin/Rules/Conditions/Main.php:186
3347
  msgid "Select values"
3348
  msgstr ""
3349
 
@@ -3364,7 +3379,7 @@ msgid "Preview"
3364
  msgstr ""
3365
 
3366
  #: v2/App/Views/Admin/Rules/DiscountBatch/Main.php:22
3367
- #: v2/App/Views/Admin/Tabs/settings.php:502
3368
  msgid "Note:"
3369
  msgstr ""
3370
 
@@ -3384,9 +3399,9 @@ msgstr ""
3384
  #: v2/App/Views/Admin/Rules/DiscountBatch/Main.php:71
3385
  #: v2/App/Views/Admin/Rules/DiscountBatch/Main.php:92
3386
  #: v2/App/Views/Admin/Rules/DiscountBatch/Main.php:126
3387
- #: v2/App/Views/Admin/Tabs/settings.php:398
3388
- #: v2/App/Views/Admin/Tabs/settings.php:407
3389
- #: v2/App/Views/Admin/Tabs/settings.php:470
3390
  msgid ""
3391
  "Unlock this feature by <a href='https://www.flycart.org/products/wordpress/"
3392
  "woocommerce-discount-rules' target='_blank'>Upgrading to Pro</a>"
@@ -3483,12 +3498,12 @@ msgstr ""
3483
  #: v2/App/Views/Admin/Rules/Discounts/Cart.php:24
3484
  #: v2/App/Views/Admin/Rules/Discounts/simple.php:23
3485
  #: v2/App/Views/Admin/Tabs/DiscountRule.php:108
3486
- #: v2/App/Views/Admin/Tabs/DiscountRule.php:315
3487
  msgid "Discount Type"
3488
  msgstr ""
3489
 
3490
  #: v2/App/Views/Admin/Rules/Discounts/Bulk.php:65
3491
- #: v2/App/Views/Admin/Tabs/settings.php:568
3492
  msgid "Discount Value"
3493
  msgstr ""
3494
 
@@ -3521,7 +3536,7 @@ msgid "Count by:"
3521
  msgstr ""
3522
 
3523
  #: v2/App/Views/Admin/Rules/Discounts/Main.php:22
3524
- msgid "Product filters together"
3525
  msgstr ""
3526
 
3527
  #: v2/App/Views/Admin/Rules/Discounts/Main.php:25
@@ -3623,53 +3638,59 @@ msgstr ""
3623
  msgid "Select Products"
3624
  msgstr ""
3625
 
3626
- #: v2/App/Views/Admin/Rules/Manage.php:16
3627
  msgid " Start date and time is set in the future date"
3628
  msgstr ""
3629
 
3630
- #: v2/App/Views/Admin/Rules/Manage.php:23
 
 
 
 
 
 
3631
  msgid " Validity expired"
3632
  msgstr ""
3633
 
3634
- #: v2/App/Views/Admin/Rules/Manage.php:52
3635
  msgid "Enable?"
3636
  msgstr ""
3637
 
3638
- #: v2/App/Views/Admin/Rules/Manage.php:61
3639
  msgid "Apply this rule if matched and ignore all other rules"
3640
  msgstr ""
3641
 
3642
- #: v2/App/Views/Admin/Rules/Manage.php:70
3643
  msgid "#Rule ID: "
3644
  msgstr ""
3645
 
3646
- #: v2/App/Views/Admin/Rules/Manage.php:77
3647
  msgid "Save & Close"
3648
  msgstr ""
3649
 
3650
- #: v2/App/Views/Admin/Rules/Manage.php:80
3651
  msgid "Cancel"
3652
  msgstr ""
3653
 
3654
- #: v2/App/Views/Admin/Rules/Manage.php:89
3655
  msgid "Choose a discount type"
3656
  msgstr ""
3657
 
3658
- #: v2/App/Views/Admin/Rules/Manage.php:93
3659
  msgid "Select Discount Type"
3660
  msgstr ""
3661
 
3662
- #: v2/App/Views/Admin/Rules/Manage.php:132
3663
  msgid ""
3664
  "Choose which <b>gets</b> discount (products/categories/attributes/SKU and so "
3665
  "on )"
3666
  msgstr ""
3667
 
3668
- #: v2/App/Views/Admin/Rules/Manage.php:133
3669
  msgid "Note : You can also exclude products/categories."
3670
  msgstr ""
3671
 
3672
- #: v2/App/Views/Admin/Rules/Manage.php:177
3673
  msgid "Select discount type and its value (percentage/price/fixed price)"
3674
  msgstr ""
3675
 
@@ -3746,17 +3767,17 @@ msgid "Search Rules"
3746
  msgstr ""
3747
 
3748
  #: v2/App/Views/Admin/Tabs/DiscountRule.php:87
3749
- #: v2/App/Views/Admin/Tabs/DiscountRule.php:353
3750
  msgid "item"
3751
  msgstr ""
3752
 
3753
  #: v2/App/Views/Admin/Tabs/DiscountRule.php:87
3754
- #: v2/App/Views/Admin/Tabs/DiscountRule.php:353
3755
  msgid "items"
3756
  msgstr ""
3757
 
3758
  #: v2/App/Views/Admin/Tabs/DiscountRule.php:117
3759
- #: v2/App/Views/Admin/Tabs/DiscountRule.php:324
3760
  msgid "Language(s)"
3761
  msgstr ""
3762
 
@@ -3793,34 +3814,61 @@ msgstr ""
3793
  msgid "Enabled"
3794
  msgstr ""
3795
 
3796
- #: v2/App/Views/Admin/Tabs/DiscountRule.php:259
3797
- msgid " - ( Will run in future)"
 
 
3798
  msgstr ""
3799
 
3800
  #: v2/App/Views/Admin/Tabs/DiscountRule.php:262
3801
- #: v2/App/Views/Admin/Tabs/DiscountRule.php:270
 
 
 
 
 
 
 
 
 
 
3802
  msgid "Your server current date and time:"
3803
  msgstr ""
3804
 
3805
- #: v2/App/Views/Admin/Tabs/DiscountRule.php:267
3806
  msgid " - ( Not running - validity expired)"
3807
  msgstr ""
3808
 
3809
- #: v2/App/Views/Admin/Tabs/DiscountRule.php:297
3810
  msgid "No rules found."
3811
  msgstr ""
3812
 
3813
- #: v2/App/Views/Admin/Tabs/DiscountRule.php:386
3814
  msgid "Go PRO"
3815
  msgstr ""
3816
 
3817
- #: v2/App/Views/Admin/Tabs/ImportExport.php:13
3818
  msgid "Export tool"
3819
  msgstr ""
3820
 
3821
- #: v2/App/Views/Admin/Tabs/ImportExport.php:35
3822
- #: v2/App/Views/Admin/Tabs/ImportExport.php:53
3823
- msgid "Oops!. Download failed!!"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3824
  msgstr ""
3825
 
3826
  #: v2/App/Views/Admin/Tabs/Statistics.php:39
@@ -3908,365 +3956,373 @@ msgid "Choose how discount rules should work"
3908
  msgstr ""
3909
 
3910
  #: v2/App/Views/Admin/Tabs/settings.php:80
3911
- msgid "Suppress third party discount plugins"
3912
  msgstr ""
3913
 
3914
  #: v2/App/Views/Admin/Tabs/settings.php:81
 
 
 
 
 
 
 
 
3915
  msgid ""
3916
  "suppress third party plugins from modifying the prices. other discount "
3917
  "plugins may not works!"
3918
  msgstr ""
3919
 
3920
- #: v2/App/Views/Admin/Tabs/settings.php:105
3921
  msgid "On-sale badge"
3922
  msgstr ""
3923
 
3924
- #: v2/App/Views/Admin/Tabs/settings.php:106
3925
  msgid "show on-sale badge"
3926
  msgstr ""
3927
 
3928
- #: v2/App/Views/Admin/Tabs/settings.php:114
3929
  msgid "Show on products that are covered under any discount rule in the plugin"
3930
  msgstr ""
3931
 
3932
- #: v2/App/Views/Admin/Tabs/settings.php:122
3933
  msgid "Customize the sale badge"
3934
  msgstr ""
3935
 
3936
- #: v2/App/Views/Admin/Tabs/settings.php:140
3937
  msgid "Sale badge content"
3938
  msgstr ""
3939
 
3940
- #: v2/App/Views/Admin/Tabs/settings.php:141
3941
  msgid ""
3942
  "You can use HTML inside. <br><b>IMPORTANT NOTE:</b> This customized sale "
3943
  "badge will be applicable only for products that are part of the discount "
3944
  "rules configured in this plugin <b>Eg:</b><span class=\"onsale\">Sale!</span>"
3945
  msgstr ""
3946
 
3947
- #: v2/App/Views/Admin/Tabs/settings.php:152
3948
  msgid "Show discount table "
3949
  msgstr ""
3950
 
3951
- #: v2/App/Views/Admin/Tabs/settings.php:153
3952
  msgid "Show discount table on product page"
3953
  msgstr ""
3954
 
3955
- #: v2/App/Views/Admin/Tabs/settings.php:162
3956
- #: v2/App/Views/Admin/Tabs/settings.php:498
3957
  msgid "Customize Discount Table"
3958
  msgstr ""
3959
 
3960
- #: v2/App/Views/Admin/Tabs/settings.php:169
3961
  msgid "Position to show discount table"
3962
  msgstr ""
3963
 
3964
- #: v2/App/Views/Admin/Tabs/settings.php:170
3965
  msgid "Position to show discount table on product page"
3966
  msgstr ""
3967
 
3968
- #: v2/App/Views/Admin/Tabs/settings.php:174
3969
- #: v2/App/Views/Admin/Tabs/settings.php:192
3970
  msgid "Woocommerce before add to cart form"
3971
  msgstr ""
3972
 
3973
- #: v2/App/Views/Admin/Tabs/settings.php:175
3974
- #: v2/App/Views/Admin/Tabs/settings.php:193
3975
  msgid "Woocommerce product meta end"
3976
  msgstr ""
3977
 
3978
- #: v2/App/Views/Admin/Tabs/settings.php:176
3979
- #: v2/App/Views/Admin/Tabs/settings.php:194
3980
  msgid "Woocommerce product meta start"
3981
  msgstr ""
3982
 
3983
- #: v2/App/Views/Admin/Tabs/settings.php:177
3984
- #: v2/App/Views/Admin/Tabs/settings.php:195
3985
  msgid "Woocommerce after add to cart form"
3986
  msgstr ""
3987
 
3988
- #: v2/App/Views/Admin/Tabs/settings.php:187
3989
  msgid "Position to show discount bar"
3990
  msgstr ""
3991
 
3992
- #: v2/App/Views/Admin/Tabs/settings.php:188
3993
  msgid "Position to show discount bar on product page"
3994
  msgstr ""
3995
 
3996
- #: v2/App/Views/Admin/Tabs/settings.php:205
3997
  msgid "Show strikeout price"
3998
  msgstr ""
3999
 
4000
- #: v2/App/Views/Admin/Tabs/settings.php:206
4001
  msgid "Show product strikeout price on"
4002
  msgstr ""
4003
 
4004
- #: v2/App/Views/Admin/Tabs/settings.php:211
4005
  msgid "On shop page?"
4006
  msgstr ""
4007
 
4008
- #: v2/App/Views/Admin/Tabs/settings.php:214
4009
  msgid "On product page?"
4010
  msgstr ""
4011
 
4012
- #: v2/App/Views/Admin/Tabs/settings.php:217
4013
  msgid "On category page?"
4014
  msgstr ""
4015
 
4016
- #: v2/App/Views/Admin/Tabs/settings.php:223
4017
  msgid "Show Strikeout when"
4018
  msgstr ""
4019
 
4020
- #: v2/App/Views/Admin/Tabs/settings.php:224
4021
  msgid "Show Strikeout when this option is matched"
4022
  msgstr ""
4023
 
4024
- #: v2/App/Views/Admin/Tabs/settings.php:247
4025
  msgid "Show strikeout on cart"
4026
  msgstr ""
4027
 
4028
- #: v2/App/Views/Admin/Tabs/settings.php:248
4029
  msgid "Show price strikeout on cart"
4030
  msgstr ""
4031
 
4032
- #: v2/App/Views/Admin/Tabs/settings.php:262
4033
  msgid "Combine all cart discounts"
4034
  msgstr ""
4035
 
4036
- #: v2/App/Views/Admin/Tabs/settings.php:263
4037
  msgid "Combine all cart discounts in single discount label"
4038
  msgstr ""
4039
 
4040
- #: v2/App/Views/Admin/Tabs/settings.php:282
4041
- #: v2/App/Views/Admin/Tabs/settings.php:283
4042
  msgid "Discount label for combined discounts"
4043
  msgstr ""
4044
 
4045
- #: v2/App/Views/Admin/Tabs/settings.php:300
4046
  msgid "Subtotal based promotion"
4047
  msgstr ""
4048
 
4049
- #: v2/App/Views/Admin/Tabs/settings.php:301
4050
  msgid ""
4051
  "Display subtotal based promotion messages in cart/product/shop pages<br>If "
4052
  "enabled an option to add promotion message will displays on each rule(when "
4053
  "subtotal condition is added)"
4054
  msgstr ""
4055
 
4056
- #: v2/App/Views/Admin/Tabs/settings.php:319
4057
  msgid "Subtotal based promo text"
4058
  msgstr ""
4059
 
4060
- #: v2/App/Views/Admin/Tabs/settings.php:320
4061
  msgid ""
4062
  "Subtotal based promo text (available only for subtotal based discounts) "
4063
  msgstr ""
4064
 
4065
- #: v2/App/Views/Admin/Tabs/settings.php:324
4066
  msgid "Select the page to display promotion message"
4067
  msgstr ""
4068
 
4069
- #: v2/App/Views/Admin/Tabs/settings.php:334
4070
  msgid "Display you saved text"
4071
  msgstr ""
4072
 
4073
- #: v2/App/Views/Admin/Tabs/settings.php:335
4074
  msgid "Display you saved text when rule applied"
4075
  msgstr ""
4076
 
4077
- #: v2/App/Views/Admin/Tabs/settings.php:350
4078
  msgid "You save text to show when rule applied"
4079
  msgstr ""
4080
 
4081
- #: v2/App/Views/Admin/Tabs/settings.php:359
4082
  msgid "Show a discount applied message on cart?"
4083
  msgstr ""
4084
 
4085
- #: v2/App/Views/Admin/Tabs/settings.php:360
4086
  msgid "Show message in cart page on rule applied"
4087
  msgstr ""
4088
 
4089
- #: v2/App/Views/Admin/Tabs/settings.php:376
4090
  msgid "Applied rule message text on cart"
4091
  msgstr ""
4092
 
4093
- #: v2/App/Views/Admin/Tabs/settings.php:377
4094
  msgid "Text to show when rule applied"
4095
  msgstr ""
4096
 
4097
- #: v2/App/Views/Admin/Tabs/settings.php:387
4098
  msgid "Banner"
4099
  msgstr ""
4100
 
4101
- #: v2/App/Views/Admin/Tabs/settings.php:394
4102
  msgid "Banner Content"
4103
  msgstr ""
4104
 
4105
- #: v2/App/Views/Admin/Tabs/settings.php:395
4106
  msgid ""
4107
  "A static banner you that you want to display in your storefront. <br><br> "
4108
  "<b>NOTE:</b> It is a static banner. You can use any content or html here."
4109
  msgstr ""
4110
 
4111
- #: v2/App/Views/Admin/Tabs/settings.php:404
4112
  msgid "Banner Content display position"
4113
  msgstr ""
4114
 
4115
- #: v2/App/Views/Admin/Tabs/settings.php:405
4116
  msgid "Choose a display position for the banner in your storefront"
4117
  msgstr ""
4118
 
4119
- #: v2/App/Views/Admin/Tabs/settings.php:416
4120
  msgid "On-Sale page"
4121
  msgstr ""
4122
 
4123
- #: v2/App/Views/Admin/Tabs/settings.php:422
4124
  msgid "Select rules for the On Sale Page"
4125
  msgstr ""
4126
 
4127
- #: v2/App/Views/Admin/Tabs/settings.php:435
4128
  msgid "Type the name of the rule to select it"
4129
  msgstr ""
4130
 
4131
- #: v2/App/Views/Admin/Tabs/settings.php:443
4132
  msgid "All active rules"
4133
  msgstr ""
4134
 
4135
- #: v2/App/Views/Admin/Tabs/settings.php:468
4136
  msgid "Save and Build Index"
4137
  msgstr ""
4138
 
4139
- #: v2/App/Views/Admin/Tabs/settings.php:478
4140
  msgid ""
4141
  "ShortCode to load all products which has discount through Woo Discount Rules"
4142
  msgstr ""
4143
 
4144
- #: v2/App/Views/Admin/Tabs/settings.php:501
4145
  msgid "Settings Saved"
4146
  msgstr ""
4147
 
4148
- #: v2/App/Views/Admin/Tabs/settings.php:502
4149
  msgid " This table contains sample content for design purpose."
4150
  msgstr ""
4151
 
4152
- #: v2/App/Views/Admin/Tabs/settings.php:512
4153
  msgid "Table Header"
4154
  msgstr ""
4155
 
4156
- #: v2/App/Views/Admin/Tabs/settings.php:513
4157
  msgid "Show/Hide table header column names"
4158
  msgstr ""
4159
 
4160
- #: v2/App/Views/Admin/Tabs/settings.php:526
4161
  msgid "Title column Name on table"
4162
  msgstr ""
4163
 
4164
- #: v2/App/Views/Admin/Tabs/settings.php:527
4165
  msgid "Give name for rule title column"
4166
  msgstr ""
4167
 
4168
- #: v2/App/Views/Admin/Tabs/settings.php:538
4169
  msgid "Discount column Name on table"
4170
  msgstr ""
4171
 
4172
- #: v2/App/Views/Admin/Tabs/settings.php:539
4173
  msgid "Give name for discount column"
4174
  msgstr ""
4175
 
4176
- #: v2/App/Views/Admin/Tabs/settings.php:550
4177
  msgid "Range column Name on table"
4178
  msgstr ""
4179
 
4180
- #: v2/App/Views/Admin/Tabs/settings.php:551
4181
  msgid "Give name for range column"
4182
  msgstr ""
4183
 
4184
- #: v2/App/Views/Admin/Tabs/settings.php:562
4185
  msgid "Discount column value on table"
4186
  msgstr ""
4187
 
4188
- #: v2/App/Views/Admin/Tabs/settings.php:563
4189
  msgid "Show Discount value/price in table"
4190
  msgstr ""
4191
 
4192
- #: v2/App/Views/Admin/Tabs/settings.php:571
4193
  msgid "Discounted Price"
4194
  msgstr ""
4195
 
4196
- #: v2/App/Views/Admin/Tabs/settings.php:646
4197
- #: v2/App/Views/Admin/Tabs/settings.php:669
4198
  msgid "Bulk Rule"
4199
  msgstr ""
4200
 
4201
- #: v2/App/Views/Admin/Tabs/settings.php:654
4202
- #: v2/App/Views/Admin/Tabs/settings.php:700
4203
- #: v2/App/Views/Admin/Tabs/settings.php:767
4204
  #: v2/App/Views/Templates/discount_table.php:113
4205
  msgid " flat"
4206
  msgstr ""
4207
 
4208
- #: v2/App/Views/Admin/Tabs/settings.php:660
4209
  msgid "1 - 5"
4210
  msgstr ""
4211
 
4212
- #: v2/App/Views/Admin/Tabs/settings.php:683
4213
  msgid "11 - 15"
4214
  msgstr ""
4215
 
4216
- #: v2/App/Views/Admin/Tabs/settings.php:692
4217
  msgid "Bulk Flat discount"
4218
  msgstr ""
4219
 
4220
- #: v2/App/Views/Admin/Tabs/settings.php:706
4221
  msgid "50 - 60"
4222
  msgstr ""
4223
 
4224
- #: v2/App/Views/Admin/Tabs/settings.php:715
4225
  msgid "Bulk percentage discount"
4226
  msgstr ""
4227
 
4228
- #: v2/App/Views/Admin/Tabs/settings.php:728
4229
  msgid "70 - 80"
4230
  msgstr ""
4231
 
4232
- #: v2/App/Views/Admin/Tabs/settings.php:737
4233
  #, php-format
4234
  msgid "Bulk % discount"
4235
  msgstr ""
4236
 
4237
- #: v2/App/Views/Admin/Tabs/settings.php:750
4238
  msgid "450 - 500"
4239
  msgstr ""
4240
 
4241
- #: v2/App/Views/Admin/Tabs/settings.php:759
4242
  msgid "Bulk flat"
4243
  msgstr ""
4244
 
4245
- #: v2/App/Views/Admin/Tabs/settings.php:773
4246
  msgid "600 - 700"
4247
  msgstr ""
4248
 
4249
- #: v2/App/Views/Admin/Tabs/settings.php:782
4250
  msgid "set percentage discount"
4251
  msgstr ""
4252
 
4253
- #: v2/App/Views/Admin/Tabs/settings.php:795
4254
  msgid "5"
4255
  msgstr ""
4256
 
4257
- #: v2/App/Views/Admin/Tabs/settings.php:804
4258
  msgid "Fixed discount for set"
4259
  msgstr ""
4260
 
4261
- #: v2/App/Views/Admin/Tabs/settings.php:817
4262
  msgid "10"
4263
  msgstr ""
4264
 
4265
- #: v2/App/Views/Admin/Tabs/settings.php:826
4266
  msgid "set flat discount"
4267
  msgstr ""
4268
 
4269
- #: v2/App/Views/Admin/Tabs/settings.php:839
4270
  msgid "15"
4271
  msgstr ""
4272
 
4
  "Content-Type: text/plain; charset=UTF-8\n"
5
  "Content-Transfer-Encoding: 8bit\n"
6
  "Project-Id-Version: Woo Discount Rules\n"
7
+ "POT-Creation-Date: 2020-04-08\n"
8
+ "PO-Revision-Date: 2020-07-14n"
9
  "Last-Translator: \n"
10
  "Language-Team: Flycart\n"
11
  "MIME-Version: 1.0\n"
66
 
67
  #: common.php:77
68
  msgid ""
69
+ "Switch to Discount Rules V2 which comes with a better UI and advanced "
70
  "rules. (You can switch back any time. Your settings and rules in V1 are "
71
  "kept as is)"
72
  msgstr ""
73
 
74
  #: common.php:78
75
+ msgid "Switch to v2"
 
 
76
  msgstr ""
77
 
78
  #: common.php:81
148
  msgid "License key for the %s is not entered. %s, you can get it from %s"
149
  msgstr ""
150
 
151
+ #: v1/helper/general-helper.php:48 v2/App/Controllers/Admin/Settings.php:302
152
  msgid "Guest"
153
  msgstr ""
154
 
181
  msgstr ""
182
 
183
  #: v1/helper/general-helper.php:1034 v1/view/view-cart-rules.php:697
184
+ #: v1/view/view-pricing-rules.php:433 v2/App/Helpers/Woocommerce.php:1482
185
  msgid "Coupon already exists in WooCommerce. Please select another name"
186
  msgstr ""
187
 
254
  #: v1/includes/advanced/free_shipping_method.php:73
255
  #: v1/includes/discount-base.php:1063 v1/view/cart-rules.php:133
256
  #: v1/view/pricing-rules.php:163 v1/view/settings_promotion.php:65
257
+ #: v1/view/settings_promotion.php:100 v2/App/Controllers/Admin/Settings.php:412
258
  #: v2/App/Views/Admin/Tabs/DiscountRule.php:76
259
  msgid "Enable"
260
  msgstr ""
265
 
266
  #: v1/includes/advanced/free_shipping_method.php:80
267
  #: v2/App/Views/Admin/Tabs/DiscountRule.php:103
268
+ #: v2/App/Views/Admin/Tabs/DiscountRule.php:329
269
  msgid "Title"
270
  msgstr ""
271
 
282
  msgstr ""
283
 
284
  #: v1/includes/discount-base.php:203 v1/view/cart-rules.php:162
285
+ #: v1/view/pricing-rules.php:192 v2/App/Controllers/Admin/Settings.php:411
286
  msgid "Active"
287
  msgstr ""
288
 
292
  #: v1/view/settings_promotion.php:22 v1/view/settings_promotion.php:62
293
  #: v1/view/settings_promotion.php:97 v1/view/settings_promotion.php:132
294
  #: v2/App/Views/Admin/Tabs/DiscountRule.php:250
295
+ #: v2/App/Views/Admin/Tabs/settings.php:354
296
  msgid "Disabled"
297
  msgstr ""
298
 
364
 
365
  #: v1/includes/discount-base.php:1024 v1/view/view-pricing-rules.php:654
366
  #: v1/view/view-pricing-rules.php:657 v1/view/view-pricing-rules.php:677
367
+ #: v2/App/Controllers/Admin/Settings.php:429
368
  msgid "Quantity"
369
  msgstr ""
370
 
393
  msgstr ""
394
 
395
  #: v1/includes/discount-base.php:1030 v1/view/view-pricing-rules.php:954
396
+ #: v2/App/Controllers/Admin/Settings.php:432
397
  msgid "Discount percentage"
398
  msgstr ""
399
 
527
 
528
  #: v1/includes/discount-base.php:1060 v1/view/cart-rules.php:185
529
  #: v1/view/pricing-rules.php:215 v1/view/view-pricing-rules.php:971
530
+ #: v2/App/Views/Admin/Tabs/DiscountRule.php:302
531
  msgid "Duplicate"
532
  msgstr ""
533
 
540
  msgstr ""
541
 
542
  #: v1/includes/discount-base.php:1064 v1/view/cart-rules.php:130
543
+ #: v1/view/pricing-rules.php:160 v2/App/Controllers/Admin/Settings.php:410
544
  #: v2/App/Views/Admin/Tabs/DiscountRule.php:77
545
  msgid "Disable"
546
  msgstr ""
725
  #: v1/view/cart-rules.php:224 v1/view/pricing-rules.php:144
726
  #: v1/view/pricing-rules.php:254 v1/view/view-cart-rules.php:700
727
  #: v2/App/Views/Admin/Tabs/DiscountRule.php:127
728
+ #: v2/App/Views/Admin/Tabs/DiscountRule.php:353
729
  msgid "Action"
730
  msgstr ""
731
 
732
  #: v1/includes/discount-base.php:1104 v1/view/settings.php:33
733
+ #: v1/view/settings_taxonomy.php:21 v2/App/Views/Admin/Rules/Manage.php:84
734
  msgid "Save"
735
  msgstr ""
736
 
754
  #: v1/includes/discount-base.php:1108 v1/view/settings_price_rules.php:208
755
  #: v1/view/settings_price_rules.php:226 v1/view/settings_price_rules.php:244
756
  #: v1/view/settings_price_rules.php:262
757
+ #: v2/App/Views/Admin/Tabs/settings.php:533
758
  msgid "Show"
759
  msgstr ""
760
 
992
  "defined in WooCommerce -> Attributes. <a href=\"%s\">Read docs</a>.</span>"
993
  msgstr ""
994
 
995
+ #: v1/includes/discount-base.php:1237 v2/App/Controllers/ManageDiscount.php:820
996
  #, php-format
997
  msgid ""
998
  "Sorry, it is not possible to apply coupon <b>\"%s\"</b> as you already have "
1236
  #: v1/view/cart-rules.php:99 v1/view/cart-rules.php:209
1237
  #: v1/view/pricing-rules.php:129 v1/view/pricing-rules.php:239
1238
  #: v2/App/Views/Admin/Tabs/DiscountRule.php:110
1239
+ #: v2/App/Views/Admin/Tabs/DiscountRule.php:336
1240
  msgid "Start Date"
1241
  msgstr ""
1242
 
1243
  #: v1/view/cart-rules.php:100 v1/view/cart-rules.php:210
1244
  #: v1/view/pricing-rules.php:130 v1/view/pricing-rules.php:240
1245
  #: v2/App/Views/Admin/Tabs/DiscountRule.php:112
1246
+ #: v2/App/Views/Admin/Tabs/DiscountRule.php:338
1247
  msgid "Expired On"
1248
  msgstr ""
1249
 
1250
  #: v1/view/cart-rules.php:101 v1/view/cart-rules.php:211
1251
  #: v1/view/pricing-rules.php:131 v1/view/pricing-rules.php:241
1252
  #: v2/App/Views/Admin/Tabs/DiscountRule.php:125
1253
+ #: v2/App/Views/Admin/Tabs/DiscountRule.php:351
1254
  msgid "Status"
1255
  msgstr ""
1256
 
1257
  #: v1/view/cart-rules.php:104 v1/view/cart-rules.php:214
1258
  #: v1/view/pricing-rules.php:134 v1/view/pricing-rules.php:244
1259
+ #: v2/App/Views/Admin/Rules/Conditions/Main.php:205
1260
  msgid "Language"
1261
  msgstr ""
1262
 
1266
  msgstr ""
1267
 
1268
  #: v1/view/cart-rules.php:181 v1/view/pricing-rules.php:211
1269
+ #: v2/App/Views/Admin/Tabs/DiscountRule.php:300
1270
  msgid "Edit"
1271
  msgstr ""
1272
 
1273
  #: v1/view/cart-rules.php:192 v1/view/pricing-rules.php:222
1274
  #: v2/App/Views/Admin/Tabs/DiscountRule.php:78
1275
+ #: v2/App/Views/Admin/Tabs/DiscountRule.php:305
1276
  msgid "Delete"
1277
  msgstr ""
1278
 
1411
 
1412
  #: v1/view/includes/cart-menu.php:13 v1/view/includes/sub-menu.php:13
1413
  #: v1/view/template/discount-table.php:42 v1/view/view-cart-rules.php:756
1414
+ #: v1/view/view-pricing-rules.php:708 v2/App/Controllers/Admin/Settings.php:437
1415
  #: v2/App/Views/Admin/Rules/Discounts/Bulk.php:59
1416
+ #: v2/App/Views/Admin/Rules/Manage.php:184
1417
  msgid "Discount"
1418
  msgstr ""
1419
 
1470
  msgid "Performance"
1471
  msgstr ""
1472
 
1473
+ #: v1/view/settings.php:42 v2/App/Views/Admin/Tabs/settings.php:310
1474
  msgid "Promotion"
1475
  msgstr ""
1476
 
1592
  #: v2/App/Views/Admin/Rules/DiscountBatch/Main.php:43
1593
  #: v2/App/Views/Admin/Tabs/settings.php:55
1594
  #: v2/App/Views/Admin/Tabs/settings.php:86
1595
+ #: v2/App/Views/Admin/Tabs/settings.php:101
1596
+ #: v2/App/Views/Admin/Tabs/settings.php:173
1597
+ #: v2/App/Views/Admin/Tabs/settings.php:268
1598
+ #: v2/App/Views/Admin/Tabs/settings.php:285
1599
+ #: v2/App/Views/Admin/Tabs/settings.php:323
1600
+ #: v2/App/Views/Admin/Tabs/settings.php:381
1601
  msgid "Yes"
1602
  msgstr ""
1603
 
1608
  #: v2/App/Views/Admin/Rules/DiscountBatch/Main.php:48
1609
  #: v2/App/Views/Admin/Tabs/settings.php:59
1610
  #: v2/App/Views/Admin/Tabs/settings.php:90
1611
+ #: v2/App/Views/Admin/Tabs/settings.php:105
1612
+ #: v2/App/Views/Admin/Tabs/settings.php:176
1613
+ #: v2/App/Views/Admin/Tabs/settings.php:272
1614
+ #: v2/App/Views/Admin/Tabs/settings.php:291
1615
+ #: v2/App/Views/Admin/Tabs/settings.php:329
1616
+ #: v2/App/Views/Admin/Tabs/settings.php:386
1617
  msgid "No"
1618
  msgstr ""
1619
 
1725
  msgstr ""
1726
 
1727
  #: v1/view/settings_price_rules.php:128
1728
+ #: v2/App/Views/Admin/Tabs/settings.php:243
1729
  msgid "Show when a rule condition is matched"
1730
  msgstr ""
1731
 
1732
  #: v1/view/settings_price_rules.php:131
1733
+ #: v2/App/Views/Admin/Tabs/settings.php:244
1734
  msgid "Show after a rule condition is matched"
1735
  msgstr ""
1736
 
1737
  #: v1/view/settings_price_rules.php:134
1738
+ #: v2/App/Views/Admin/Tabs/settings.php:245
1739
  msgid "Shown on quantity update (dynamic)"
1740
  msgstr ""
1741
 
1742
  #: v1/view/settings_price_rules.php:137 v1/view/settings_price_rules.php:211
1743
  #: v1/view/settings_price_rules.php:229 v1/view/settings_price_rules.php:247
1744
  #: v1/view/settings_price_rules.php:265
1745
+ #: v2/App/Views/Admin/Tabs/settings.php:536
1746
  msgid "Don't Show"
1747
  msgstr ""
1748
 
1797
  msgstr ""
1798
 
1799
  #: v1/view/settings_price_rules.php:284
1800
+ #: v2/App/Views/Admin/Tabs/settings.php:130
1801
  msgid "Do not show"
1802
  msgstr ""
1803
 
1804
  #: v1/view/settings_price_rules.php:287
1805
+ #: v2/App/Views/Admin/Tabs/settings.php:128
1806
  msgid "Show only after a rule condition is matched exactly"
1807
  msgstr ""
1808
 
1813
  msgstr ""
1814
 
1815
  #: v1/view/settings_price_rules.php:301
1816
+ #: v2/App/Views/Admin/Tabs/settings.php:136
1817
  msgid "Do you want to customize the sale badge?"
1818
  msgstr ""
1819
 
1820
  #: v1/view/settings_price_rules.php:308
1821
+ #: v2/App/Views/Admin/Tabs/settings.php:146
1822
  msgid "Yes, I would like to customize the sale badge"
1823
  msgstr ""
1824
 
1825
  #: v1/view/settings_price_rules.php:310
1826
+ #: v2/App/Views/Admin/Tabs/settings.php:150
1827
  msgid ""
1828
  "Force override the label for sale badge (useful when your theme has override "
1829
  "for sale badge)."
1851
  msgid "Display savings text (for price rules)"
1852
  msgstr ""
1853
 
1854
+ #: v1/view/settings_promotion.php:25 v2/App/Views/Admin/Tabs/settings.php:355
1855
  msgid "On each line item"
1856
  msgstr ""
1857
 
1858
+ #: v1/view/settings_promotion.php:28 v2/App/Views/Admin/Tabs/settings.php:356
1859
  msgid "On after total"
1860
  msgstr ""
1861
 
1862
+ #: v1/view/settings_promotion.php:31 v2/App/Views/Admin/Tabs/settings.php:357
1863
  msgid "Both in line item and after total"
1864
  msgstr ""
1865
 
1866
+ #: v1/view/settings_promotion.php:39 v2/App/Views/Admin/Tabs/settings.php:364
1867
  msgid "Savings text to show"
1868
  msgstr ""
1869
 
1899
  "discounts)"
1900
  msgstr ""
1901
 
1902
+ #: v1/view/settings_promotion.php:134 v2/App/Views/Admin/Tabs/settings.php:340
1903
  msgid "Shop page"
1904
  msgstr ""
1905
 
1906
+ #: v1/view/settings_promotion.php:137 v2/App/Views/Admin/Tabs/settings.php:341
1907
  msgid "Product page"
1908
  msgstr ""
1909
 
1910
+ #: v1/view/settings_promotion.php:140 v2/App/Views/Admin/Tabs/settings.php:342
1911
  msgid "Cart page"
1912
  msgstr ""
1913
 
1914
+ #: v1/view/settings_promotion.php:143 v2/App/Views/Admin/Tabs/settings.php:343
1915
  msgid "Checkout page"
1916
  msgstr ""
1917
 
1951
  msgid "Sale!"
1952
  msgstr ""
1953
 
1954
+ #: v1/view/template/sidebar.php:7 v2/App/Views/Admin/Tabs/DiscountRule.php:386
1955
  msgid "Looking for more features? Upgrade to PRO"
1956
  msgstr ""
1957
 
1958
+ #: v1/view/template/sidebar.php:19 v2/App/Views/Admin/Tabs/DiscountRule.php:391
1959
  msgid "With PRO version, you can create:"
1960
  msgstr ""
1961
 
1962
+ #: v1/view/template/sidebar.php:20 v2/App/Views/Admin/Tabs/DiscountRule.php:392
1963
  msgid "- Categories based discounts"
1964
  msgstr ""
1965
 
1966
+ #: v1/view/template/sidebar.php:21 v2/App/Views/Admin/Tabs/DiscountRule.php:393
1967
  msgid "- User roles based discounts"
1968
  msgstr ""
1969
 
1970
+ #: v1/view/template/sidebar.php:22 v2/App/Views/Admin/Tabs/DiscountRule.php:394
1971
  msgid "- Buy One Get One Free deals"
1972
  msgstr ""
1973
 
1974
+ #: v1/view/template/sidebar.php:23 v2/App/Views/Admin/Tabs/DiscountRule.php:395
1975
  msgid "- Buy X Get Y deals"
1976
  msgstr ""
1977
 
1978
+ #: v1/view/template/sidebar.php:24 v2/App/Views/Admin/Tabs/DiscountRule.php:396
1979
  #, php-format
1980
  msgid "- Buy 2, get 1 at 50% discount"
1981
  msgstr ""
1982
 
1983
+ #: v1/view/template/sidebar.php:25 v2/App/Views/Admin/Tabs/DiscountRule.php:397
1984
  msgid "- Buy 3 for $10 (Package / Bundle [Set] Discount)"
1985
  msgstr ""
1986
 
1987
+ #: v1/view/template/sidebar.php:26 v2/App/Views/Admin/Tabs/DiscountRule.php:398
1988
  msgid "- Different discounts with one coupon code"
1989
  msgstr ""
1990
 
1991
+ #: v1/view/template/sidebar.php:27 v2/App/Views/Admin/Tabs/DiscountRule.php:399
1992
  msgid "- Purchase history based discounts"
1993
  msgstr ""
1994
 
1995
+ #: v1/view/template/sidebar.php:28 v2/App/Views/Admin/Tabs/DiscountRule.php:400
1996
  msgid "- Free product / gift"
1997
  msgstr ""
1998
 
1999
+ #: v1/view/template/sidebar.php:29 v2/App/Views/Admin/Tabs/DiscountRule.php:401
2000
  msgid "- Discount for variants"
2001
  msgstr ""
2002
 
2003
+ #: v1/view/template/sidebar.php:30 v2/App/Views/Admin/Tabs/DiscountRule.php:402
2004
  msgid "- Conditional discounts"
2005
  msgstr ""
2006
 
2007
+ #: v1/view/template/sidebar.php:31 v2/App/Views/Admin/Tabs/DiscountRule.php:403
2008
  msgid "- Fixed cost discounts"
2009
  msgstr ""
2010
 
2011
+ #: v1/view/template/sidebar.php:32 v2/App/Views/Admin/Tabs/DiscountRule.php:404
2012
  msgid "- Offer fixed price on certain conditions"
2013
  msgstr ""
2014
 
2025
  msgstr ""
2026
 
2027
  #: v1/view/view-cart-rules.php:75 v1/view/view-pricing-rules.php:57
2028
+ #: v2/App/Views/Admin/Rules/Manage.php:17
2029
+ #: v2/App/Views/Admin/Rules/Manage.php:21
2030
+ #: v2/App/Views/Admin/Rules/Manage.php:29
2031
+ #: v2/App/Views/Admin/Rules/Manage.php:33
2032
+ #: v2/App/Views/Admin/Rules/Manage.php:41
2033
  msgid "This rule is not running currently: "
2034
  msgstr ""
2035
 
2044
  msgstr ""
2045
 
2046
  #: v1/view/view-cart-rules.php:98 v1/view/view-pricing-rules.php:81
2047
+ #: v2/App/Controllers/Admin/Tabs/Statistics.php:35
2048
  msgid "Rule Name"
2049
  msgstr ""
2050
 
2079
  msgstr ""
2080
 
2081
  #: v1/view/view-cart-rules.php:140 v1/view/view-pricing-rules.php:149
2082
+ #: v2/App/Views/Admin/Rules/Conditions/Main.php:137
2083
  #, php-format
2084
  msgid "Current date and time: %s"
2085
  msgstr ""
2518
  msgid "Fixed"
2519
  msgstr ""
2520
 
2521
+ #: v2/App/Compatibility/CompositeProductsBySomewhereWarm.php:51
2522
  msgid "Add compatible for WooCommerce Composite Products"
2523
  msgstr ""
2524
 
2525
+ #: v2/App/Compatibility/CompositeProductsBySomewhereWarm.php:54
2526
  msgid ""
2527
  "Limitation: Product page strikeout. We suggest to disable strikeout on "
2528
  "product page."
2557
  #: v2/App/Conditions/CartLineItemsCount.php:16
2558
  #: v2/App/Conditions/CartSubTotal.php:18 v2/App/Helpers/ProOptions.php:80
2559
  #: v2/App/Helpers/ProOptions.php:136 v2/App/Helpers/ProOptions.php:144
2560
+ #: v2/App/Helpers/ProOptions.php:152 v2/App/Views/Admin/Tabs/settings.php:256
2561
  msgid "Cart"
2562
  msgstr ""
2563
 
2567
  "disable it!"
2568
  msgstr ""
2569
 
2570
+ #: v2/App/Controllers/Admin/Settings.php:223
2571
  msgid "no results"
2572
  msgstr ""
2573
 
2574
+ #: v2/App/Controllers/Admin/Settings.php:224
2575
  msgid "Select Values"
2576
  msgstr ""
2577
 
2578
+ #: v2/App/Controllers/Admin/Settings.php:413
2579
+ #: v2/App/Views/Admin/Tabs/DiscountRule.php:292
2580
  msgid " - (Running)"
2581
  msgstr ""
2582
 
2583
+ #: v2/App/Controllers/Admin/Settings.php:414
2584
  msgid "Oops!! something went wrong!"
2585
  msgstr ""
2586
 
2587
+ #: v2/App/Controllers/Admin/Settings.php:415
2588
  msgid "Rule duplicated successfully!"
2589
  msgstr ""
2590
 
2591
+ #: v2/App/Controllers/Admin/Settings.php:416
2592
  msgid "Rule deleted successfully!"
2593
  msgstr ""
2594
 
2595
+ #: v2/App/Controllers/Admin/Settings.php:417
2596
  msgid "Are you sure want to delete this rule!"
2597
  msgstr ""
2598
 
2599
+ #: v2/App/Controllers/Admin/Settings.php:418
2600
  msgid "Rule disabled successfully!"
2601
  msgstr ""
2602
 
2603
+ #: v2/App/Controllers/Admin/Settings.php:419
2604
  msgid "Rule enabled successfully!"
2605
  msgstr ""
2606
 
2607
+ #: v2/App/Controllers/Admin/Settings.php:420
2608
  msgid "Rule saved successfully!"
2609
  msgstr ""
2610
 
2611
+ #: v2/App/Controllers/Admin/Settings.php:421
2612
  msgid "Settings saved successfully!"
2613
  msgstr ""
2614
 
2615
+ #: v2/App/Controllers/Admin/Settings.php:422
2616
  msgid "Rule priority changed successfully!"
2617
  msgstr ""
2618
 
2619
+ #: v2/App/Controllers/Admin/Settings.php:423
2620
  msgid "Rule priority not changed !"
2621
  msgstr ""
2622
 
2623
+ #: v2/App/Controllers/Admin/Settings.php:424
2624
  msgid "No data for this period"
2625
  msgstr ""
2626
 
2627
+ #: v2/App/Controllers/Admin/Settings.php:425
2628
  msgid "Oops! Coupon already exists in Woocommerce"
2629
  msgstr ""
2630
 
2631
+ #: v2/App/Controllers/Admin/Settings.php:426
2632
  msgid "Copied!"
2633
  msgstr ""
2634
 
2635
+ #: v2/App/Controllers/Admin/Settings.php:427
2636
+ #: v2/App/Views/Admin/Tabs/settings.php:496
2637
  msgid "Copy ShortCode"
2638
  msgstr ""
2639
 
2640
+ #: v2/App/Controllers/Admin/Settings.php:428
2641
  msgid "If you make this recursive other row(s) will be removed!"
2642
  msgstr ""
2643
 
2644
+ #: v2/App/Controllers/Admin/Settings.php:430
2645
  msgid "Minimum Quantity"
2646
  msgstr ""
2647
 
2648
+ #: v2/App/Controllers/Admin/Settings.php:431
2649
  msgid "Discount value"
2650
  msgstr ""
2651
 
2652
+ #: v2/App/Controllers/Admin/Settings.php:433
2653
  msgid "Filter (Buy)"
2654
  msgstr ""
2655
 
2656
+ #: v2/App/Controllers/Admin/Settings.php:434
2657
+ #: v2/App/Views/Admin/Rules/Manage.php:139
2658
  msgid "Filter"
2659
  msgstr ""
2660
 
2661
+ #: v2/App/Controllers/Admin/Settings.php:435
2662
  msgid ""
2663
  "<p>Choose <b>what gets discount</b> (products/categories/attributes/SKU and "
2664
  "so on )</p>\n"
2665
  "<p>Note : You can also exclude products/categories.</p>"
2666
  msgstr ""
2667
 
2668
+ #: v2/App/Controllers/Admin/Settings.php:438
2669
  msgid ""
2670
  "<p>Select discount type and its value (percentage/price/fixed price)</p>"
2671
  msgstr ""
2672
 
2673
+ #: v2/App/Controllers/Admin/Settings.php:439
2674
  msgid "Rules (optional)"
2675
  msgstr ""
2676
 
2677
+ #: v2/App/Controllers/Admin/Settings.php:440
2678
  msgid ""
2679
  "<p>Include additional conditions (if necessary) to apply discount for "
2680
  "product filters.</p>"
2681
  msgstr ""
2682
 
2683
+ #: v2/App/Controllers/Admin/Settings.php:441
2684
  msgid ""
2685
  "<p>Choose Buy Products. (products/categories/attributes/tags/sku) Example : "
2686
  "For Buy X get Y scenarios, choose X here.</p>"
2687
  msgstr ""
2688
 
2689
+ #: v2/App/Controllers/Admin/Settings.php:442
2690
  msgid ""
2691
  "<p>Choose on which products the discount should be applied (This can be "
2692
  "products/categories/SKU)</p>"
2693
  msgstr ""
2694
 
2695
+ #: v2/App/Controllers/Admin/Settings.php:443
2696
+ #: v2/App/Controllers/Admin/Settings.php:445
2697
  msgid "Get Discount"
2698
  msgstr ""
2699
 
2700
+ #: v2/App/Controllers/Admin/Settings.php:444
2701
  msgid ""
2702
  "<p>Enter the min/max ranges and choose free item quantity.</p><p>Note : "
2703
  "Enable recursive checkbox if the discounts should be applied in sequential "
2705
  "p>"
2706
  msgstr ""
2707
 
2708
+ #: v2/App/Controllers/Admin/Settings.php:446
2709
  msgid ""
2710
  "<p>Choose the adjustment type to which the discount should be applied. You "
2711
  "can choose from products/categories/all products.</p><p>Note : Enable "
2713
  "</p>"
2714
  msgstr ""
2715
 
2716
+ #: v2/App/Controllers/Admin/Settings.php:447
2717
  msgid ""
2718
  "<p>Choose the adjustment type to which the discount should be applied. You "
2719
  "can choose from products/categories/all products.</p><p>Note : Enable "
2724
  "td><td>5</td><td>2</td></tr></tbody></table>"
2725
  msgstr ""
2726
 
2727
+ #: v2/App/Controllers/Admin/Settings.php:448
2728
+ #: v2/App/Controllers/Admin/Settings.php:449
2729
  msgid "<p>Include additional conditions (if necessary)</p>"
2730
  msgstr ""
2731
 
2732
+ #: v2/App/Controllers/Admin/Settings.php:450
2733
  msgid "<p>Processing migration, please wait...</p>"
2734
  msgstr ""
2735
 
2736
+ #: v2/App/Controllers/Admin/Settings.php:451
2737
  msgid "<p>Migration completed.</p>"
2738
  msgstr ""
2739
 
2740
+ #: v2/App/Controllers/Admin/Settings.php:452
2741
  msgid "<p>Migration skipped.</p>"
2742
  msgstr ""
2743
 
2744
+ #: v2/App/Controllers/Admin/Settings.php:453
2745
  msgid "<p>Skipping migration, please wait...</p>"
2746
  msgstr ""
2747
 
2748
+ #: v2/App/Controllers/Admin/Settings.php:454
2749
  msgid ""
2750
  "<span><b>Example:</b> Product A - Small and Product A - Medium will be "
2751
  "counted as 2 quantity</span>"
2752
  msgstr ""
2753
 
2754
+ #: v2/App/Controllers/Admin/Settings.php:455
2755
  msgid "<span>Discount applies to all eligible products in the store</span>"
2756
  msgstr ""
2757
 
2758
+ #: v2/App/Controllers/Admin/Settings.php:456
2759
  msgid ""
2760
  "<span>Choose products that get the discount using \"In List\". If you want "
2761
  "to exclude a few products, choose \"Not In List\" and select the products "
2762
  "you wanted to exclude from discount. (You can add multiple filters)</span>"
2763
  msgstr ""
2764
 
2765
+ #: v2/App/Controllers/Admin/Settings.php:457
2766
  msgid ""
2767
  "<span>Choose categories that get the discount using \"In List\". If you want "
2768
  "to exclude a few categories, choose \"Not In List\" and select the "
2770
  "filters of same type)</span>"
2771
  msgstr ""
2772
 
2773
+ #: v2/App/Controllers/Admin/Settings.php:458
2774
  msgid ""
2775
  "<span> Choose attributes that get the discount using \"In List\". If you "
2776
  "want to exclude a few attributes, choose \"Not In List\" and select the "
2778
  "filters of same type)</span>"
2779
  msgstr ""
2780
 
2781
+ #: v2/App/Controllers/Admin/Settings.php:459
2782
  msgid ""
2783
  "<span>Choose tags that get the discount using \"In List\". If you want to "
2784
  "exclude a few tags, choose \"Not In List\" and select the tags you wanted to "
2785
  "exclude from discount. (You can add multiple filters of same type)</span>"
2786
  msgstr ""
2787
 
2788
+ #: v2/App/Controllers/Admin/Settings.php:460
2789
  msgid ""
2790
  "<span>Choose SKUs that get the discount using \"In List\". If you want to "
2791
  "exclude a few SKUs, choose \"Not In List\" and select the SKUs you wanted to "
2792
  "exclude from discount. (You can add multiple filters of same type)</span>"
2793
  msgstr ""
2794
 
2795
+ #: v2/App/Controllers/Admin/Settings.php:461
2796
  msgid ""
2797
  "<span>Choose whether you want to include (or exclude) products on sale "
2798
  "(those having a sale price) for the discount </span>"
2799
  msgstr ""
2800
 
2801
+ #: v2/App/Controllers/Admin/Settings.php:462
2802
  msgid "<span>Discount applies to custom taxonomy</span>"
2803
  msgstr ""
2804
 
2805
+ #: v2/App/Controllers/Admin/Settings.php:463
2806
  msgid "Processing please wait.."
2807
  msgstr ""
2808
 
2809
+ #: v2/App/Controllers/Admin/Settings.php:464
2810
  msgid "Rebuild index processed"
2811
  msgstr ""
2812
 
2813
+ #: v2/App/Controllers/Admin/Settings.php:465
2814
  msgid "Please select the rules to build index"
2815
  msgstr ""
2816
 
2817
+ #: v2/App/Controllers/Admin/Settings.php:466
2818
+ msgid "Invalid File. Upload : <b style='color:red;'>.csv</b> File. </br>"
2819
+ msgstr ""
2820
+
2821
+ #: v2/App/Controllers/Admin/Settings.php:467
2822
+ msgid ""
2823
+ "<b>This rule is not running currently:</b> Rule reached maximum usage limit"
2824
+ msgstr ""
2825
+
2826
+ #: v2/App/Controllers/Admin/Settings.php:468
2827
+ msgid ""
2828
+ "<b>This rule is not running currently:</b> Start date and time is set in the "
2829
+ "future date"
2830
+ msgstr ""
2831
+
2832
+ #: v2/App/Controllers/Admin/Settings.php:469
2833
+ msgid "<b>This rule is not running currently:</b> Validity expired"
2834
+ msgstr ""
2835
+
2836
  #: v2/App/Controllers/Admin/Tabs/Compatible.php:21
2837
  msgid "Compatibility"
2838
  msgstr ""
2847
  msgstr ""
2848
 
2849
  #: v2/App/Controllers/Admin/Tabs/ImportExport.php:19
2850
+ msgid "Import/Export"
 
2851
  msgstr ""
2852
 
2853
  #: v2/App/Controllers/Admin/Tabs/Reports/RuleAmount.php:14
2854
+ #: v2/App/Controllers/Admin/Tabs/Reports/RuleAmountWithCartDiscount.php:11
2855
+ #: v2/App/Controllers/Admin/Tabs/Reports/RuleNameDiscount.php:24
2856
+ msgid "Amount shown in default store currency"
 
 
 
2857
  msgstr ""
2858
 
2859
+ #: v2/App/Controllers/Admin/Tabs/Reports/RuleAmount.php:28
2860
+ #: v2/App/Controllers/Admin/Tabs/Reports/RuleNameDiscount.php:39
2861
  msgid "Date"
2862
  msgstr ""
2863
 
2864
+ #: v2/App/Controllers/Admin/Tabs/Statistics.php:25
 
 
 
 
2865
  msgid "Reports"
2866
  msgstr ""
2867
 
2868
+ #: v2/App/Controllers/Admin/Tabs/Statistics.php:42
2869
+ msgid "All Rules"
2870
  msgstr ""
2871
 
2872
+ #: v2/App/Controllers/Admin/Tabs/Statistics.php:43
2873
+ #: v2/App/Controllers/Admin/Tabs/Statistics.php:49
2874
  msgid "Rule"
2875
  msgstr ""
2876
 
2877
+ #: v2/App/Controllers/Admin/Tabs/Statistics.php:48
2878
+ msgid "All Rules (except cart adjustment type)"
2879
  msgstr ""
2880
 
2881
  #: v2/App/Controllers/Base.php:42
2885
  #: v2/App/Controllers/Base.php:43 v2/App/Controllers/Base.php:48
2886
  #: v2/App/Helpers/ProOptions.php:34 v2/App/Helpers/ProOptions.php:40
2887
  #: v2/App/Helpers/ProOptions.php:46 v2/App/Helpers/ProOptions.php:52
2888
+ #: v2/App/Helpers/ProOptions.php:58 v2/App/Views/Admin/Tabs/settings.php:114
2889
  msgid "Product"
2890
  msgstr ""
2891
 
2908
  msgid "Bulk Discount"
2909
  msgstr ""
2910
 
2911
+ #: v2/App/Controllers/ManageDiscount.php:635
2912
  msgid "cart discount"
2913
  msgstr ""
2914
 
2915
+ #: v2/App/Controllers/ManageDiscount.php:834
2916
  msgid "Coupon code applied successfully."
2917
  msgstr ""
2918
 
3086
  msgid "Bundle (Set) Discount - PRO -"
3087
  msgstr ""
3088
 
3089
+ #: v2/App/Helpers/Rule.php:1175 v2/App/Helpers/Rule.php:1186
3090
  msgid "discount"
3091
  msgstr ""
3092
 
3093
+ #: v2/App/Helpers/Rule.php:1246 v2/App/Helpers/Rule.php:1324
3094
+ #: v2/App/Views/Admin/Tabs/ImportExport.php:82
3095
  msgid "Untitled Rule"
3096
  msgstr ""
3097
 
3098
+ #: v2/App/Helpers/Woocommerce.php:912
3099
  msgid "Sunday"
3100
  msgstr ""
3101
 
3102
+ #: v2/App/Helpers/Woocommerce.php:913
3103
  msgid "Monday"
3104
  msgstr ""
3105
 
3106
+ #: v2/App/Helpers/Woocommerce.php:914
3107
  msgid "Tuesday"
3108
  msgstr ""
3109
 
3110
+ #: v2/App/Helpers/Woocommerce.php:915
3111
  msgid "Wednesday"
3112
  msgstr ""
3113
 
3114
+ #: v2/App/Helpers/Woocommerce.php:916
3115
  msgid "Thursday"
3116
  msgstr ""
3117
 
3118
+ #: v2/App/Helpers/Woocommerce.php:917
3119
  msgid "Friday"
3120
  msgstr ""
3121
 
3122
+ #: v2/App/Helpers/Woocommerce.php:918
3123
  msgid "Saturday"
3124
  msgstr ""
3125
 
3126
+ #: v2/App/Helpers/Woocommerce.php:929
3127
  msgid ""
3128
  "Woocommerce before main content(Archive / Shop / Cat Pages / single product)"
3129
  msgstr ""
3130
 
3131
+ #: v2/App/Helpers/Woocommerce.php:930
3132
  msgid "Woocommerce archive description(Archive / Shop / Cat Pages)"
3133
  msgstr ""
3134
 
3135
+ #: v2/App/Helpers/Woocommerce.php:931
3136
  msgid "Woocommerce before shop loop(Archive / Shop / Cat Pages)"
3137
  msgstr ""
3138
 
3139
+ #: v2/App/Helpers/Woocommerce.php:932
3140
  msgid "Woocommerce after shop loop(Archive / Shop / Cat Pages)"
3141
  msgstr ""
3142
 
3143
+ #: v2/App/Helpers/Woocommerce.php:933
3144
  msgid ""
3145
  "Woocommerce after main content(Archive / Shop / Cat Pages / single product)"
3146
  msgstr ""
3147
 
3148
+ #: v2/App/Helpers/Woocommerce.php:934 v2/App/Views/Admin/Tabs/settings.php:194
3149
+ #: v2/App/Views/Admin/Tabs/settings.php:212
3150
  msgid "Woocommerce before single product"
3151
  msgstr ""
3152
 
3153
+ #: v2/App/Helpers/Woocommerce.php:935 v2/App/Views/Admin/Tabs/settings.php:196
3154
+ #: v2/App/Views/Admin/Tabs/settings.php:214
3155
  msgid "Woocommerce before single product summary"
3156
  msgstr ""
3157
 
3158
+ #: v2/App/Helpers/Woocommerce.php:936 v2/App/Views/Admin/Tabs/settings.php:195
3159
+ #: v2/App/Views/Admin/Tabs/settings.php:213
3160
  msgid "Woocommerce after single product summary"
3161
  msgstr ""
3162
 
3163
+ #: v2/App/Helpers/Woocommerce.php:937 v2/App/Views/Admin/Tabs/settings.php:193
3164
+ #: v2/App/Views/Admin/Tabs/settings.php:211
3165
  msgid "Woocommerce after single product"
3166
  msgstr ""
3167
 
3168
+ #: v2/App/Helpers/Woocommerce.php:938
3169
  msgid "Woocommerce before cart"
3170
  msgstr ""
3171
 
3172
+ #: v2/App/Helpers/Woocommerce.php:939
3173
  msgid "Woocommerce before cart table"
3174
  msgstr ""
3175
 
3176
+ #: v2/App/Helpers/Woocommerce.php:940
3177
  msgid "Woocommerce before cart contents"
3178
  msgstr ""
3179
 
3180
+ #: v2/App/Helpers/Woocommerce.php:941
3181
  msgid "Woocommerce cart contents"
3182
  msgstr ""
3183
 
3184
+ #: v2/App/Helpers/Woocommerce.php:942
3185
  msgid "Woocommerce after cart contents"
3186
  msgstr ""
3187
 
3188
+ #: v2/App/Helpers/Woocommerce.php:943
3189
  msgid "Woocommerce after cart table"
3190
  msgstr ""
3191
 
3192
+ #: v2/App/Helpers/Woocommerce.php:944
3193
  msgid "Woocommerce after cart"
3194
  msgstr ""
3195
 
3196
+ #: v2/App/Helpers/Woocommerce.php:945
3197
  msgid "Woocommerce before checkout form"
3198
  msgstr ""
3199
 
3200
+ #: v2/App/Helpers/Woocommerce.php:947
3201
  msgid "Woocommerce before checkout billing form"
3202
  msgstr ""
3203
 
3204
+ #: v2/App/Helpers/Woocommerce.php:948
3205
  msgid "Woocommerce after checkout billing form"
3206
  msgstr ""
3207
 
3208
+ #: v2/App/Helpers/Woocommerce.php:949
3209
  msgid "Woocommerce before checkout shipping form"
3210
  msgstr ""
3211
 
3212
+ #: v2/App/Helpers/Woocommerce.php:950
3213
  msgid "Woocommerce after checkout shipping form"
3214
  msgstr ""
3215
 
3216
+ #: v2/App/Helpers/Woocommerce.php:951
3217
  msgid "Woocommerce before order notes"
3218
  msgstr ""
3219
 
3220
+ #: v2/App/Helpers/Woocommerce.php:952
3221
  msgid "Woocommerce after order notes"
3222
  msgstr ""
3223
 
3224
+ #: v2/App/Views/Admin/Menu.php:33
 
 
 
 
 
 
3225
  msgid "Rebuild index"
3226
  msgstr ""
3227
 
3303
  msgstr ""
3304
 
3305
  #: v2/App/Views/Admin/Rules/Conditions/Main.php:24
3306
+ #: v2/App/Views/Admin/Rules/Conditions/Main.php:113
3307
  msgid "Match All"
3308
  msgstr ""
3309
 
3310
  #: v2/App/Views/Admin/Rules/Conditions/Main.php:26
3311
+ #: v2/App/Views/Admin/Rules/Conditions/Main.php:115
3312
  msgid "Many Any"
3313
  msgstr ""
3314
 
3317
  msgid "Condition Type"
3318
  msgstr ""
3319
 
3320
+ #: v2/App/Views/Admin/Rules/Conditions/Main.php:103
3321
+ #: v2/App/Views/Admin/Rules/Conditions/Main.php:123
3322
  msgid "Add condition"
3323
  msgstr ""
3324
 
3325
+ #: v2/App/Views/Admin/Rules/Conditions/Main.php:111
3326
  msgid "Conditions Relationship"
3327
  msgstr ""
3328
 
3329
+ #: v2/App/Views/Admin/Rules/Conditions/Main.php:135
3330
  msgid "Rule Limits"
3331
  msgstr ""
3332
 
3333
+ #: v2/App/Views/Admin/Rules/Conditions/Main.php:140
3334
+ msgid "Rule Used: "
3335
+ msgstr ""
3336
+
3337
+ #: v2/App/Views/Admin/Rules/Conditions/Main.php:150
3338
  msgid "Unlimited"
3339
  msgstr ""
3340
 
3341
+ #: v2/App/Views/Admin/Rules/Conditions/Main.php:157
3342
  msgid "Maximum usage limit"
3343
  msgstr ""
3344
 
3345
+ #: v2/App/Views/Admin/Rules/Conditions/Main.php:165
3346
  msgid "Rule Vaild From"
3347
  msgstr ""
3348
 
3349
+ #: v2/App/Views/Admin/Rules/Conditions/Main.php:170
3350
  msgid "Vaild from"
3351
  msgstr ""
3352
 
3353
+ #: v2/App/Views/Admin/Rules/Conditions/Main.php:177
3354
  msgid "Rule Valid To"
3355
  msgstr ""
3356
 
3357
+ #: v2/App/Views/Admin/Rules/Conditions/Main.php:181
3358
  msgid "Vaild to"
3359
  msgstr ""
3360
 
3361
+ #: v2/App/Views/Admin/Rules/Conditions/Main.php:192
3362
  msgid "Select values"
3363
  msgstr ""
3364
 
3379
  msgstr ""
3380
 
3381
  #: v2/App/Views/Admin/Rules/DiscountBatch/Main.php:22
3382
+ #: v2/App/Views/Admin/Tabs/settings.php:517
3383
  msgid "Note:"
3384
  msgstr ""
3385
 
3399
  #: v2/App/Views/Admin/Rules/DiscountBatch/Main.php:71
3400
  #: v2/App/Views/Admin/Rules/DiscountBatch/Main.php:92
3401
  #: v2/App/Views/Admin/Rules/DiscountBatch/Main.php:126
3402
+ #: v2/App/Views/Admin/Tabs/settings.php:413
3403
+ #: v2/App/Views/Admin/Tabs/settings.php:422
3404
+ #: v2/App/Views/Admin/Tabs/settings.php:485
3405
  msgid ""
3406
  "Unlock this feature by <a href='https://www.flycart.org/products/wordpress/"
3407
  "woocommerce-discount-rules' target='_blank'>Upgrading to Pro</a>"
3498
  #: v2/App/Views/Admin/Rules/Discounts/Cart.php:24
3499
  #: v2/App/Views/Admin/Rules/Discounts/simple.php:23
3500
  #: v2/App/Views/Admin/Tabs/DiscountRule.php:108
3501
+ #: v2/App/Views/Admin/Tabs/DiscountRule.php:334
3502
  msgid "Discount Type"
3503
  msgstr ""
3504
 
3505
  #: v2/App/Views/Admin/Rules/Discounts/Bulk.php:65
3506
+ #: v2/App/Views/Admin/Tabs/settings.php:583
3507
  msgid "Discount Value"
3508
  msgstr ""
3509
 
3536
  msgstr ""
3537
 
3538
  #: v2/App/Views/Admin/Rules/Discounts/Main.php:22
3539
+ msgid "Filters set above"
3540
  msgstr ""
3541
 
3542
  #: v2/App/Views/Admin/Rules/Discounts/Main.php:25
3638
  msgid "Select Products"
3639
  msgstr ""
3640
 
3641
+ #: v2/App/Views/Admin/Rules/Manage.php:17
3642
  msgid " Start date and time is set in the future date"
3643
  msgstr ""
3644
 
3645
+ #: v2/App/Views/Admin/Rules/Manage.php:21
3646
+ #: v2/App/Views/Admin/Rules/Manage.php:33
3647
+ #: v2/App/Views/Admin/Rules/Manage.php:41
3648
+ msgid " Rule reached maximum usage limit "
3649
+ msgstr ""
3650
+
3651
+ #: v2/App/Views/Admin/Rules/Manage.php:29
3652
  msgid " Validity expired"
3653
  msgstr ""
3654
 
3655
+ #: v2/App/Views/Admin/Rules/Manage.php:61
3656
  msgid "Enable?"
3657
  msgstr ""
3658
 
3659
+ #: v2/App/Views/Admin/Rules/Manage.php:70
3660
  msgid "Apply this rule if matched and ignore all other rules"
3661
  msgstr ""
3662
 
3663
+ #: v2/App/Views/Admin/Rules/Manage.php:79
3664
  msgid "#Rule ID: "
3665
  msgstr ""
3666
 
3667
+ #: v2/App/Views/Admin/Rules/Manage.php:86
3668
  msgid "Save & Close"
3669
  msgstr ""
3670
 
3671
+ #: v2/App/Views/Admin/Rules/Manage.php:89
3672
  msgid "Cancel"
3673
  msgstr ""
3674
 
3675
+ #: v2/App/Views/Admin/Rules/Manage.php:98
3676
  msgid "Choose a discount type"
3677
  msgstr ""
3678
 
3679
+ #: v2/App/Views/Admin/Rules/Manage.php:102
3680
  msgid "Select Discount Type"
3681
  msgstr ""
3682
 
3683
+ #: v2/App/Views/Admin/Rules/Manage.php:141
3684
  msgid ""
3685
  "Choose which <b>gets</b> discount (products/categories/attributes/SKU and so "
3686
  "on )"
3687
  msgstr ""
3688
 
3689
+ #: v2/App/Views/Admin/Rules/Manage.php:142
3690
  msgid "Note : You can also exclude products/categories."
3691
  msgstr ""
3692
 
3693
+ #: v2/App/Views/Admin/Rules/Manage.php:186
3694
  msgid "Select discount type and its value (percentage/price/fixed price)"
3695
  msgstr ""
3696
 
3767
  msgstr ""
3768
 
3769
  #: v2/App/Views/Admin/Tabs/DiscountRule.php:87
3770
+ #: v2/App/Views/Admin/Tabs/DiscountRule.php:372
3771
  msgid "item"
3772
  msgstr ""
3773
 
3774
  #: v2/App/Views/Admin/Tabs/DiscountRule.php:87
3775
+ #: v2/App/Views/Admin/Tabs/DiscountRule.php:372
3776
  msgid "items"
3777
  msgstr ""
3778
 
3779
  #: v2/App/Views/Admin/Tabs/DiscountRule.php:117
3780
+ #: v2/App/Views/Admin/Tabs/DiscountRule.php:343
3781
  msgid "Language(s)"
3782
  msgstr ""
3783
 
3814
  msgid "Enabled"
3815
  msgstr ""
3816
 
3817
+ #: v2/App/Views/Admin/Tabs/DiscountRule.php:261
3818
+ #: v2/App/Views/Admin/Tabs/DiscountRule.php:275
3819
+ #: v2/App/Views/Admin/Tabs/DiscountRule.php:288
3820
+ msgid " - ( Not running )"
3821
  msgstr ""
3822
 
3823
  #: v2/App/Views/Admin/Tabs/DiscountRule.php:262
3824
+ #: v2/App/Views/Admin/Tabs/DiscountRule.php:276
3825
+ #: v2/App/Views/Admin/Tabs/DiscountRule.php:289
3826
+ msgid "Rule reached maximum usage limit"
3827
+ msgstr ""
3828
+
3829
+ #: v2/App/Views/Admin/Tabs/DiscountRule.php:266
3830
+ msgid " - ( Will run in future)"
3831
+ msgstr ""
3832
+
3833
+ #: v2/App/Views/Admin/Tabs/DiscountRule.php:269
3834
+ #: v2/App/Views/Admin/Tabs/DiscountRule.php:282
3835
  msgid "Your server current date and time:"
3836
  msgstr ""
3837
 
3838
+ #: v2/App/Views/Admin/Tabs/DiscountRule.php:279
3839
  msgid " - ( Not running - validity expired)"
3840
  msgstr ""
3841
 
3842
+ #: v2/App/Views/Admin/Tabs/DiscountRule.php:316
3843
  msgid "No rules found."
3844
  msgstr ""
3845
 
3846
+ #: v2/App/Views/Admin/Tabs/DiscountRule.php:405
3847
  msgid "Go PRO"
3848
  msgstr ""
3849
 
3850
+ #: v2/App/Views/Admin/Tabs/ImportExport.php:9
3851
  msgid "Export tool"
3852
  msgstr ""
3853
 
3854
+ #: v2/App/Views/Admin/Tabs/ImportExport.php:14
3855
+ msgid "Export"
3856
+ msgstr ""
3857
+
3858
+ #: v2/App/Views/Admin/Tabs/ImportExport.php:24
3859
+ msgid "Import Tool"
3860
+ msgstr ""
3861
+
3862
+ #: v2/App/Views/Admin/Tabs/ImportExport.php:117
3863
+ msgid "<b style=\"color: green;\">Rules Imported successfully</b>"
3864
+ msgstr ""
3865
+
3866
+ #: v2/App/Views/Admin/Tabs/ImportExport.php:120
3867
+ msgid "<b style=\"color: red;\">Problem in Importing CSV Data</b>"
3868
+ msgstr ""
3869
+
3870
+ #: v2/App/Views/Admin/Tabs/ImportExport.php:130
3871
+ msgid "Import"
3872
  msgstr ""
3873
 
3874
  #: v2/App/Views/Admin/Tabs/Statistics.php:39
3956
  msgstr ""
3957
 
3958
  #: v2/App/Views/Admin/Tabs/settings.php:80
3959
+ msgid "Refresh order review in checkout"
3960
  msgstr ""
3961
 
3962
  #: v2/App/Views/Admin/Tabs/settings.php:81
3963
+ msgid "Useful when you have purchase history/shipping address based discount."
3964
+ msgstr ""
3965
+
3966
+ #: v2/App/Views/Admin/Tabs/settings.php:95
3967
+ msgid "Suppress third party discount plugins"
3968
+ msgstr ""
3969
+
3970
+ #: v2/App/Views/Admin/Tabs/settings.php:96
3971
  msgid ""
3972
  "suppress third party plugins from modifying the prices. other discount "
3973
  "plugins may not works!"
3974
  msgstr ""
3975
 
3976
+ #: v2/App/Views/Admin/Tabs/settings.php:120
3977
  msgid "On-sale badge"
3978
  msgstr ""
3979
 
3980
+ #: v2/App/Views/Admin/Tabs/settings.php:121
3981
  msgid "show on-sale badge"
3982
  msgstr ""
3983
 
3984
+ #: v2/App/Views/Admin/Tabs/settings.php:129
3985
  msgid "Show on products that are covered under any discount rule in the plugin"
3986
  msgstr ""
3987
 
3988
+ #: v2/App/Views/Admin/Tabs/settings.php:137
3989
  msgid "Customize the sale badge"
3990
  msgstr ""
3991
 
3992
+ #: v2/App/Views/Admin/Tabs/settings.php:155
3993
  msgid "Sale badge content"
3994
  msgstr ""
3995
 
3996
+ #: v2/App/Views/Admin/Tabs/settings.php:156
3997
  msgid ""
3998
  "You can use HTML inside. <br><b>IMPORTANT NOTE:</b> This customized sale "
3999
  "badge will be applicable only for products that are part of the discount "
4000
  "rules configured in this plugin <b>Eg:</b><span class=\"onsale\">Sale!</span>"
4001
  msgstr ""
4002
 
4003
+ #: v2/App/Views/Admin/Tabs/settings.php:167
4004
  msgid "Show discount table "
4005
  msgstr ""
4006
 
4007
+ #: v2/App/Views/Admin/Tabs/settings.php:168
4008
  msgid "Show discount table on product page"
4009
  msgstr ""
4010
 
4011
+ #: v2/App/Views/Admin/Tabs/settings.php:177
4012
+ #: v2/App/Views/Admin/Tabs/settings.php:513
4013
  msgid "Customize Discount Table"
4014
  msgstr ""
4015
 
4016
+ #: v2/App/Views/Admin/Tabs/settings.php:184
4017
  msgid "Position to show discount table"
4018
  msgstr ""
4019
 
4020
+ #: v2/App/Views/Admin/Tabs/settings.php:185
4021
  msgid "Position to show discount table on product page"
4022
  msgstr ""
4023
 
4024
+ #: v2/App/Views/Admin/Tabs/settings.php:189
4025
+ #: v2/App/Views/Admin/Tabs/settings.php:207
4026
  msgid "Woocommerce before add to cart form"
4027
  msgstr ""
4028
 
4029
+ #: v2/App/Views/Admin/Tabs/settings.php:190
4030
+ #: v2/App/Views/Admin/Tabs/settings.php:208
4031
  msgid "Woocommerce product meta end"
4032
  msgstr ""
4033
 
4034
+ #: v2/App/Views/Admin/Tabs/settings.php:191
4035
+ #: v2/App/Views/Admin/Tabs/settings.php:209
4036
  msgid "Woocommerce product meta start"
4037
  msgstr ""
4038
 
4039
+ #: v2/App/Views/Admin/Tabs/settings.php:192
4040
+ #: v2/App/Views/Admin/Tabs/settings.php:210
4041
  msgid "Woocommerce after add to cart form"
4042
  msgstr ""
4043
 
4044
+ #: v2/App/Views/Admin/Tabs/settings.php:202
4045
  msgid "Position to show discount bar"
4046
  msgstr ""
4047
 
4048
+ #: v2/App/Views/Admin/Tabs/settings.php:203
4049
  msgid "Position to show discount bar on product page"
4050
  msgstr ""
4051
 
4052
+ #: v2/App/Views/Admin/Tabs/settings.php:220
4053
  msgid "Show strikeout price"
4054
  msgstr ""
4055
 
4056
+ #: v2/App/Views/Admin/Tabs/settings.php:221
4057
  msgid "Show product strikeout price on"
4058
  msgstr ""
4059
 
4060
+ #: v2/App/Views/Admin/Tabs/settings.php:226
4061
  msgid "On shop page?"
4062
  msgstr ""
4063
 
4064
+ #: v2/App/Views/Admin/Tabs/settings.php:229
4065
  msgid "On product page?"
4066
  msgstr ""
4067
 
4068
+ #: v2/App/Views/Admin/Tabs/settings.php:232
4069
  msgid "On category page?"
4070
  msgstr ""
4071
 
4072
+ #: v2/App/Views/Admin/Tabs/settings.php:238
4073
  msgid "Show Strikeout when"
4074
  msgstr ""
4075
 
4076
+ #: v2/App/Views/Admin/Tabs/settings.php:239
4077
  msgid "Show Strikeout when this option is matched"
4078
  msgstr ""
4079
 
4080
+ #: v2/App/Views/Admin/Tabs/settings.php:262
4081
  msgid "Show strikeout on cart"
4082
  msgstr ""
4083
 
4084
+ #: v2/App/Views/Admin/Tabs/settings.php:263
4085
  msgid "Show price strikeout on cart"
4086
  msgstr ""
4087
 
4088
+ #: v2/App/Views/Admin/Tabs/settings.php:277
4089
  msgid "Combine all cart discounts"
4090
  msgstr ""
4091
 
4092
+ #: v2/App/Views/Admin/Tabs/settings.php:278
4093
  msgid "Combine all cart discounts in single discount label"
4094
  msgstr ""
4095
 
4096
+ #: v2/App/Views/Admin/Tabs/settings.php:297
4097
+ #: v2/App/Views/Admin/Tabs/settings.php:298
4098
  msgid "Discount label for combined discounts"
4099
  msgstr ""
4100
 
4101
+ #: v2/App/Views/Admin/Tabs/settings.php:315
4102
  msgid "Subtotal based promotion"
4103
  msgstr ""
4104
 
4105
+ #: v2/App/Views/Admin/Tabs/settings.php:316
4106
  msgid ""
4107
  "Display subtotal based promotion messages in cart/product/shop pages<br>If "
4108
  "enabled an option to add promotion message will displays on each rule(when "
4109
  "subtotal condition is added)"
4110
  msgstr ""
4111
 
4112
+ #: v2/App/Views/Admin/Tabs/settings.php:334
4113
  msgid "Subtotal based promo text"
4114
  msgstr ""
4115
 
4116
+ #: v2/App/Views/Admin/Tabs/settings.php:335
4117
  msgid ""
4118
  "Subtotal based promo text (available only for subtotal based discounts) "
4119
  msgstr ""
4120
 
4121
+ #: v2/App/Views/Admin/Tabs/settings.php:339
4122
  msgid "Select the page to display promotion message"
4123
  msgstr ""
4124
 
4125
+ #: v2/App/Views/Admin/Tabs/settings.php:349
4126
  msgid "Display you saved text"
4127
  msgstr ""
4128
 
4129
+ #: v2/App/Views/Admin/Tabs/settings.php:350
4130
  msgid "Display you saved text when rule applied"
4131
  msgstr ""
4132
 
4133
+ #: v2/App/Views/Admin/Tabs/settings.php:365
4134
  msgid "You save text to show when rule applied"
4135
  msgstr ""
4136
 
4137
+ #: v2/App/Views/Admin/Tabs/settings.php:374
4138
  msgid "Show a discount applied message on cart?"
4139
  msgstr ""
4140
 
4141
+ #: v2/App/Views/Admin/Tabs/settings.php:375
4142
  msgid "Show message in cart page on rule applied"
4143
  msgstr ""
4144
 
4145
+ #: v2/App/Views/Admin/Tabs/settings.php:391
4146
  msgid "Applied rule message text on cart"
4147
  msgstr ""
4148
 
4149
+ #: v2/App/Views/Admin/Tabs/settings.php:392
4150
  msgid "Text to show when rule applied"
4151
  msgstr ""
4152
 
4153
+ #: v2/App/Views/Admin/Tabs/settings.php:402
4154
  msgid "Banner"
4155
  msgstr ""
4156
 
4157
+ #: v2/App/Views/Admin/Tabs/settings.php:409
4158
  msgid "Banner Content"
4159
  msgstr ""
4160
 
4161
+ #: v2/App/Views/Admin/Tabs/settings.php:410
4162
  msgid ""
4163
  "A static banner you that you want to display in your storefront. <br><br> "
4164
  "<b>NOTE:</b> It is a static banner. You can use any content or html here."
4165
  msgstr ""
4166
 
4167
+ #: v2/App/Views/Admin/Tabs/settings.php:419
4168
  msgid "Banner Content display position"
4169
  msgstr ""
4170
 
4171
+ #: v2/App/Views/Admin/Tabs/settings.php:420
4172
  msgid "Choose a display position for the banner in your storefront"
4173
  msgstr ""
4174
 
4175
+ #: v2/App/Views/Admin/Tabs/settings.php:431
4176
  msgid "On-Sale page"
4177
  msgstr ""
4178
 
4179
+ #: v2/App/Views/Admin/Tabs/settings.php:437
4180
  msgid "Select rules for the On Sale Page"
4181
  msgstr ""
4182
 
4183
+ #: v2/App/Views/Admin/Tabs/settings.php:450
4184
  msgid "Type the name of the rule to select it"
4185
  msgstr ""
4186
 
4187
+ #: v2/App/Views/Admin/Tabs/settings.php:458
4188
  msgid "All active rules"
4189
  msgstr ""
4190
 
4191
+ #: v2/App/Views/Admin/Tabs/settings.php:483
4192
  msgid "Save and Build Index"
4193
  msgstr ""
4194
 
4195
+ #: v2/App/Views/Admin/Tabs/settings.php:493
4196
  msgid ""
4197
  "ShortCode to load all products which has discount through Woo Discount Rules"
4198
  msgstr ""
4199
 
4200
+ #: v2/App/Views/Admin/Tabs/settings.php:516
4201
  msgid "Settings Saved"
4202
  msgstr ""
4203
 
4204
+ #: v2/App/Views/Admin/Tabs/settings.php:517
4205
  msgid " This table contains sample content for design purpose."
4206
  msgstr ""
4207
 
4208
+ #: v2/App/Views/Admin/Tabs/settings.php:527
4209
  msgid "Table Header"
4210
  msgstr ""
4211
 
4212
+ #: v2/App/Views/Admin/Tabs/settings.php:528
4213
  msgid "Show/Hide table header column names"
4214
  msgstr ""
4215
 
4216
+ #: v2/App/Views/Admin/Tabs/settings.php:541
4217
  msgid "Title column Name on table"
4218
  msgstr ""
4219
 
4220
+ #: v2/App/Views/Admin/Tabs/settings.php:542
4221
  msgid "Give name for rule title column"
4222
  msgstr ""
4223
 
4224
+ #: v2/App/Views/Admin/Tabs/settings.php:553
4225
  msgid "Discount column Name on table"
4226
  msgstr ""
4227
 
4228
+ #: v2/App/Views/Admin/Tabs/settings.php:554
4229
  msgid "Give name for discount column"
4230
  msgstr ""
4231
 
4232
+ #: v2/App/Views/Admin/Tabs/settings.php:565
4233
  msgid "Range column Name on table"
4234
  msgstr ""
4235
 
4236
+ #: v2/App/Views/Admin/Tabs/settings.php:566
4237
  msgid "Give name for range column"
4238
  msgstr ""
4239
 
4240
+ #: v2/App/Views/Admin/Tabs/settings.php:577
4241
  msgid "Discount column value on table"
4242
  msgstr ""
4243
 
4244
+ #: v2/App/Views/Admin/Tabs/settings.php:578
4245
  msgid "Show Discount value/price in table"
4246
  msgstr ""
4247
 
4248
+ #: v2/App/Views/Admin/Tabs/settings.php:586
4249
  msgid "Discounted Price"
4250
  msgstr ""
4251
 
4252
+ #: v2/App/Views/Admin/Tabs/settings.php:661
4253
+ #: v2/App/Views/Admin/Tabs/settings.php:684
4254
  msgid "Bulk Rule"
4255
  msgstr ""
4256
 
4257
+ #: v2/App/Views/Admin/Tabs/settings.php:669
4258
+ #: v2/App/Views/Admin/Tabs/settings.php:715
4259
+ #: v2/App/Views/Admin/Tabs/settings.php:782
4260
  #: v2/App/Views/Templates/discount_table.php:113
4261
  msgid " flat"
4262
  msgstr ""
4263
 
4264
+ #: v2/App/Views/Admin/Tabs/settings.php:675
4265
  msgid "1 - 5"
4266
  msgstr ""
4267
 
4268
+ #: v2/App/Views/Admin/Tabs/settings.php:698
4269
  msgid "11 - 15"
4270
  msgstr ""
4271
 
4272
+ #: v2/App/Views/Admin/Tabs/settings.php:707
4273
  msgid "Bulk Flat discount"
4274
  msgstr ""
4275
 
4276
+ #: v2/App/Views/Admin/Tabs/settings.php:721
4277
  msgid "50 - 60"
4278
  msgstr ""
4279
 
4280
+ #: v2/App/Views/Admin/Tabs/settings.php:730
4281
  msgid "Bulk percentage discount"
4282
  msgstr ""
4283
 
4284
+ #: v2/App/Views/Admin/Tabs/settings.php:743
4285
  msgid "70 - 80"
4286
  msgstr ""
4287
 
4288
+ #: v2/App/Views/Admin/Tabs/settings.php:752
4289
  #, php-format
4290
  msgid "Bulk % discount"
4291
  msgstr ""
4292
 
4293
+ #: v2/App/Views/Admin/Tabs/settings.php:765
4294
  msgid "450 - 500"
4295
  msgstr ""
4296
 
4297
+ #: v2/App/Views/Admin/Tabs/settings.php:774
4298
  msgid "Bulk flat"
4299
  msgstr ""
4300
 
4301
+ #: v2/App/Views/Admin/Tabs/settings.php:788
4302
  msgid "600 - 700"
4303
  msgstr ""
4304
 
4305
+ #: v2/App/Views/Admin/Tabs/settings.php:797
4306
  msgid "set percentage discount"
4307
  msgstr ""
4308
 
4309
+ #: v2/App/Views/Admin/Tabs/settings.php:810
4310
  msgid "5"
4311
  msgstr ""
4312
 
4313
+ #: v2/App/Views/Admin/Tabs/settings.php:819
4314
  msgid "Fixed discount for set"
4315
  msgstr ""
4316
 
4317
+ #: v2/App/Views/Admin/Tabs/settings.php:832
4318
  msgid "10"
4319
  msgstr ""
4320
 
4321
+ #: v2/App/Views/Admin/Tabs/settings.php:841
4322
  msgid "set flat discount"
4323
  msgstr ""
4324
 
4325
+ #: v2/App/Views/Admin/Tabs/settings.php:854
4326
  msgid "15"
4327
  msgstr ""
4328
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://flycart.org/
4
  Tags: woocommerce, coupons, discounts, dynamic pricing, Buy One Get One Free, pricing deals, bulk discount, discount
5
  Requires at least: 4.4.1
6
  Tested up to: 5.4
7
- Stable tag: 1.9.12
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -336,6 +336,18 @@ Discount - Enter minimum & Maximum quantity -> Adjustment Type -> Product Discou
336
 
337
  == Changelog ==
338
 
 
 
 
 
 
 
 
 
 
 
 
 
339
  = 1.9.12 - 29/06/20 =
340
  * Fix - Dynamic strikeout improvement(strikeout doesn't replace for non matched qty).
341
  * Fix - Custom taxonomy condition for variable products.
4
  Tags: woocommerce, coupons, discounts, dynamic pricing, Buy One Get One Free, pricing deals, bulk discount, discount
5
  Requires at least: 4.4.1
6
  Tested up to: 5.4
7
+ Stable tag: 2.0.0
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
336
 
337
  == Changelog ==
338
 
339
+ = 2.0.0 - 14/07/20 =
340
+ * Fix - Cart discount price for single product.
341
+ * Fix - Displaying strikeout when chosen apply as coupon.
342
+ * Fix - Coupon code not migrated while migration.
343
+ * Fix - Not in list condition not working.
344
+ * Improvement - Displayed max rule limit reach msg and limits.
345
+ * Improvement - select2 to selectWoo.
346
+ * Improvement - Individual rule report.
347
+ * Improvement - Download exported csv without storing in server.
348
+ * Improvement - Report for BOGO rules.
349
+ * Feature - Import option.
350
+
351
  = 1.9.12 - 29/06/20 =
352
  * Fix - Dynamic strikeout improvement(strikeout doesn't replace for non matched qty).
353
  * Fix - Custom taxonomy condition for variable products.
v1/assets/js/app.js CHANGED
@@ -1512,7 +1512,7 @@ function wooo_discount_range_altered() {
1512
  });
1513
 
1514
  $('.coupons_selectbox_multi_select_wdr').on('trigger_ajax_select_wdr', function (event) {
1515
- $('.coupons_selectbox_multi_select_wdr').select2({
1516
  ajax: {
1517
  url: ajax_url,
1518
  type: 'GET',
1512
  });
1513
 
1514
  $('.coupons_selectbox_multi_select_wdr').on('trigger_ajax_select_wdr', function (event) {
1515
+ $('.coupons_selectbox_multi_select_wdr').selectWoo({
1516
  ajax: {
1517
  url: ajax_url,
1518
  type: 'GET',
v2/App/Conditions/Base.php CHANGED
@@ -58,56 +58,130 @@ abstract class Base
58
  } elseif (is_array($cart)) {
59
  $cart_items = $cart;
60
  }
61
- $quantity = 0;
62
-
63
  foreach ($cart_items as $cart_item) {
64
  $product = isset($cart_item['data']) ? $cart_item['data'] : array();
65
  if(Helper::isCartItemConsideredForCalculation(true, $cart_item, $type)){
66
  if (self::$filter->match($product, $type, $comparision_method, $comparision_value, $options)) {
67
  if ($type != 'products') {
68
  $quantity += (int)$cart_item['quantity'];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
69
  }
70
  }
71
  }
72
  }
 
 
73
  foreach ($cart_items as $item) {
74
  $product = isset($item['data']) ? $item['data'] : array();
75
  if(Helper::isCartItemConsideredForCalculation(true, $item, $type)){
76
  if (self::$filter->match($product, $type, $comparision_method, $comparision_value, $options)) {
77
- if($type == 'products'){
78
- $quantity = 0;
79
- $quantity = (int)$item['quantity'];
80
- $product_parant_id = Woocommerce::getProductParentId($product);
81
- if(!empty($product_parant_id)){
82
- $quantity = $this->getChildVariantCountInCart($options, $product_parant_id, $quantity, $cart_items);
83
- }
84
  }
85
  switch ($comparision_operator) {
86
  case 'less_than':
87
  if ($quantity < $comparision_quantity) {
88
- return true;
 
 
89
  }
90
  break;
91
  case 'greater_than_or_equal':
92
  if ($quantity >= $comparision_quantity) {
93
- return true;
 
 
94
  }
95
  break;
96
  case 'greater_than':
97
  if ($quantity > $comparision_quantity) {
98
- return true;
 
 
99
  }
100
  break;
101
  default:
102
  case 'less_than_or_equal':
103
  if ($quantity <= $comparision_quantity) {
104
- return true;
 
 
105
  }
106
  break;
107
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
108
  }
109
  }
110
  }
 
 
 
 
 
 
 
111
  return false;
112
  }
113
 
@@ -228,4 +302,110 @@ abstract class Base
228
  return $quantity;
229
  }
230
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
231
  }
58
  } elseif (is_array($cart)) {
59
  $cart_items = $cart;
60
  }
61
+ $quantity = $not_in_list_quantity = 0;
 
62
  foreach ($cart_items as $cart_item) {
63
  $product = isset($cart_item['data']) ? $cart_item['data'] : array();
64
  if(Helper::isCartItemConsideredForCalculation(true, $cart_item, $type)){
65
  if (self::$filter->match($product, $type, $comparision_method, $comparision_value, $options)) {
66
  if ($type != 'products') {
67
  $quantity += (int)$cart_item['quantity'];
68
+ }else{
69
+ if($comparision_method == 'not_in_list'){
70
+ continue;
71
+ }
72
+ $quantity += (int)$cart_item['quantity'];
73
+ /*$quantity = (int)$item['quantity'];
74
+ $product_parant_id = Woocommerce::getProductParentId($product);
75
+ if(!empty($product_parant_id)){
76
+ $quantity = $this->getChildVariantCountInCart($options, $product_parant_id, $quantity, $cart_items);
77
+ }*/
78
+ }
79
+ }else{
80
+ $not_in_list_product = $this->findNotInListProduct($product, $cart_item, $comparision_value, $type, $options);
81
+ if($comparision_method == 'not_in_list' && $not_in_list_product){
82
+ if ($type != 'products') {
83
+ $not_in_list_quantity += (int)$cart_item['quantity'];
84
+ }else{
85
+ $not_in_list_quantity += (int)$cart_item['quantity'];
86
+ }
87
  }
88
  }
89
  }
90
  }
91
+ $cart_in_list = array();
92
+ $cart_not_in_list = array();
93
  foreach ($cart_items as $item) {
94
  $product = isset($item['data']) ? $item['data'] : array();
95
  if(Helper::isCartItemConsideredForCalculation(true, $item, $type)){
96
  if (self::$filter->match($product, $type, $comparision_method, $comparision_value, $options)) {
97
+ if($comparision_method == 'not_in_list'){
98
+ $cart_in_list[] = 'yes';
99
+ continue;
 
 
 
 
100
  }
101
  switch ($comparision_operator) {
102
  case 'less_than':
103
  if ($quantity < $comparision_quantity) {
104
+ $cart_in_list[] = 'yes';
105
+ }else{
106
+ $cart_in_list[] = 'no';
107
  }
108
  break;
109
  case 'greater_than_or_equal':
110
  if ($quantity >= $comparision_quantity) {
111
+ $cart_in_list[] = 'yes';
112
+ }else{
113
+ $cart_in_list[] = 'no';
114
  }
115
  break;
116
  case 'greater_than':
117
  if ($quantity > $comparision_quantity) {
118
+ $cart_in_list[] = 'yes';
119
+ }else{
120
+ $cart_in_list[] = 'no';
121
  }
122
  break;
123
  default:
124
  case 'less_than_or_equal':
125
  if ($quantity <= $comparision_quantity) {
126
+ $cart_in_list[] = 'yes';
127
+ }else{
128
+ $cart_in_list[] = 'no';
129
  }
130
  break;
131
  }
132
+ }else{
133
+ $not_in_list_product = $this->findNotInListProduct($product, $item, $comparision_value, $type, $options);
134
+ if($comparision_method == 'not_in_list' && $not_in_list_product){
135
+ /* if($type == 'products'){
136
+ $not_in_list_quantity = 0;
137
+ $not_in_list_quantity = (int)$item['quantity'];
138
+ $product_parant_id = Woocommerce::getProductParentId($product);
139
+ if(!empty($product_parant_id)){
140
+ $not_in_list_quantity = $this->getChildVariantCountInCart($options, $product_parant_id, $not_in_list_quantity, $cart_items);
141
+ }
142
+ }*/
143
+ switch ($comparision_operator) {
144
+ case 'less_than':
145
+ if ($not_in_list_quantity < $comparision_quantity) {
146
+ $cart_not_in_list[] = 'no';
147
+ }else{
148
+ $cart_not_in_list[] = 'yes';
149
+ }
150
+ break;
151
+ case 'greater_than_or_equal':
152
+ if ($not_in_list_quantity >= $comparision_quantity) {
153
+ $cart_not_in_list[] = 'no';
154
+ }else{
155
+ $cart_not_in_list[] = 'yes';
156
+ }
157
+ break;
158
+ case 'greater_than':
159
+ if ($not_in_list_quantity > $comparision_quantity) {
160
+ $cart_not_in_list[] = 'no';
161
+ }else{
162
+ $cart_not_in_list[] = 'yes';
163
+ }
164
+ break;
165
+ default:
166
+ case 'less_than_or_equal':
167
+ if ($not_in_list_quantity <= $comparision_quantity) {
168
+ $cart_not_in_list[] = 'no';
169
+ }else{
170
+ $cart_not_in_list[] = 'yes';
171
+ }
172
+ break;
173
+ }
174
+ }
175
  }
176
  }
177
  }
178
+ if(!empty($cart_not_in_list) && in_array('no', $cart_not_in_list)){
179
+ return false;
180
+ }elseif (!empty($cart_in_list) && in_array('no', $cart_in_list)){
181
+ return false;
182
+ } else if((!empty($cart_in_list) && in_array('yes', $cart_in_list)) || (!empty($cart_not_in_list) && in_array('yes', $cart_not_in_list))){
183
+ return true;
184
+ }
185
  return false;
186
  }
187
 
302
  return $quantity;
303
  }
304
  }
305
+
306
+ /**
307
+ * Find product that in product not in list condition
308
+ *
309
+ * @param $product
310
+ * @param $cart_item
311
+ * @param $comparision_value
312
+ * @param $type
313
+ * @param $options
314
+ * @return bool
315
+ */
316
+ function findNotInListProduct($product, $cart_item, $comparision_value, $type, $options){
317
+ $filter_helper = new Filter();
318
+ $product_id = $product->get_id();
319
+ $not_in_list_product = false;
320
+ switch ($type){
321
+ case 'product_category':
322
+ $categories = Woocommerce::getProductCategories($product);
323
+ $not_in_list_product = count(array_intersect($categories, $comparision_value)) > 0;
324
+ break;
325
+ case 'products':
326
+ $apply_discount_to_child = apply_filters('advanced_woo_discount_rules_apply_discount_to_child', true, $product);
327
+ if ($apply_discount_to_child) {
328
+ if (isset($options->product_variants) && !empty($options->product_variants) && is_array($options->product_variants)) {
329
+ $comparision_value = Helper::combineProductArrays($comparision_value, $options->product_variants);
330
+ }
331
+ }
332
+ $not_in_list_product = in_array($product_id, $comparision_value);
333
+ break;
334
+ case 'product_attributes':
335
+ $attrs = Woocommerce::getProductAttributes($product);
336
+ $attr_ids = array();
337
+ if (Woocommerce::productTypeIs($product, 'variation')) {
338
+ if (count(array_filter($attrs)) < count($attrs)) {
339
+ if (isset($cart_item['variation'])) {
340
+ $attrs = array();
341
+ foreach ($cart_item['variation'] as $attribute_name => $value) {
342
+ $attrs[str_replace('attribute_', '', $attribute_name)] = $value;
343
+ }
344
+ }
345
+ }
346
+ $product_variation = Woocommerce::getProduct(Woocommerce::getProductParentId($product));
347
+ foreach ($attrs as $taxonomy => $value) {
348
+ if ($value) {
349
+ $term_obj = get_term_by('slug', $value, $taxonomy);
350
+ if (!is_wp_error($term_obj) && $term_obj && $term_obj->name) {
351
+ $attr_ids = array_merge($attr_ids, (array)($term_obj->term_id));
352
+ }
353
+ } else {
354
+ $attrs_variation = Woocommerce::getProductAttributes($product_variation);
355
+ foreach ($attrs_variation as $attr) {
356
+ if ($taxonomy == Woocommerce::getAttributeName($attr))
357
+ $attr_ids = array_merge($attr_ids, Woocommerce::getAttributeOption($attr));
358
+ }
359
+ }
360
+ }
361
+ if(!empty($product_variation)){
362
+ $attributes_parent = Woocommerce::getProductAttributes($product_variation);
363
+ foreach ($attributes_parent as $attributes){
364
+ if(!empty($attributes) && is_object($attributes)){
365
+ $variation = Woocommerce::getAttributeVariation($attributes);
366
+ if(!(int)$variation){
367
+ $options = Woocommerce::getAttributeOption($attributes);
368
+
369
+ if(!empty($options) && is_array($options)){
370
+ $attr_ids = array_merge($attr_ids, $options);
371
+ }
372
+ }
373
+ } else {
374
+ $options = Woocommerce::getAttributeOption($attributes);
375
+ if(!empty($options) && is_array($options)){
376
+ $attr_ids = array_merge($attr_ids, $options);
377
+ }
378
+ }
379
+ }
380
+ }
381
+ } else {
382
+ foreach ($attrs as $attr) {
383
+ $attr_ids = array_merge($attr_ids, Woocommerce::getAttributeOption($attr));
384
+ }
385
+ }
386
+ $attr_ids = array_unique($attr_ids);
387
+ $not_in_list_product = count(array_intersect($attr_ids, $comparision_value)) > 0;
388
+ break;
389
+ case 'product_sku':
390
+ $product_sku = Woocommerce::getProductSku($product);
391
+ $not_in_list_product = in_array($product_sku, $comparision_value);
392
+ break;
393
+ case 'product_tags':
394
+ $tag_ids = Woocommerce::getProductTags($product);
395
+ $not_in_list_product = count(array_intersect($tag_ids, $comparision_value)) > 0;
396
+ break;
397
+ default:
398
+ ///for custom taxonomy
399
+ if(isset($options->custom_taxonomy) && $options->custom_taxonomy == $type){
400
+ if(in_array($type, array_keys(Woocommerce::getCustomProductTaxonomies()))){
401
+ $product_parent = Woocommerce::getProductParentId($product_id);
402
+ $product_id = !empty($product_parent) ? $product_parent : $product_id;
403
+ $term_ids = wp_get_post_terms($product_id, $type, array("fields" => "ids"));
404
+ $not_in_list_product = count(array_intersect($term_ids, $comparision_value)) > 0;
405
+ }
406
+ }
407
+ break;
408
+ }
409
+ return $not_in_list_product;
410
+ }
411
  }
v2/App/Controllers/Admin/Settings.php CHANGED
@@ -182,7 +182,12 @@ class Settings extends Base
182
  /**
183
  * Enqueue js
184
  */
185
- wp_enqueue_script('wdr-select2-js', self::$woocommerce_helper->getWooPluginUrl() . '/assets/js/select2/select2.full.min.js', array('jquery'));
 
 
 
 
 
186
  wp_enqueue_style('wdr-select2-js', self::$woocommerce_helper->getWooPluginUrl() . '/assets/css/select2.css');
187
  wp_enqueue_script( 'woocommerce_admin' );
188
  //To load woocommerce product select
@@ -191,7 +196,6 @@ class Settings extends Base
191
  wp_enqueue_script(WDR_SLUG . '-jquery-ui', WDR_PLUGIN_URL . 'Assets/Js/Jquery-ui/jquery-ui.min.js', array('jquery', 'jquery'));
192
  wp_enqueue_script(WDR_SLUG . '-datetimepickerjs', WDR_PLUGIN_URL . 'Assets/Js/jquery.datetimepicker.full.min.js', array('jquery', 'jquery'));
193
  wp_enqueue_script(WDR_SLUG . '-moment', WDR_PLUGIN_URL . 'Assets/Js/moment.min.js', array('jquery', 'jquery'));
194
- wp_enqueue_script(WDR_SLUG . '-rulebuilder', WDR_PLUGIN_URL . 'Assets/Js/rulebuilder.js', array('jquery', 'wdr-select2-js', WDR_SLUG . '-datetimepickerjs'));
195
  wp_register_script(WDR_SLUG . '-admin', WDR_PLUGIN_URL . 'Assets/Js/admin_script.js');
196
  wp_enqueue_script(WDR_SLUG . '-admin');
197
  wp_enqueue_script(WDR_SLUG . '-dragndraop-js', WDR_PLUGIN_URL . 'Assets/Js/jquery.dragtable.js');
@@ -459,6 +463,10 @@ class Settings extends Base
459
  'rebuild_on_sale_list_processing_text' => __('Processing please wait..', WDR_TEXT_DOMAIN),
460
  'rebuild_on_sale_list_processed_text' => __('Rebuild index processed', WDR_TEXT_DOMAIN),
461
  'rebuild_on_sale_list_error_please_select_rule' => __('Please select the rules to build index', WDR_TEXT_DOMAIN),
 
 
 
 
462
  );
463
  }
464
  }
182
  /**
183
  * Enqueue js
184
  */
185
+ if(apply_filters('advanced_woo_discount_rules_load_select_js', true)){
186
+ wp_enqueue_script('wdr-select2-js', self::$woocommerce_helper->getWooPluginUrl() . '/assets/js/select2/select2.full.min.js', array('jquery'));
187
+ wp_enqueue_script(WDR_SLUG . '-rulebuilder', WDR_PLUGIN_URL . 'Assets/Js/rulebuilder.js', array('jquery', 'wdr-select2-js', WDR_SLUG . '-datetimepickerjs'));
188
+ } else {
189
+ wp_enqueue_script(WDR_SLUG . '-rulebuilder', WDR_PLUGIN_URL . 'Assets/Js/rulebuilder.js', array('jquery', WDR_SLUG . '-datetimepickerjs'));
190
+ }
191
  wp_enqueue_style('wdr-select2-js', self::$woocommerce_helper->getWooPluginUrl() . '/assets/css/select2.css');
192
  wp_enqueue_script( 'woocommerce_admin' );
193
  //To load woocommerce product select
196
  wp_enqueue_script(WDR_SLUG . '-jquery-ui', WDR_PLUGIN_URL . 'Assets/Js/Jquery-ui/jquery-ui.min.js', array('jquery', 'jquery'));
197
  wp_enqueue_script(WDR_SLUG . '-datetimepickerjs', WDR_PLUGIN_URL . 'Assets/Js/jquery.datetimepicker.full.min.js', array('jquery', 'jquery'));
198
  wp_enqueue_script(WDR_SLUG . '-moment', WDR_PLUGIN_URL . 'Assets/Js/moment.min.js', array('jquery', 'jquery'));
 
199
  wp_register_script(WDR_SLUG . '-admin', WDR_PLUGIN_URL . 'Assets/Js/admin_script.js');
200
  wp_enqueue_script(WDR_SLUG . '-admin');
201
  wp_enqueue_script(WDR_SLUG . '-dragndraop-js', WDR_PLUGIN_URL . 'Assets/Js/jquery.dragtable.js');
463
  'rebuild_on_sale_list_processing_text' => __('Processing please wait..', WDR_TEXT_DOMAIN),
464
  'rebuild_on_sale_list_processed_text' => __('Rebuild index processed', WDR_TEXT_DOMAIN),
465
  'rebuild_on_sale_list_error_please_select_rule' => __('Please select the rules to build index', WDR_TEXT_DOMAIN),
466
+ 'invalid_file_type' => __("Invalid File. Upload : <b style='color:red;'>.csv</b> File. </br>", WDR_TEXT_DOMAIN),
467
+ 'invalid_rule_limit' => __("<b>This rule is not running currently:</b> Rule reached maximum usage limit", WDR_TEXT_DOMAIN),
468
+ 'invalid_rule_limit_with_date_future' => __("<b>This rule is not running currently:</b> Start date and time is set in the future date", WDR_TEXT_DOMAIN),
469
+ 'invalid_rule_limit_with_date_expire' => __("<b>This rule is not running currently:</b> Validity expired", WDR_TEXT_DOMAIN),
470
  );
471
  }
472
  }
v2/App/Controllers/Admin/Tabs/ImportExport.php CHANGED
@@ -16,7 +16,7 @@ class ImportExport extends Base
16
  public function __construct()
17
  {
18
  parent::__construct();
19
- $this->title = __('Export', WDR_TEXT_DOMAIN);
20
  }
21
 
22
  /**
16
  public function __construct()
17
  {
18
  parent::__construct();
19
+ $this->title = __('Import/Export', WDR_TEXT_DOMAIN);
20
  }
21
 
22
  /**
v2/App/Controllers/Admin/Tabs/Reports/Base.php CHANGED
@@ -16,11 +16,6 @@ abstract class Base extends BaseController
16
  parent::__construct();
17
  }
18
 
19
- /**
20
- * @return string
21
- */
22
- abstract function get_title();
23
-
24
  /**
25
  * @return string
26
  */
16
  parent::__construct();
17
  }
18
 
 
 
 
 
 
19
  /**
20
  * @return string
21
  */
v2/App/Controllers/Admin/Tabs/Reports/RuleAmount.php CHANGED
@@ -10,12 +10,8 @@ if ( ! defined( 'ABSPATH' ) ) {
10
 
11
  class RuleAmount extends Base {
12
 
13
- public function get_title() {
14
- return __( 'Rule amount data without cart adjustments', WDR_TEXT_DOMAIN );
15
- }
16
-
17
  public function get_subtitle() {
18
- return __( 'TOP 5', WDR_TEXT_DOMAIN );
19
  }
20
 
21
  public function get_type() {
@@ -59,7 +55,6 @@ class RuleAmount extends Base {
59
 
60
  protected function prepare_data( $columns, $rows ) {
61
  $ret = array(
62
- 'title' => $this->get_title(),
63
  'subtitle' => $this->get_subtitle(),
64
  'type' => $this->get_type(),
65
  'columns' => $columns,
10
 
11
  class RuleAmount extends Base {
12
 
 
 
 
 
13
  public function get_subtitle() {
14
+ return __( 'Amount shown in default store currency', WDR_TEXT_DOMAIN );
15
  }
16
 
17
  public function get_type() {
55
 
56
  protected function prepare_data( $columns, $rows ) {
57
  $ret = array(
 
58
  'subtitle' => $this->get_subtitle(),
59
  'type' => $this->get_type(),
60
  'columns' => $columns,
v2/App/Controllers/Admin/Tabs/Reports/RuleAmountWithCartDiscount.php CHANGED
@@ -6,17 +6,13 @@ if ( ! defined( 'ABSPATH' ) ) {
6
  }
7
 
8
  class RuleAmountWithCartDiscount extends RuleAmount {
9
- public function get_title() {
10
- return __( 'Rule amount data with cart discounts', WDR_TEXT_DOMAIN );
11
- }
12
 
13
- public function get_subtitle() {
14
- return __( 'TOP 5', WDR_TEXT_DOMAIN );
15
- }
16
 
17
  protected function prepare_params( $params ) {
18
  $params['include_cart_discount'] = true;
19
-
20
  return $params;
21
  }
22
  }
6
  }
7
 
8
  class RuleAmountWithCartDiscount extends RuleAmount {
 
 
 
9
 
10
+ public function get_subtitle() {
11
+ return __( 'Amount shown in default store currency', WDR_TEXT_DOMAIN );
12
+ }
13
 
14
  protected function prepare_params( $params ) {
15
  $params['include_cart_discount'] = true;
 
16
  return $params;
17
  }
18
  }
v2/App/Controllers/Admin/Tabs/Reports/RuleNameDiscount.php ADDED
@@ -0,0 +1,106 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Wdr\App\Controllers\Admin\Tabs\Reports;
3
+
4
+ use Wdr\App\Models\DBTable;
5
+
6
+ if ( ! defined( 'ABSPATH' ) ) {
7
+ exit; // Exit if accessed directly
8
+ }
9
+
10
+ class RuleNameDiscount extends Base {
11
+
12
+ protected $rule_obj;
13
+
14
+ public function __construct($rule)
15
+ {
16
+ $this->rule_obj = $rule;
17
+ }
18
+
19
+ public function get_title() {
20
+ return $this->rule_obj->getTitle();
21
+ }
22
+
23
+ public function get_subtitle() {
24
+ return __( 'Amount shown in default store currency', WDR_TEXT_DOMAIN );
25
+ }
26
+
27
+ public function get_type() {
28
+ return 'line';
29
+ }
30
+
31
+ public function get_data( $params ) {
32
+ $rule_id = $params['type'];
33
+
34
+ $params = $this->prepare_params( $params );
35
+
36
+ $rule_amount_stats = $this->load_raw_data( $params, $rule_id);
37
+
38
+ $rules = array_unique( array_column( $rule_amount_stats, 'title' ) );
39
+ $columns = array_merge( array( __( 'Date', WDR_TEXT_DOMAIN ) ), $rules );
40
+
41
+ $rows = array();
42
+ $dates = $this->get_dates( $params['from'], $params['to'] );
43
+ foreach ( $dates as $date ) {
44
+ $rows[ $date ] = array_fill( 0, count( $columns ), 0.0 );
45
+ $rows[ $date ][0] = $date;
46
+
47
+ }
48
+ foreach ( $rule_amount_stats as $rule_amount_item ) {
49
+ $date = date( 'Y-m-d', strtotime( $rule_amount_item->date_rep ) );
50
+ if ( ! isset( $rows[ $date ] ) ) {
51
+ continue;
52
+ }
53
+
54
+ $column_key = array_search( $rule_amount_item->title, $columns );
55
+ if ( false === $column_key ) {
56
+ continue;
57
+ }
58
+
59
+ $rows[ $date ][ $column_key ] = (float) $rule_amount_item->value;
60
+ }
61
+
62
+ $ret = $this->prepare_data( $columns, $rows );
63
+
64
+ return $ret;
65
+ }
66
+
67
+ protected function prepare_data( $columns, $rows ) {
68
+ $ret = array(
69
+ 'title' => $this->get_title(),
70
+ 'subtitle' => $this->get_subtitle(),
71
+ 'type' => $this->get_type(),
72
+ 'columns' => $columns,
73
+ 'rows' => $rows,
74
+ );
75
+ return $ret;
76
+ }
77
+
78
+ protected function load_raw_data( $params, $rule_id = 0 ) {
79
+ $rule_amount_stats = DBTable::get_rule_rows_summary( $params, $rule_id );
80
+ if ( empty( $rule_amount_stats ) ) {
81
+ $rule_amount_stats = array();
82
+ }
83
+ return $rule_amount_stats;
84
+ }
85
+
86
+ protected function prepare_params( $params ) {
87
+ return array(
88
+ 'from' => $params['from'],
89
+ 'to' => $params['to'],
90
+ 'limit' => 5,
91
+ 'include_amount' => true,
92
+ 'include_cart_discount' => true,
93
+ );
94
+ }
95
+
96
+ protected function get_dates( $from, $to ) {
97
+ $ret = array();
98
+
99
+ $to = strtotime( $to );
100
+ for ( $current = strtotime( $from ); $current <= $to; $current += 60 * 60 * 24 ) {
101
+ $ret[] = date( 'Y-m-d', $current );
102
+ }
103
+
104
+ return $ret;
105
+ }
106
+ }
v2/App/Controllers/Admin/Tabs/Statistics.php CHANGED
@@ -13,6 +13,8 @@ class Statistics extends Base
13
  public $priority = 30;
14
  protected $tab = 'statistics';
15
  protected $reports;
 
 
16
 
17
  /**
18
  * GeneralSettings constructor.
@@ -21,19 +23,34 @@ class Statistics extends Base
21
  {
22
  parent::__construct();
23
  $this->title = __('Reports', WDR_TEXT_DOMAIN);
24
-
 
 
 
 
 
 
 
 
 
 
 
 
25
  $this->reports = array(
26
- 'rule_amount' => array(
27
- 'handler' => new Reports\RuleAmount(),
28
- 'label' => __( 'Rule amount', WDR_TEXT_DOMAIN ),
29
- 'group' => __( 'Rule', WDR_TEXT_DOMAIN ),
30
- ),
31
  'rule_amount_extra' => array(
32
  'handler' => new Reports\RuleAmountWithCartDiscount(),
33
- 'label' => __( 'Rule amount with cart discount', WDR_TEXT_DOMAIN ),
 
 
 
 
 
 
34
  'group' => __( 'Rule', WDR_TEXT_DOMAIN ),
 
35
  ),
36
  );
 
37
  }
38
 
39
  /**
13
  public $priority = 30;
14
  protected $tab = 'statistics';
15
  protected $reports;
16
+ protected $rule_details = array();
17
+
18
 
19
  /**
20
  * GeneralSettings constructor.
23
  {
24
  parent::__construct();
25
  $this->title = __('Reports', WDR_TEXT_DOMAIN);
26
+ $rule_helper = new Rule();
27
+ $available_conditions = $this->getAvailableConditions();
28
+ $rules = $rule_helper->getAllRules($available_conditions);
29
+ foreach ($rules as $rule){
30
+ $rule_id = $rule->getId();
31
+ $rule_title = $rule->getTitle();
32
+ $this->rule_details[$rule_id] = array(
33
+ 'handler' => new Reports\RuleNameDiscount($rule),
34
+ 'label' => __( $rule_title , WDR_TEXT_DOMAIN ),
35
+ 'group' => __( 'Rule Name', WDR_TEXT_DOMAIN ),
36
+ 'rule_id' => $rule_id,
37
+ );
38
+ }
39
  $this->reports = array(
 
 
 
 
 
40
  'rule_amount_extra' => array(
41
  'handler' => new Reports\RuleAmountWithCartDiscount(),
42
+ 'label' => __( 'All Rules', WDR_TEXT_DOMAIN ),
43
+ 'group' => __( 'Rule', WDR_TEXT_DOMAIN ),
44
+ 'rule_id' => 0,
45
+ ),
46
+ 'rule_amount' => array(
47
+ 'handler' => new Reports\RuleAmount(),
48
+ 'label' => __( 'All Rules (except cart adjustment type)', WDR_TEXT_DOMAIN ),
49
  'group' => __( 'Rule', WDR_TEXT_DOMAIN ),
50
+ 'rule_id' => 0,
51
  ),
52
  );
53
+ $this->reports = $this->reports+$this->rule_details;
54
  }
55
 
56
  /**
v2/App/Controllers/Configuration.php CHANGED
@@ -40,6 +40,7 @@ class Configuration
40
  'table_title_column' => 1,//0,1
41
  'table_discount_column' => 1,//0,1
42
  'table_range_column' => 1,//0,1
 
43
  'suppress_other_discount_plugins' => 0,//1,0
44
  'show_sale_badge_only_on_condition_passed' => 0,//1,0
45
  'position_to_show_bulk_table' => 'woocommerce_before_add_to_cart_form',//woocommerce_product_meta_end,woocommerce_product_meta_start,woocommerce_after_add_to_cart_form,woocommerce_before_add_to_cart_form,woocommerce_after_single_product,woocommerce_before_single_product,woocommerce_after_single_product_summary,woocommerce_before_single_product_summary
40
  'table_title_column' => 1,//0,1
41
  'table_discount_column' => 1,//0,1
42
  'table_range_column' => 1,//0,1
43
+ 'refresh_order_review' => 0,//1,0
44
  'suppress_other_discount_plugins' => 0,//1,0
45
  'show_sale_badge_only_on_condition_passed' => 0,//1,0
46
  'position_to_show_bulk_table' => 'woocommerce_before_add_to_cart_form',//woocommerce_product_meta_end,woocommerce_product_meta_start,woocommerce_after_add_to_cart_form,woocommerce_before_add_to_cart_form,woocommerce_after_single_product,woocommerce_before_single_product,woocommerce_after_single_product_summary,woocommerce_before_single_product_summary
v2/App/Controllers/DiscountCalculator.php CHANGED
@@ -511,6 +511,8 @@ class DiscountCalculator extends Base
511
  $price_display_condition = self::$config->getConfig('show_strikeout_when', 'show_when_matched');
512
  $apply_discount_subsequently = false;
513
  $price_as_cart_discount = array();
 
 
514
  foreach (self::$rules as $rule) {
515
  $discount_type = $rule->getRuleDiscountType();
516
  if (!$rule->isEnabled()) {
@@ -564,57 +566,65 @@ class DiscountCalculator extends Base
564
  self::$total_discounts[$rule_id][$product_id]['product_price'] = $product_price;
565
  }
566
  }
567
- if(!empty($cart_item)) {
568
  $this_apply_as_cart_rule = false;
569
  switch ($discount_type) {
570
  case 'wdr_simple_discount':
571
  if ($simple_discount = $rule->getProductAdjustments()) {
572
  if (isset($simple_discount->apply_as_cart_rule) && !empty($simple_discount->apply_as_cart_rule)) {
573
  $this_apply_as_cart_rule = true;
574
- $price_as_cart_discount[$rule_id][$product_id] = array(
575
- 'discount_type' => 'wdr_simple_discount',
576
- 'discount_label' => $simple_discount->cart_label,
577
- 'discount_value' => $simple_discount->value,
578
- 'discounted_price' => $cart_discounted_price,
579
- 'rule_name' => $rule->getTitle(),
580
- 'cart_item_key' => isset($cart_item['key']) ? $cart_item['key'] : '',
581
- 'product_id' => isset($cart_item['product_id']) ? $cart_item['product_id'] : '',
582
- );
583
- $discounts[$rule_id] = $discounted_price;
 
 
 
584
  }
585
  }
586
  break;
587
  case 'wdr_cart_discount':
588
  if ($cart_discount = $rule->getCartAdjustments()) {
589
  $this_apply_as_cart_rule = true;
590
- $price_as_cart_discount[$rule_id][$product_id] = array(
591
- 'discount_type' => 'wdr_cart_discount',
592
- 'apply_type' => $cart_discount->type,
593
- 'discount_label' => $discount_label,
594
- 'discount_value' => $cart_discount->value,
595
- 'discounted_price' => $discounted_price,
596
- 'rule_name' => $rule->getTitle(),
597
- 'cart_item_key' => isset($cart_item['key']) ? $cart_item['key'] : '',
598
- 'product_id' => isset($cart_item['product_id']) ? $cart_item['product_id'] : '',
599
- 'rule_id' => $rule_id,
600
- );
601
- $discounts[$rule_id] = (isset($discounted_price_array[0]['discount_fee']) && !empty($discounted_price_array[0]['discount_fee'])) ? $discounted_price_array[0]['discount_fee'] : 0;
 
 
602
  }
603
  break;
604
  case 'wdr_bulk_discount':
605
  if ($bulk_discount = $rule->getBulkAdjustments()) {
606
  if (isset($bulk_discount->apply_as_cart_rule) && !empty($bulk_discount->apply_as_cart_rule)) {
607
  $this_apply_as_cart_rule = true;
608
- $price_as_cart_discount[$rule_id][$product_id] = array(
609
- 'discount_type' => 'wdr_bulk_discount',
610
- 'discount_label' => $bulk_discount->cart_label,
611
- 'discount_value' => 0,
612
- 'discounted_price' => $cart_discounted_price,
613
- 'rule_name' => $rule->getTitle(),
614
- 'cart_item_key' => isset($cart_item['key']) ? $cart_item['key'] : '',
615
- 'product_id' => isset($cart_item['product_id']) ? $cart_item['product_id'] : '',
616
- );
617
- $discounts[$rule_id] = $discounted_price;
 
 
 
618
  }
619
  }
620
  break;
@@ -627,10 +637,11 @@ class DiscountCalculator extends Base
627
  }
628
  break;
629
  }
 
630
  if( $this_apply_as_cart_rule === true){
631
  continue;
632
  }
633
- }
634
  if($discount_type === 'wdr_cart_discount'){
635
  continue;
636
  }
@@ -682,6 +693,7 @@ class DiscountCalculator extends Base
682
  'initial_price_with_tax' => $this->mayHaveTax($product, $product_price),
683
  'discounted_price_with_tax' => $this->mayHaveTax($product, $discounted_price),
684
  'total_discount_details' => self::$total_discounts['ajax_product'],
 
685
  );
686
  }
687
  if (empty($discounts)) {
@@ -721,6 +733,7 @@ class DiscountCalculator extends Base
721
  if ($discounted_price < 0 ) {
722
  $discounted_price = 0;
723
  }
 
724
  $discount_prices = array(
725
  'initial_price' => $product_price,
726
  'discounted_price' => $discounted_price,
@@ -728,6 +741,7 @@ class DiscountCalculator extends Base
728
  'discounted_price_with_tax' => $this->mayHaveTax($product, $discounted_price),
729
  'total_discount_details' => self::$total_discounts,
730
  'cart_discount_details' => $this->getCartDiscountPrices($cart, true),
 
731
  );
732
  return apply_filters('advanced_woo_discount_rules_discount_prices_of_product', $discount_prices, $product, $quantity, $cart_item);
733
  }
@@ -796,19 +810,30 @@ class DiscountCalculator extends Base
796
  function getCartDiscountPrices($cart, $discount_calculation_call = false)
797
  {
798
  $cart_discount_arr = array();
 
799
  $apply_as_cart_fee_details = self::$price_discount_apply_as_cart_discount;
800
  if (!empty($apply_as_cart_fee_details) && !empty($cart)) {
801
  foreach ($apply_as_cart_fee_details as $rule_id => $product_id){
802
  $discount_value = 0;
 
803
  foreach ($product_id as $detail) {
804
  $discount_value += isset($detail['discounted_price']) ? $detail['discounted_price'] : 0 ;
805
  $label = (isset($detail['discount_label']) && !empty($detail['discount_label'])) ? $detail['discount_label'] : $detail['rule_name'];
806
  $value = (isset($detail['discount_value']) && !empty($detail['discount_value'])) ? $detail['discount_value'] : 0;
 
 
 
 
 
 
 
807
  }
808
  self::$cart_adjustments[$rule_id]['cart_discount'] = isset($value) ? $value : '';
809
  self::$cart_adjustments[$rule_id]['cart_shipping'] = 'no';
810
  self::$cart_adjustments[$rule_id]['cart_discount_label'] = isset($label) ? $label : '';
811
  self::$cart_adjustments[$rule_id]['cart_discount_price'] = $discount_value;
 
 
812
  }
813
  array_push($cart_discount_arr, $apply_as_cart_fee_details);
814
  if ($discount_calculation_call) {
511
  $price_display_condition = self::$config->getConfig('show_strikeout_when', 'show_when_matched');
512
  $apply_discount_subsequently = false;
513
  $price_as_cart_discount = array();
514
+ $this_apply_as_cart_rule = false;
515
+ $show_stike_out_depends_cart_rule = array();
516
  foreach (self::$rules as $rule) {
517
  $discount_type = $rule->getRuleDiscountType();
518
  if (!$rule->isEnabled()) {
566
  self::$total_discounts[$rule_id][$product_id]['product_price'] = $product_price;
567
  }
568
  }
569
+ //if(!empty($cart_item)) {
570
  $this_apply_as_cart_rule = false;
571
  switch ($discount_type) {
572
  case 'wdr_simple_discount':
573
  if ($simple_discount = $rule->getProductAdjustments()) {
574
  if (isset($simple_discount->apply_as_cart_rule) && !empty($simple_discount->apply_as_cart_rule)) {
575
  $this_apply_as_cart_rule = true;
576
+ if(!empty($cart_item)) {
577
+ $price_as_cart_discount[$rule_id][$product_id] = array(
578
+ 'discount_type' => 'wdr_simple_discount',
579
+ 'discount_label' => $simple_discount->cart_label,
580
+ 'discount_value' => $simple_discount->value,
581
+ 'discounted_price' => $cart_discounted_price,
582
+ 'rule_name' => $rule->getTitle(),
583
+ 'cart_item_key' => isset($cart_item['key']) ? $cart_item['key'] : '',
584
+ 'product_id' => self::$woocommerce_helper->getProductId($cart_item['data']),
585
+ 'rule_id' => $rule_id,
586
+ );
587
+ $discounts[$rule_id] = $discounted_price;
588
+ }
589
  }
590
  }
591
  break;
592
  case 'wdr_cart_discount':
593
  if ($cart_discount = $rule->getCartAdjustments()) {
594
  $this_apply_as_cart_rule = true;
595
+ if(!empty($cart_item)) {
596
+ $price_as_cart_discount[$rule_id][$product_id] = array(
597
+ 'discount_type' => 'wdr_cart_discount',
598
+ 'apply_type' => $cart_discount->type,
599
+ 'discount_label' => $discount_label,
600
+ 'discount_value' => $cart_discount->value,
601
+ 'discounted_price' => $discounted_price,
602
+ 'rule_name' => $rule->getTitle(),
603
+ 'cart_item_key' => isset($cart_item['key']) ? $cart_item['key'] : '',
604
+ 'product_id' => self::$woocommerce_helper->getProductId($cart_item['data']),
605
+ 'rule_id' => $rule_id,
606
+ );
607
+ $discounts[$rule_id] = (isset($discounted_price_array[0]['discount_fee']) && !empty($discounted_price_array[0]['discount_fee'])) ? $discounted_price_array[0]['discount_fee'] : 0;
608
+ }
609
  }
610
  break;
611
  case 'wdr_bulk_discount':
612
  if ($bulk_discount = $rule->getBulkAdjustments()) {
613
  if (isset($bulk_discount->apply_as_cart_rule) && !empty($bulk_discount->apply_as_cart_rule)) {
614
  $this_apply_as_cart_rule = true;
615
+ if(!empty($cart_item)) {
616
+ $price_as_cart_discount[$rule_id][$product_id] = array(
617
+ 'discount_type' => 'wdr_bulk_discount',
618
+ 'discount_label' => $bulk_discount->cart_label,
619
+ 'discount_value' => 0,
620
+ 'discounted_price' => $cart_discounted_price,
621
+ 'rule_name' => $rule->getTitle(),
622
+ 'cart_item_key' => isset($cart_item['key']) ? $cart_item['key'] : '',
623
+ 'product_id' => self::$woocommerce_helper->getProductId($cart_item['data']),
624
+ 'rule_id' => $rule_id,
625
+ );
626
+ $discounts[$rule_id] = $discounted_price;
627
+ }
628
  }
629
  }
630
  break;
637
  }
638
  break;
639
  }
640
+ $show_stike_out_depends_cart_rule[] = ($this_apply_as_cart_rule === true) ? 'yes' : 'no';
641
  if( $this_apply_as_cart_rule === true){
642
  continue;
643
  }
644
+ //}
645
  if($discount_type === 'wdr_cart_discount'){
646
  continue;
647
  }
693
  'initial_price_with_tax' => $this->mayHaveTax($product, $product_price),
694
  'discounted_price_with_tax' => $this->mayHaveTax($product, $discounted_price),
695
  'total_discount_details' => self::$total_discounts['ajax_product'],
696
+ 'apply_as_cart_rule' => $show_stike_out_depends_cart_rule,
697
  );
698
  }
699
  if (empty($discounts)) {
733
  if ($discounted_price < 0 ) {
734
  $discounted_price = 0;
735
  }
736
+
737
  $discount_prices = array(
738
  'initial_price' => $product_price,
739
  'discounted_price' => $discounted_price,
741
  'discounted_price_with_tax' => $this->mayHaveTax($product, $discounted_price),
742
  'total_discount_details' => self::$total_discounts,
743
  'cart_discount_details' => $this->getCartDiscountPrices($cart, true),
744
+ 'apply_as_cart_rule' => $show_stike_out_depends_cart_rule,
745
  );
746
  return apply_filters('advanced_woo_discount_rules_discount_prices_of_product', $discount_prices, $product, $quantity, $cart_item);
747
  }
810
  function getCartDiscountPrices($cart, $discount_calculation_call = false)
811
  {
812
  $cart_discount_arr = array();
813
+ $cart_discount_against_product = array();
814
  $apply_as_cart_fee_details = self::$price_discount_apply_as_cart_discount;
815
  if (!empty($apply_as_cart_fee_details) && !empty($cart)) {
816
  foreach ($apply_as_cart_fee_details as $rule_id => $product_id){
817
  $discount_value = 0;
818
+ $rule_applied_product_id = array();
819
  foreach ($product_id as $detail) {
820
  $discount_value += isset($detail['discounted_price']) ? $detail['discounted_price'] : 0 ;
821
  $label = (isset($detail['discount_label']) && !empty($detail['discount_label'])) ? $detail['discount_label'] : $detail['rule_name'];
822
  $value = (isset($detail['discount_value']) && !empty($detail['discount_value'])) ? $detail['discount_value'] : 0;
823
+ $product_id = isset($detail['product_id']) ? $detail['product_id'] : 0;
824
+ $rule_applied_product_id = array_merge($rule_applied_product_id, array($product_id));
825
+ $current_discounted_price = isset($detail['discounted_price']) ? $detail['discounted_price'] : 0 ;
826
+ $cart_discount_against_product[$product_id][$rule_id] = $current_discounted_price;
827
+ }
828
+ if(!empty($rule_applied_product_id)){
829
+ $rule_applied_product_id = array_unique($rule_applied_product_id);
830
  }
831
  self::$cart_adjustments[$rule_id]['cart_discount'] = isset($value) ? $value : '';
832
  self::$cart_adjustments[$rule_id]['cart_shipping'] = 'no';
833
  self::$cart_adjustments[$rule_id]['cart_discount_label'] = isset($label) ? $label : '';
834
  self::$cart_adjustments[$rule_id]['cart_discount_price'] = $discount_value;
835
+ self::$cart_adjustments[$rule_id]['cart_discount_product_price'] = $cart_discount_against_product;
836
+ self::$cart_adjustments[$rule_id]['applied_product_ids'] = $rule_applied_product_id;
837
  }
838
  array_push($cart_discount_arr, $apply_as_cart_fee_details);
839
  if ($discount_calculation_call) {
v2/App/Controllers/ManageDiscount.php CHANGED
@@ -49,6 +49,7 @@ class ManageDiscount extends Base
49
  $awdr_front_end_script = array(
50
  'ajaxurl' => admin_url('admin-ajax.php'),
51
  'enable_update_price_with_qty' => $ajax_update_price,
 
52
  'custom_target_simple_product' => apply_filters('advanced_woo_discount_rules_custom_target_for_simple_product_on_qty_update', ""),
53
  'custom_target_variable_product' => apply_filters('advanced_woo_discount_rules_custom_target_for_variable_product_on_qty_update', ""),
54
  'js_init_trigger' => apply_filters('advanced_woo_discount_rules_update_discount_price_init_trigger', ""),
@@ -220,6 +221,11 @@ class ManageDiscount extends Base
220
  $product_id = Woocommerce::getProductId($product);
221
  //Calculate the product price
222
  $prices = self::calculateInitialAndDiscountedPrice($product, $quantity, $is_cart = false, $ajax_price);
 
 
 
 
 
223
  if($ajax_price){
224
  $discount_details = (isset($prices['total_discount_details'])) ? $prices['total_discount_details'] : false;
225
  if($discount_details) {
@@ -841,6 +847,8 @@ class ManageDiscount extends Base
841
  if($disable_coupon_when_rule_applied == 'disable_rules'){
842
  $has_third_party_coupon = $this->isCartContainsAnyThirdPartyCoupon();
843
  if($has_third_party_coupon === true){
 
 
844
  $run_rule = false;
845
  }
846
  }
@@ -1023,6 +1031,68 @@ class ManageDiscount extends Base
1023
  {
1024
  $model = new DBTable();
1025
  $applied_rules = array();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1026
  if (!empty(self::$calculated_cart_item_discount)) {
1027
  foreach (self::$calculated_cart_item_discount as $cart_key => $discount) {
1028
  $product_id = isset($discount['product_id']) ? $discount['product_id'] : 0;
@@ -1043,17 +1113,28 @@ class ManageDiscount extends Base
1043
  foreach ($save_order_item_discounts_array as $key => $value) {
1044
  $simple_discount = $bulk_discount = $set_discount = $cart_discount = 0;
1045
  $rule_id = $key;
1046
- $applied_rules[] = $rule_id;
1047
  $cart_discount = isset($cart_discount_details[$rule_id]['cart_discount']) ? $cart_discount_details[$rule_id]['cart_discount'] : '0';
1048
  $cart_shipping = (isset($cart_discount_details[$rule_id]['cart_shipping']) && !empty($cart_discount_details[$rule_id]['cart_shipping'])) ? $cart_discount_details[$rule_id]['cart_shipping'] : 'no';
1049
  $cart_discount_label = isset($cart_discount_details[$rule_id]['cart_discount_label']) ? $cart_discount_details[$rule_id]['cart_discount_label'] : '';
1050
  $simple_discount = isset($value['simple_discount']) ? $value['simple_discount'] : 0;
1051
  $bulk_discount = isset($value['bulk_discount']) ? $value['bulk_discount'] : 0;
1052
  $set_discount = isset($value['set_discount']['discount_value']) ? $value['set_discount']['discount_value'] : 0;
1053
- $discount_price = $simple_discount + $bulk_discount + $set_discount;
 
 
 
 
 
 
 
 
 
1054
  if ($discount_price < 0) {
1055
  $discount_price = 0;
1056
  }
 
 
 
1057
  $model::saveOrderItemDiscounts($order_id, $product_id, $initial_price, $discounted_price, $discount_price, $cart_quantity, $rule_id, $simple_discount, $bulk_discount, $set_discount, $cart_discount, $cart_discount_label, $cart_shipping);
1058
  }
1059
  if (!empty($cart_discount_details)) {
@@ -1064,7 +1145,10 @@ class ManageDiscount extends Base
1064
  $cart_shipping = (isset($cart_discount_details[$rule_id]['cart_shipping']) && !empty($cart_discount_details[$rule_id]['cart_shipping'])) ? $cart_discount_details[$rule_id]['cart_shipping'] : 'no';
1065
  $cart_discount_label = isset($cart_discount_details[$rule_id]['cart_discount_label']) ? $cart_discount_details[$rule_id]['cart_discount_label'] : '';
1066
  $cart_discount = isset($cart_discount_details[$rule_id]['cart_discount_price']) ? $cart_discount_details[$rule_id]['cart_discount_price'] : 0;
1067
- $model::saveOrderItemDiscounts($order_id, 0, 0, $discount_price, 0, 0, $rule_id, $simple_discount, $bulk_discount, $set_discount, $cart_discount, $cart_discount_label, $cart_shipping);
 
 
 
1068
  }
1069
  }
1070
  }
@@ -1285,12 +1369,30 @@ class ManageDiscount extends Base
1285
  */
1286
  function onCreateWoocommerceOrderLineItem($item, $cart_item_key, $values, $order)
1287
  {
1288
-
1289
- if (isset(self::$calculated_cart_item_discount[$cart_item_key])) {
1290
- self::$woocommerce_helper->setOrderItemMeta($item, '_advanced_woo_discount_item_total_discount', self::$calculated_cart_item_discount[$cart_item_key]);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1291
  }
1292
  }
1293
 
 
1294
  /**
1295
  * Calculate the product's initial and discount price
1296
  * @param $product
@@ -1789,4 +1891,25 @@ class ManageDiscount extends Base
1789
  echo "jQuery('#awdr_checkout_subtotal_promotion_messages').html(jQuery('#awdr_checkout_subtotal_promotion_messages_data').html());jQuery('#awdr_checkout_subtotal_promotion_messages_data').remove()";
1790
  echo "</script>";
1791
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1792
  }
49
  $awdr_front_end_script = array(
50
  'ajaxurl' => admin_url('admin-ajax.php'),
51
  'enable_update_price_with_qty' => $ajax_update_price,
52
+ 'refresh_order_review' => self::$config->getConfig('refresh_order_review', 0),
53
  'custom_target_simple_product' => apply_filters('advanced_woo_discount_rules_custom_target_for_simple_product_on_qty_update', ""),
54
  'custom_target_variable_product' => apply_filters('advanced_woo_discount_rules_custom_target_for_variable_product_on_qty_update', ""),
55
  'js_init_trigger' => apply_filters('advanced_woo_discount_rules_update_discount_price_init_trigger', ""),
221
  $product_id = Woocommerce::getProductId($product);
222
  //Calculate the product price
223
  $prices = self::calculateInitialAndDiscountedPrice($product, $quantity, $is_cart = false, $ajax_price);
224
+ $apply_as_cart_rule = isset($prices['apply_as_cart_rule']) ? $prices['apply_as_cart_rule'] : array('no');
225
+ //echo "<pre>"; print_r($apply_as_cart_rule); echo "</pre>";
226
+ if(!in_array('no', $apply_as_cart_rule)){
227
+ return $price_html;
228
+ }
229
  if($ajax_price){
230
  $discount_details = (isset($prices['total_discount_details'])) ? $prices['total_discount_details'] : false;
231
  if($discount_details) {
847
  if($disable_coupon_when_rule_applied == 'disable_rules'){
848
  $has_third_party_coupon = $this->isCartContainsAnyThirdPartyCoupon();
849
  if($has_third_party_coupon === true){
850
+ $calc = self::$calculator;
851
+ $calc::$applied_rules = array();
852
  $run_rule = false;
853
  }
854
  }
1031
  {
1032
  $model = new DBTable();
1033
  $applied_rules = array();
1034
+ $buy_x_get_x_free_discounts = isset(Rule::$additional_discounts['buy_x_get_x_discounts']) ? Rule::$additional_discounts['buy_x_get_x_discounts'] : '';
1035
+ $buy_x_get_y_free_discounts = isset(Rule::$additional_discounts['buy_x_get_y_discounts']) ? Rule::$additional_discounts['buy_x_get_y_discounts'] : '';
1036
+
1037
+ if(!empty($buy_x_get_x_free_discounts)){
1038
+ foreach ($buy_x_get_x_free_discounts as $buy_x_get_x_free_key => $buy_x_get_x_free_discount){
1039
+ $simple_discount = $bulk_discount = $set_discount = $cart_discount = 0;
1040
+ $rule_id = isset($buy_x_get_x_free_discount['rule_id']) ? $buy_x_get_x_free_discount['rule_id'] : 0;
1041
+ $variant_item_id = isset($buy_x_get_x_free_discount['variation_id']) ? $buy_x_get_x_free_discount['variation_id'] : '';
1042
+ $item_id = isset($buy_x_get_x_free_discount['product_id']) ? $buy_x_get_x_free_discount['product_id'] : 0;
1043
+ if(!empty($variant_item_id)){
1044
+ $item_id = $variant_item_id;
1045
+ }
1046
+ $free_product = isset($buy_x_get_x_free_discount['cart_item']['data']) ? $buy_x_get_x_free_discount['cart_item']['data'] : '';
1047
+ $discount = Woocommerce::getProductPrice($free_product);
1048
+ $discount_quantity = isset($buy_x_get_x_free_discount['discount_quantity']) ? $buy_x_get_x_free_discount['discount_quantity'] : 0;
1049
+ $discount_price = $discount * $discount_quantity;
1050
+ $cart_shipping = 'no';
1051
+ $cart_discount_label = '';
1052
+ if($discount_price != 0){
1053
+ $applied_rules[] = $rule_id;
1054
+ }
1055
+ $model::saveOrderItemDiscounts($order_id, $item_id, 0, 0, $discount_price, $discount_quantity, $rule_id, $simple_discount, $bulk_discount, $set_discount, $cart_discount, $cart_discount_label, $cart_shipping);
1056
+ }
1057
+
1058
+ }
1059
+ if(!empty($buy_x_get_y_free_discounts)){
1060
+ foreach ($buy_x_get_y_free_discounts as $buy_x_get_y_free_key => $buy_x_get_y_free_discount){
1061
+ $simple_discount = $bulk_discount = $set_discount = $cart_discount = 0;
1062
+ $rule_id = isset($buy_x_get_y_free_discount['rule_id']) ? $buy_x_get_y_free_discount['rule_id'] : 0;
1063
+ $variant_item_id = isset($buy_x_get_y_free_discount['variation_id']) ? $buy_x_get_y_free_discount['variation_id'] : 0;
1064
+ $item_id = isset($buy_x_get_y_free_discount['product_id']) ? $buy_x_get_y_free_discount['product_id'] : 0;
1065
+ if(!empty($variant_item_id)){
1066
+ $item_id = $variant_item_id;
1067
+ }
1068
+ if($item_id != 0){
1069
+ $free_product = isset($buy_x_get_y_free_discount['cart_item']['data']) ? $buy_x_get_y_free_discount['cart_item']['data'] : '';
1070
+ $discount = Woocommerce::getProductPrice($free_product);
1071
+ $discount_quantity = isset($buy_x_get_y_free_discount['discount_quantity']) ? $buy_x_get_y_free_discount['discount_quantity'] : 0;
1072
+ $discount_price = $discount * $discount_quantity;
1073
+ }else{
1074
+ $discount_price = 0;
1075
+ $discount_products = isset($buy_x_get_y_free_discount['discount_products']) ? $buy_x_get_y_free_discount['discount_products'] : array();
1076
+ if(!empty($discount_products)){
1077
+ foreach ($discount_products as $product_id){
1078
+ $free_product = Woocommerce::getProduct((int)$product_id);
1079
+ $discount = Woocommerce::getProductPrice($free_product);
1080
+ $discount_quantity = isset($buy_x_get_y_free_discount['discount_quantity']) ? $buy_x_get_y_free_discount['discount_quantity'] : 0;
1081
+ $discount_price += $discount * $discount_quantity;
1082
+ }
1083
+ }
1084
+ }
1085
+ $cart_shipping = 'no';
1086
+ $cart_discount_label = '';
1087
+
1088
+ if($discount_price != 0){
1089
+ $applied_rules[] = $rule_id;
1090
+ }
1091
+ $model::saveOrderItemDiscounts($order_id, $item_id, 0, 0, $discount_price, $discount_quantity, $rule_id, $simple_discount, $bulk_discount, $set_discount, $cart_discount, $cart_discount_label, $cart_shipping);
1092
+ }
1093
+
1094
+ }
1095
+
1096
  if (!empty(self::$calculated_cart_item_discount)) {
1097
  foreach (self::$calculated_cart_item_discount as $cart_key => $discount) {
1098
  $product_id = isset($discount['product_id']) ? $discount['product_id'] : 0;
1113
  foreach ($save_order_item_discounts_array as $key => $value) {
1114
  $simple_discount = $bulk_discount = $set_discount = $cart_discount = 0;
1115
  $rule_id = $key;
 
1116
  $cart_discount = isset($cart_discount_details[$rule_id]['cart_discount']) ? $cart_discount_details[$rule_id]['cart_discount'] : '0';
1117
  $cart_shipping = (isset($cart_discount_details[$rule_id]['cart_shipping']) && !empty($cart_discount_details[$rule_id]['cart_shipping'])) ? $cart_discount_details[$rule_id]['cart_shipping'] : 'no';
1118
  $cart_discount_label = isset($cart_discount_details[$rule_id]['cart_discount_label']) ? $cart_discount_details[$rule_id]['cart_discount_label'] : '';
1119
  $simple_discount = isset($value['simple_discount']) ? $value['simple_discount'] : 0;
1120
  $bulk_discount = isset($value['bulk_discount']) ? $value['bulk_discount'] : 0;
1121
  $set_discount = isset($value['set_discount']['discount_value']) ? $value['set_discount']['discount_value'] : 0;
1122
+ $bxgx_discount_price = isset($value['buy_x_get_x_discount']['discount_price_per_quantity']) ? $value['buy_x_get_x_discount']['discount_price_per_quantity'] : 0;
1123
+ $bxgx_discount_qty = isset($value['buy_x_get_x_discount']['discount_quantity']) ? $value['buy_x_get_x_discount']['discount_quantity'] : 0;
1124
+ $bxgx_discount = $bxgx_discount_price * $bxgx_discount_qty;
1125
+ $bxgy_discount_price = isset($value['buy_x_get_y_discount']['discount_price_per_quantity']) ? $value['buy_x_get_y_discount']['discount_price_per_quantity'] : 0;
1126
+ $bxgy_discount_qty = isset($value['buy_x_get_y_discount']['discount_quantity']) ? $value['buy_x_get_y_discount']['discount_quantity'] : 0;
1127
+ $bxgy_discount = $bxgy_discount_price * $bxgy_discount_qty;
1128
+ $bxgy_cheapest_discount_price = isset($value['buy_x_get_y_cheapest_in_cart_discount']['discount_price_per_quantity']) ? $value['buy_x_get_y_cheapest_in_cart_discount']['discount_price_per_quantity'] : 0;
1129
+ $bxgy_cheapest_discount_qty = isset($value['buy_x_get_y_cheapest_in_cart_discount']['discount_quantity']) ? $value['buy_x_get_y_cheapest_in_cart_discount']['discount_quantity'] : 0;
1130
+ $bxgy_cheapest_discount = $bxgy_cheapest_discount_price * $bxgy_cheapest_discount_qty;
1131
+ $discount_price = $simple_discount + $bulk_discount + $set_discount + $bxgx_discount + $bxgy_discount + $bxgy_cheapest_discount;
1132
  if ($discount_price < 0) {
1133
  $discount_price = 0;
1134
  }
1135
+ if($discount_price != 0){
1136
+ $applied_rules[] = $rule_id;
1137
+ }
1138
  $model::saveOrderItemDiscounts($order_id, $product_id, $initial_price, $discounted_price, $discount_price, $cart_quantity, $rule_id, $simple_discount, $bulk_discount, $set_discount, $cart_discount, $cart_discount_label, $cart_shipping);
1139
  }
1140
  if (!empty($cart_discount_details)) {
1145
  $cart_shipping = (isset($cart_discount_details[$rule_id]['cart_shipping']) && !empty($cart_discount_details[$rule_id]['cart_shipping'])) ? $cart_discount_details[$rule_id]['cart_shipping'] : 'no';
1146
  $cart_discount_label = isset($cart_discount_details[$rule_id]['cart_discount_label']) ? $cart_discount_details[$rule_id]['cart_discount_label'] : '';
1147
  $cart_discount = isset($cart_discount_details[$rule_id]['cart_discount_price']) ? $cart_discount_details[$rule_id]['cart_discount_price'] : 0;
1148
+ if($cart_discount != 0){
1149
+ $applied_rules[] = $rule_id;
1150
+ }
1151
+ $model::saveOrderItemDiscounts($order_id, 0, 0, $discounted_price, 0, 0, $rule_id, $simple_discount, $bulk_discount, $set_discount, $cart_discount, $cart_discount_label, $cart_shipping);
1152
  }
1153
  }
1154
  }
1369
  */
1370
  function onCreateWoocommerceOrderLineItem($item, $cart_item_key, $values, $order)
1371
  {
1372
+ $meta_discount_details = isset(self::$calculated_cart_item_discount[$cart_item_key]) ? self::$calculated_cart_item_discount[$cart_item_key] : array();
1373
+ if(!empty($meta_discount_details)){
1374
+ $item_quantity = isset($item->legacy_values['quantity']) ? $item->legacy_values['quantity'] : 0;
1375
+ $product = isset($item->legacy_values['data']) ? $item->legacy_values['data'] : array();
1376
+ $item_product_id = Woocommerce::getProductId($product);
1377
+ $item_cart_discount_details = isset($meta_discount_details['cart_discount_details']) ? $meta_discount_details['cart_discount_details'] : array();
1378
+ if(!empty($item_cart_discount_details)){
1379
+ foreach ($item_cart_discount_details as $key => $detail){
1380
+ $rule_applied_product_id = isset($detail['applied_product_ids']) ? $detail['applied_product_ids'] : array();
1381
+ $cart_discount_price = isset( $meta_discount_details['cart_discount_details'][$key]['cart_discount_product_price'][$item_product_id][$key])? $meta_discount_details['cart_discount_details'][$key]['cart_discount_product_price'][$item_product_id][$key] : 0;
1382
+ $meta_discount_details['cart_discount_details'][$key]['cart_discount_price'] = $cart_discount_price;
1383
+ $cart_discount_price = $cart_discount_price / $item_quantity;
1384
+ $meta_discount_details['cart_discount_details'][$key]['cart_discount_product_price'] = $cart_discount_price;
1385
+ unset($meta_discount_details['cart_discount_details'][$key]['applied_product_ids']);
1386
+ if(!in_array($item_product_id,$rule_applied_product_id)){
1387
+ unset( $meta_discount_details['cart_discount_details'][$key]);
1388
+ }
1389
+ }
1390
+ }
1391
+ self::$woocommerce_helper->setOrderItemMeta($item, '_advanced_woo_discount_item_total_discount', $meta_discount_details);
1392
  }
1393
  }
1394
 
1395
+
1396
  /**
1397
  * Calculate the product's initial and discount price
1398
  * @param $product
1891
  echo "jQuery('#awdr_checkout_subtotal_promotion_messages').html(jQuery('#awdr_checkout_subtotal_promotion_messages_data').html());jQuery('#awdr_checkout_subtotal_promotion_messages_data').remove()";
1892
  echo "</script>";
1893
  }
1894
+
1895
+ /**
1896
+ * Export Data via CSV
1897
+ */
1898
+ public function awdrExportCsv(){
1899
+ if (isset($_POST['wdr-export'])) {
1900
+ ob_end_clean();
1901
+ $rule_helper = new Rule();
1902
+ $rules = $rule_helper->exportRuleByName('all');
1903
+ $file_name = 'advanced-discount-rules-' . date("Y-m-d-h-i-a") . '.csv';
1904
+ $file = fopen('php://output', 'w');
1905
+ header('Content-type: application/csv');
1906
+ header('Content-Disposition: attachment; filename='.$file_name);
1907
+ fputcsv($file, array('id', 'enabled', 'deleted', 'exclusive', 'title', 'priority', 'apply_to', 'filters', 'conditions', 'product_adjustments', 'cart_adjustments', 'buy_x_get_x_adjustments', 'buy_x_get_y_adjustments', 'bulk_adjustments', 'set_adjustments', 'other_discounts', 'date_from', 'date_to', 'usage_limits', 'rule_language', 'used_limits', 'additional', 'max_discount_sum', 'advanced_discount_message', 'discount_type', 'used_coupons', 'created_by', 'created_on', 'modified_by', 'modified_on'));
1908
+ foreach ($rules as $rule_row) {
1909
+ $row_data = (array)$rule_row;
1910
+ fputcsv($file, $row_data);
1911
+ }
1912
+ exit;
1913
+ }
1914
+ }
1915
  }
v2/App/Helpers/Migration.php CHANGED
@@ -26,12 +26,12 @@ class Migration
26
  }
27
  public static function hasSwitchBackOption(){
28
  // For v2 phase 1 switch back should display by default
29
- $has_switch_back_option = true;
30
- /*$has_migration = (new self())->getMigrationInfoOf('has_migration', null);
31
  $has_switch_back_option = false;
32
  if($has_migration == 1){
33
  $has_switch_back_option = true;
34
- }*/
35
 
36
  return apply_filters('advanced_woo_discount_rules_has_switch_back_option', $has_switch_back_option);
37
  }
@@ -422,9 +422,17 @@ class Migration
422
  if($rule->coupons_to_apply_option == 'create_dynamic_coupon'){
423
  $option = array('operator' => 'custom_coupon', 'custom_value' => $rule->dynamic_coupons_to_apply);
424
  } else if($rule->coupons_to_apply_option == 'any_selected'){
425
- $option = array('operator' => 'at_least_one', 'value' => $this->getData($rule->coupons_to_apply));
 
 
 
 
426
  } else {
427
- $option = array('operator' => 'all', 'value' => $this->getData($rule->coupons_to_apply));
 
 
 
 
428
  }
429
  $this->form->setConditions('cart_coupon', $option);
430
  }
26
  }
27
  public static function hasSwitchBackOption(){
28
  // For v2 phase 1 switch back should display by default
29
+ //$has_switch_back_option = true;
30
+ $has_migration = (new self())->getMigrationInfoOf('has_migration', null);
31
  $has_switch_back_option = false;
32
  if($has_migration == 1){
33
  $has_switch_back_option = true;
34
+ }
35
 
36
  return apply_filters('advanced_woo_discount_rules_has_switch_back_option', $has_switch_back_option);
37
  }
422
  if($rule->coupons_to_apply_option == 'create_dynamic_coupon'){
423
  $option = array('operator' => 'custom_coupon', 'custom_value' => $rule->dynamic_coupons_to_apply);
424
  } else if($rule->coupons_to_apply_option == 'any_selected'){
425
+ $coupon = $this->getData($rule->coupons_to_apply);
426
+ if(is_string($coupon)){
427
+ $coupon = explode(',', $coupon);
428
+ }
429
+ $option = array('operator' => 'at_least_one', 'value' => $coupon);
430
  } else {
431
+ $coupon = $this->getData($rule->coupons_to_apply);
432
+ if(is_string($coupon)){
433
+ $coupon = explode(',', $coupon);
434
+ }
435
+ $option = array('operator' => 'all', 'value' => $coupon);
436
  }
437
  $this->form->setConditions('cart_coupon', $option);
438
  }
v2/App/Helpers/Rule.php CHANGED
@@ -236,6 +236,18 @@ class Rule
236
  return 0;
237
  }
238
 
 
 
 
 
 
 
 
 
 
 
 
 
239
  /**
240
  * Is the rule is exclusive rule
241
  * @return bool
@@ -1038,7 +1050,7 @@ class Rule
1038
  $is_condition_passed = false;
1039
  }
1040
  }elseif(!isset($this->available_conditions[$type]['object'])){
1041
- $is_custom_taxonomy = strpos($type, "wdr_cart_item_"); //wdr_cart_item_
1042
  if ( $is_custom_taxonomy === (int) 0 && $is_custom_taxonomy !== false && isset($this->available_conditions['cart_item_products_taxonomy']['object'])) {
1043
  $custom_taxonomy = str_replace("wdr_cart_item_", "", $type);
1044
  if(is_object($this->available_conditions['cart_item_products_taxonomy']['object'])){
236
  return 0;
237
  }
238
 
239
+ /**
240
+ * check rule limit reached
241
+ */
242
+ function checkRuleUsageLimits(){
243
+ $usage_limit = $this->getUsageLimits();
244
+ $used_limit = $this->getUsedLimits();
245
+ if($usage_limit != 0){
246
+ return ($usage_limit > $used_limit) ? "Active" : "Disabled";
247
+ }
248
+ return 'Active';
249
+ }
250
+
251
  /**
252
  * Is the rule is exclusive rule
253
  * @return bool
1050
  $is_condition_passed = false;
1051
  }
1052
  }elseif(!isset($this->available_conditions[$type]['object'])){
1053
+ $is_custom_taxonomy = strpos($type, "wdr_cart_item_"); //wdr_cart_item_
1054
  if ( $is_custom_taxonomy === (int) 0 && $is_custom_taxonomy !== false && isset($this->available_conditions['cart_item_products_taxonomy']['object'])) {
1055
  $custom_taxonomy = str_replace("wdr_cart_item_", "", $type);
1056
  if(is_object($this->available_conditions['cart_item_products_taxonomy']['object'])){
v2/App/Models/DBTable.php CHANGED
@@ -209,18 +209,20 @@ class DBTable
209
  * @param $format
210
  * @param $values
211
  * @param null $rule_id
 
212
  * @return int|null
213
  */
214
  static function saveRule($format, $values, $rule_id = NULL)
215
  {
216
 
217
  global $wpdb;
 
218
  if (!is_null($rule_id) && !empty($rule_id)) {
219
- $wpdb->update($wpdb->prefix . self::RULES_TABLE_NAME, $values, array('id' => $rule_id), $format, array('%d'));
220
  } else {
221
- $wpdb->insert($wpdb->prefix . self::RULES_TABLE_NAME, $values, $format);
222
  $rule_id = $wpdb->insert_id;
223
- $wpdb->update($wpdb->prefix . self::RULES_TABLE_NAME, array('priority' => $rule_id), array('id' => $rule_id), array('%d'), array('%d'));
224
  }
225
  return $rule_id;
226
  }
@@ -293,6 +295,8 @@ class DBTable
293
 
294
 
295
  /**
 
 
296
  * @param $params
297
  * @return array|bool|object|null
298
  */
@@ -360,6 +364,73 @@ class DBTable
360
  return $rows;
361
  }
362
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
363
  /**
364
  * update new table structure
365
  */
@@ -387,7 +458,7 @@ class DBTable
387
  */
388
  public function updateTable(){
389
  //Version of currently activated plugin
390
- $current_version = '1.9.12';
391
  //Database version - this may need upgrading.
392
  $installed_version = get_option('awdr_activity_log_version');
393
  if( $installed_version != $current_version ){
209
  * @param $format
210
  * @param $values
211
  * @param null $rule_id
212
+ * @param $import_id
213
  * @return int|null
214
  */
215
  static function saveRule($format, $values, $rule_id = NULL)
216
  {
217
 
218
  global $wpdb;
219
+ $rules_table_name = $wpdb->prefix.self::RULES_TABLE_NAME;
220
  if (!is_null($rule_id) && !empty($rule_id)) {
221
+ $wpdb->update($rules_table_name, $values, array('id' => $rule_id), $format, array('%d'));
222
  } else {
223
+ $wpdb->insert($rules_table_name, $values, $format);
224
  $rule_id = $wpdb->insert_id;
225
+ $wpdb->update($rules_table_name, array('priority' => $rule_id), array('id' => $rule_id), array('%d'), array('%d'));
226
  }
227
  return $rule_id;
228
  }
295
 
296
 
297
  /**
298
+ * get combine rule data
299
+ *
300
  * @param $params
301
  * @return array|bool|object|null
302
  */
364
  return $rows;
365
  }
366
 
367
+ /**
368
+ * get particular rule data
369
+ * @param $params
370
+ * @param $rule_id
371
+ * @return array|bool|object|null
372
+ */
373
+ public static function get_rule_rows_summary( $params, $rule_id ) {
374
+ global $wpdb;
375
+ $params = array_merge( array(
376
+ 'from' => '',
377
+ 'to' => '',
378
+ 'limit' => 5,
379
+ 'include_amount' => true,
380
+ 'include_cart_discount' => false,
381
+ ), $params );
382
+ if ( empty( $params['from'] ) || empty( $params['to'] ) ) {
383
+ return false;
384
+ }
385
+ $summary_components = array();
386
+ if ( $params['include_amount'] ) {
387
+ $summary_components[] = 'rules_stats.discount';
388
+ }
389
+ if ( $params['include_cart_discount'] ) {
390
+ $summary_components[] = 'rules_stats.cart_discount';
391
+ }
392
+
393
+ if ( empty( $summary_components ) ) {
394
+ return false;
395
+ }
396
+ $summary_field = implode( '+', $summary_components );
397
+ $table_items = $wpdb->prefix.self::RULES_TABLE_NAME;
398
+ $table_stats = $wpdb->prefix.self::ORDER_ITEM_DISCOUNT_TABLE_NAME;
399
+
400
+ $query_total = $wpdb->prepare(
401
+ "SELECT rules.id AS rule_id, SUM({$summary_field}) AS value
402
+ FROM {$table_items} AS rules LEFT JOIN {$table_stats} AS rules_stats
403
+ ON rules.id = rules_stats.rule_id
404
+ WHERE rules.id={$rule_id} AND DATE(rules_stats.created_at) BETWEEN %s AND %s
405
+ GROUP BY rules.id
406
+ HAVING value>0
407
+ ORDER BY value DESC
408
+ LIMIT %d",
409
+ array( $params['from'], $params['to'], (int) $params['limit'] )
410
+ );
411
+ $top = $wpdb->get_col( $query_total );
412
+ if ( empty( $top ) ) {
413
+ return false;
414
+ }
415
+
416
+ $placeholders = array_fill( 0, count( $top ), '%d' );
417
+ $placeholders = implode( ', ', $placeholders );
418
+ $query = $wpdb->prepare(
419
+ "SELECT DATE(rules_stats.created_at) as date_rep, rules.id AS rule_id, CONCAT('#', rules.id, ' ', rules.title) AS title, SUM({$summary_field}) AS value
420
+ FROM {$table_items} AS rules LEFT JOIN {$table_stats} AS rules_stats
421
+ ON rules.id = rules_stats.rule_id
422
+ WHERE rules.id={$rule_id} AND DATE(rules_stats.created_at) BETWEEN %s AND %s AND rules.id IN ({$placeholders})
423
+ GROUP BY date_rep, rule_id, title
424
+ HAVING value>0
425
+ ORDER BY value DESC",
426
+ array_merge( array( $params['from'], $params['to'] ), $top )
427
+ );
428
+
429
+ $rows = $wpdb->get_results( $query );
430
+
431
+ return $rows;
432
+ }
433
+
434
  /**
435
  * update new table structure
436
  */
458
  */
459
  public function updateTable(){
460
  //Version of currently activated plugin
461
+ $current_version = '2.0.0';
462
  //Database version - this may need upgrading.
463
  $installed_version = get_option('awdr_activity_log_version');
464
  if( $installed_version != $current_version ){
v2/App/Router.php CHANGED
@@ -183,5 +183,7 @@ class Router
183
  // For handling BOGO
184
  add_filter('advanced_woo_discount_rules_after_processed_bogo_free_auto_add', array(self::$manage_discount, 'removeThirdPartyCoupon'));
185
  }
 
 
186
  }
187
  }
183
  // For handling BOGO
184
  add_filter('advanced_woo_discount_rules_after_processed_bogo_free_auto_add', array(self::$manage_discount, 'removeThirdPartyCoupon'));
185
  }
186
+
187
+ add_action('advanced_woo_discount_rules_after_initialize', array(self::$manage_discount, 'awdrExportCsv'));
188
  }
189
  }
v2/App/Views/Admin/Menu.php CHANGED
@@ -20,8 +20,7 @@
20
  style="<?php echo ($tab_key === 'help') ? 'background: cornflowerblue;color: white;' : ''; ?>"
21
  href="<?php echo $link; ?>" <?php echo $target; ?>><?php echo $tab_handler->title; ?></a>
22
  <?php } ?>
23
- <span class="awdr_version_text"> <?php echo 'v' . (defined('WDR_VERSION') ? WDR_VERSION : '2.0.0 + ') . ' ';
24
- _e("<span style='color: #FF8C00 ; padding: 3px; border-radius: 4px'> (public beta) </span>", WDR_TEXT_DOMAIN); ?> </span>
25
  <?php
26
  if (isset($on_sale_page_rebuild['available']) && $on_sale_page_rebuild['available']) {
27
  $additional_class_for_rebuild = '';
20
  style="<?php echo ($tab_key === 'help') ? 'background: cornflowerblue;color: white;' : ''; ?>"
21
  href="<?php echo $link; ?>" <?php echo $target; ?>><?php echo $tab_handler->title; ?></a>
22
  <?php } ?>
23
+ <span class="awdr_version_text"> <?php echo 'v' . (defined('WDR_VERSION') ? WDR_VERSION : '2.0.0 + ') . ' '; ?> </span>
 
24
  <?php
25
  if (isset($on_sale_page_rebuild['available']) && $on_sale_page_rebuild['available']) {
26
  $additional_class_for_rebuild = '';
v2/App/Views/Admin/Rules/Conditions/Main.php CHANGED
@@ -84,7 +84,8 @@ if (!defined('ABSPATH')) {
84
  </div><?php
85
  $config = new \Wdr\App\Controllers\Configuration();
86
  $subtotal_promo = $config->getConfig("show_subtotal_promotion", '');
87
- if($type == 'cart_subtotal' && $subtotal_promo == 1){
 
88
  $operator = isset($options->operator) ? $options->operator : 'less_than';?>
89
  <div class="wdr-grid wdr-conditions-container wdr-condition-group <?php echo 'promo_show_hide_'.$i; ?>" data-index="<?php echo $i; ?>" style="<?php echo ($operator == 'greater_than_or_equal' || $operator == 'greater_than') ? '': 'display: none'; ?>">
90
  <?php include(WDR_PLUGIN_PATH . 'App/Views/Admin/Rules/Others/SubtotalPromotion.php'); ?>
@@ -128,19 +129,24 @@ if (!defined('ABSPATH')) {
128
  <!--Rule Limit Start-->
129
  <div class="wdr-condition-template">
130
  <div class="wdr-block">
131
- <div class="wdr-conditions-relationship">
 
 
132
  <label><b><?php _e('Rule Limits', WDR_TEXT_DOMAIN); ?></b>
133
  <span class="awdr-rule-limit-timestamp"><?php
134
  if(!empty($current_time)) echo sprintf(esc_html__('Current date and time: %s', WDR_TEXT_DOMAIN), '<b>' . date('Y-m-d H:i', $current_time) . '</b>'); ?>
135
  </span>
 
 
 
 
136
  </label>
137
 
138
  </div>
139
  <div class="awdr-general-settings-section">
140
  <div class="wdr-rule-setting">
141
- <div class="wdr-apply-to" style="float:left;"><?php
142
- $usage_limits = $rule->getUsageLimits();?>
143
- <select class="wdr-title" name="usage_limits">
144
  <option value="0" <?php echo ($usage_limits == 0) ? 'selected' : ''; ?>><?php _e('Unlimited', WDR_TEXT_DOMAIN); ?></option><?php
145
  for ($limit = 1; $limit <= 20; $limit++) {
146
  ?>
84
  </div><?php
85
  $config = new \Wdr\App\Controllers\Configuration();
86
  $subtotal_promo = $config->getConfig("show_subtotal_promotion", '');
87
+ $type_promotion = isset($condition->type) ? $condition->type : NULL;
88
+ if($type_promotion == 'cart_subtotal' && $subtotal_promo == 1){
89
  $operator = isset($options->operator) ? $options->operator : 'less_than';?>
90
  <div class="wdr-grid wdr-conditions-container wdr-condition-group <?php echo 'promo_show_hide_'.$i; ?>" data-index="<?php echo $i; ?>" style="<?php echo ($operator == 'greater_than_or_equal' || $operator == 'greater_than') ? '': 'display: none'; ?>">
91
  <?php include(WDR_PLUGIN_PATH . 'App/Views/Admin/Rules/Others/SubtotalPromotion.php'); ?>
129
  <!--Rule Limit Start-->
130
  <div class="wdr-condition-template">
131
  <div class="wdr-block">
132
+ <div class="wdr-conditions-relationship"><?php
133
+ $usage_limits = $rule->getUsageLimits();
134
+ $used_limits = $rule->getUsedLimits(); ?>
135
  <label><b><?php _e('Rule Limits', WDR_TEXT_DOMAIN); ?></b>
136
  <span class="awdr-rule-limit-timestamp"><?php
137
  if(!empty($current_time)) echo sprintf(esc_html__('Current date and time: %s', WDR_TEXT_DOMAIN), '<b>' . date('Y-m-d H:i', $current_time) . '</b>'); ?>
138
  </span>
139
+ <span class="awdr-rule-limit-timestamp usage-limits-display" style="<?php echo ($usage_limits == 0) ? 'display:none;' : ''; ?>"> <?php
140
+ _e('Rule Used: ', WDR_TEXT_DOMAIN);
141
+ echo "<b class='awdr-used-limit-total'>".$used_limits."</b>"; ?>
142
+ </span>
143
  </label>
144
 
145
  </div>
146
  <div class="awdr-general-settings-section">
147
  <div class="wdr-rule-setting">
148
+ <div class="wdr-apply-to" style="float:left;">
149
+ <select class="wdr-title" id="select_usage_limits" name="usage_limits">
 
150
  <option value="0" <?php echo ($usage_limits == 0) ? 'selected' : ''; ?>><?php _e('Unlimited', WDR_TEXT_DOMAIN); ?></option><?php
151
  for ($limit = 1; $limit <= 20; $limit++) {
152
  ?>
v2/App/Views/Admin/Rules/Discounts/Main.php CHANGED
@@ -19,7 +19,7 @@ if (!defined('ABSPATH')) {
19
  class="wdr-bulk-type bulk_discount_select awdr_mode_of_operator">
20
  <option value="product_cumulative" <?php if ($bulk_adj_operator == 'product_cumulative') {
21
  echo 'selected';
22
- } ?>><?php _e('Product filters together', WDR_TEXT_DOMAIN) ?></option>
23
  <option value="product" <?php if ($bulk_adj_operator == 'product') {
24
  echo 'selected';
25
  } ?>><?php _e('Individual product', WDR_TEXT_DOMAIN) ?></option>
19
  class="wdr-bulk-type bulk_discount_select awdr_mode_of_operator">
20
  <option value="product_cumulative" <?php if ($bulk_adj_operator == 'product_cumulative') {
21
  echo 'selected';
22
+ } ?>><?php _e('Filters set above', WDR_TEXT_DOMAIN) ?></option>
23
  <option value="product" <?php if ($bulk_adj_operator == 'product') {
24
  echo 'selected';
25
  } ?>><?php _e('Individual product', WDR_TEXT_DOMAIN) ?></option>
v2/App/Views/Admin/Rules/Manage.php CHANGED
@@ -9,34 +9,43 @@
9
  $current_time = current_time('timestamp');
10
  }
11
  $rule_status = $rule->getRuleVaildStatus();
 
12
  $rule_id = $rule->getId();
13
  if ($rule_status == 'in_future') { ?>
14
- <div class="notice inline notice notice-warning notice-alt">
15
- <p>
16
- <b><?php esc_html_e('This rule is not running currently: ', WDR_TEXT_DOMAIN); ?></b><?php esc_html_e(' Start date and time is set in the future date', WDR_TEXT_DOMAIN); ?>
17
- </p>
 
 
 
 
 
18
  </div><?php
19
  } elseif ($rule_status == 'expired') {
20
  ?>
21
- <div class="notice inline notice notice-warning notice-alt">
22
- <p>
23
- <b><?php esc_html_e('This rule is not running currently: ', WDR_TEXT_DOMAIN); ?></b><?php esc_html_e(' Validity expired', WDR_TEXT_DOMAIN); ?>
24
- </p>
 
 
 
 
 
25
  </div><?php
26
- }
27
- /*if(isset($on_sale_page_rebuild['available']) && $on_sale_page_rebuild['available']){
28
- $additional_class_for_rebuild = '';
29
- if($on_sale_page_rebuild['required_rebuild'] === true){
30
- $additional_class_for_rebuild = ' need_attention';
 
 
31
  }
32
- */?><!--
33
- <div class="awdr_rebuild_on_sale_rule_page_con<?php /*echo $additional_class_for_rebuild; */?>">
34
- <button type="button" class="btn btn-danger" id="awdr_rebuild_on_sale_list_on_rule_page"><?php /*esc_html_e('Rebuild index', WDR_TEXT_DOMAIN); */?></button>
35
- </div>
36
- --><?php
37
- /* }*/
38
- ?>
39
-
40
  <form id="wdr-save-rule" name="rule_generator">
41
  <div class="wdr-sticky-header" id="ruleHeader">
42
  <div class="wdr-enable-rule">
9
  $current_time = current_time('timestamp');
10
  }
11
  $rule_status = $rule->getRuleVaildStatus();
12
+ $check_rule_limit = $rule->checkRuleUsageLimits();
13
  $rule_id = $rule->getId();
14
  if ($rule_status == 'in_future') { ?>
15
+ <div class="notice inline notice notice-warning notice-alt awdr-rule-limit-disabled">
16
+ <p class="rule_limit_msg_future">
17
+ <b><?php esc_html_e('This rule is not running currently: ', WDR_TEXT_DOMAIN); ?></b><?php esc_html_e(' Start date and time is set in the future date', WDR_TEXT_DOMAIN); ?>
18
+ </p><?php
19
+ if ($check_rule_limit == 'Disabled') {?>
20
+ <p class="rule_limit_msg">
21
+ <b><?php esc_html_e('This rule is not running currently: ', WDR_TEXT_DOMAIN); ?></b><?php esc_html_e(' Rule reached maximum usage limit ', WDR_TEXT_DOMAIN); ?>
22
+ </p><?php
23
+ } ?>
24
  </div><?php
25
  } elseif ($rule_status == 'expired') {
26
  ?>
27
+ <div class="notice inline notice notice-warning notice-alt awdr-rule-limit-disabled">
28
+ <p class="rule_limit_msg_expired">
29
+ <b><?php esc_html_e('This rule is not running currently: ', WDR_TEXT_DOMAIN); ?></b><?php esc_html_e(' Validity expired', WDR_TEXT_DOMAIN); ?>
30
+ </p><?php
31
+ if ($check_rule_limit == 'Disabled') {?>
32
+ <p class="rule_limit_msg">
33
+ <b><?php esc_html_e('This rule is not running currently: ', WDR_TEXT_DOMAIN); ?></b><?php esc_html_e(' Rule reached maximum usage limit ', WDR_TEXT_DOMAIN); ?>
34
+ </p><?php
35
+ } ?>
36
  </div><?php
37
+ }else{
38
+ if($check_rule_limit == 'Disabled') {?>
39
+ <div class="notice inline notice notice-warning notice-alt awdr-rule-limit-disabled">
40
+ <p class="rule_limit_msg">
41
+ <b><?php esc_html_e('This rule is not running currently: ', WDR_TEXT_DOMAIN); ?></b><?php esc_html_e(' Rule reached maximum usage limit ', WDR_TEXT_DOMAIN); ?>
42
+ </p>
43
+ </div><?php
44
  }
45
+ }?>
46
+ <div class="notice inline notice notice-warning notice-alt awdr-rule-limit-disabled-outer" style="display: none; padding: 10px;">
47
+ <p class="rule_limit_msg_outer"></p>
48
+ </div>
 
 
 
 
49
  <form id="wdr-save-rule" name="rule_generator">
50
  <div class="wdr-sticky-header" id="ruleHeader">
51
  <div class="wdr-enable-rule">
v2/App/Views/Admin/Tabs/DiscountRule.php CHANGED
@@ -253,25 +253,44 @@ $is_pro = \Wdr\App\Helpers\Helper::hasPro();
253
  <span class="awdr-enabled-status" style="<?php echo (!$rule_row->isEnabled()) ? 'display:none' : '';?>">
254
  <?php
255
  $rule_status = $rule_row->getRuleVaildStatus();
 
256
  $current_time_stamp = current_time('timestamp');
257
  $current_time = $rule_row->formatDate($current_time_stamp, $format = "Y-m-d H:i", false);
258
- if($rule_status == 'in_future'){?>
259
- <span class="awdr-listing-status-text"><?php _e(' - ( Will run in future)', WDR_TEXT_DOMAIN);?></span><br><?php
260
- if(isset($current_time) && !empty($current_time)) {
261
- ?>
262
- <span class="awdr-text-warning"><b><?php _e('Your server current date and time:', WDR_TEXT_DOMAIN);?> </b><?php echo $current_time; ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
263
  </span><?php
 
 
 
 
 
 
 
264
  }
265
-
266
- }elseif ($rule_status == 'expired'){?>
267
- <span class="awdr-listing-status-text"><?php _e(' - ( Not running - validity expired)', WDR_TEXT_DOMAIN);?></span><br><?php
268
- if(isset($current_time) && !empty($current_time)) {
269
- ?>
270
- <span class="awdr-text-warning"><b><?php _e('Your server current date and time:', WDR_TEXT_DOMAIN);?> </b><?php echo $current_time; ?>
271
  </span><?php
 
 
272
  }
273
- }else{?>
274
- <span class="awdr-listing-status-text"><?php _e(' - (Running)', WDR_TEXT_DOMAIN);?></span><?php
275
  }?>
276
  </span>
277
  </td>
253
  <span class="awdr-enabled-status" style="<?php echo (!$rule_row->isEnabled()) ? 'display:none' : '';?>">
254
  <?php
255
  $rule_status = $rule_row->getRuleVaildStatus();
256
+ $check_rule_limit = $rule_row->checkRuleUsageLimits();
257
  $current_time_stamp = current_time('timestamp');
258
  $current_time = $rule_row->formatDate($current_time_stamp, $format = "Y-m-d H:i", false);
259
+ if($rule_status == 'in_future'){
260
+ if ($check_rule_limit == 'Disabled') { ?>
261
+ <span class="awdr-listing-status-text"><?php _e(' - ( Not running )', WDR_TEXT_DOMAIN);?></span><br>
262
+ <span class="awdr-text-warning"><b><?php _e('Rule reached maximum usage limit', WDR_TEXT_DOMAIN);?> </b>
263
+ </span><?php
264
+
265
+ } else{ ?>
266
+ <span class="awdr-listing-status-text"><?php _e(' - ( Will run in future)', WDR_TEXT_DOMAIN);?></span><br><?php
267
+ if(isset($current_time) && !empty($current_time)) {
268
+ ?>
269
+ <span class="awdr-text-warning"><b><?php _e('Your server current date and time:', WDR_TEXT_DOMAIN);?> </b><?php echo $current_time; ?>
270
+ </span><?php
271
+ }
272
+ }
273
+ }elseif ($rule_status == 'expired'){
274
+ if ($check_rule_limit == 'Disabled') { ?>
275
+ <span class="awdr-listing-status-text"><?php _e(' - ( Not running )', WDR_TEXT_DOMAIN);?></span><br>
276
+ <span class="awdr-text-warning"><b><?php _e('Rule reached maximum usage limit', WDR_TEXT_DOMAIN);?> </b>
277
  </span><?php
278
+ } else{ ?>
279
+ <span class="awdr-listing-status-text"><?php _e(' - ( Not running - validity expired)', WDR_TEXT_DOMAIN);?></span><br><?php
280
+ if(isset($current_time) && !empty($current_time)) {
281
+ ?>
282
+ <span class="awdr-text-warning"><b><?php _e('Your server current date and time:', WDR_TEXT_DOMAIN);?> </b><?php echo $current_time; ?>
283
+ </span><?php
284
+ }
285
  }
286
+ }else{
287
+ if ($check_rule_limit == 'Disabled') { ?>
288
+ <span class="awdr-listing-status-text"><?php _e(' - ( Not running )', WDR_TEXT_DOMAIN);?></span><br>
289
+ <span class="awdr-text-warning"><b><?php _e('Rule reached maximum usage limit', WDR_TEXT_DOMAIN);?> </b>
 
 
290
  </span><?php
291
+ } else{ ?>
292
+ <span class="awdr-listing-status-text"><?php _e(' - (Running)', WDR_TEXT_DOMAIN);?></span><?php
293
  }
 
 
294
  }?>
295
  </span>
296
  </td>
v2/App/Views/Admin/Tabs/ImportExport.php CHANGED
@@ -1,60 +1,14 @@
1
  <?php
2
  if (!defined('ABSPATH')) exit;
3
-
4
- function forceDownloadFile($filepath)
5
- {
6
- header('Location: ' . $filepath);
7
- return true;
8
- } ?>
9
  <br>
10
  <div class="wdr_settings ui-page-theme-a awdr-container">
11
- <div class="wdr_settings_container">
12
  <div>
13
  <h3><?php _e('Export tool', WDR_TEXT_DOMAIN);?></h3>
14
  <div>
15
  <p>
16
- <!--<select id="wdr-export-select">
17
- <optgroup label="Rules">
18
- <option value="all">All Rules</option>
19
- </optgroup>
20
- <optgroup label="Rule Title"><?php
21
- /* $json_array = array();
22
- if($rules){
23
- $rule_items = array();
24
- foreach ($rules as $rule_row) {*/ ?>
25
- <option value="<?php /*echo $rule_row->id; */ ?>"><?php /*echo $rule_row->title; */ ?></option><?php
26
- /* $rule_items[] = $rule_row;
27
- }
28
- }*/ ?>
29
- </optgroup>
30
- </select>--><?php
31
- if (isset($_POST['wdr-export'])) {
32
- $file_name = 'advanced-discount-rules-' . date("Y-m-d-h-i-a") . '.csv';
33
- if (!file_exists(WDR_PLUGIN_PATH . 'Export')) {
34
- if(!mkdir(WDR_PLUGIN_PATH . 'Export', 0777, true)){?>
35
- <h4><?php _e('Oops!. Download failed!!', WDR_TEXT_DOMAIN);?></h4><?php
36
- return false;
37
- }
38
- }
39
- $file_path = WDR_PLUGIN_PATH . 'Export/' . $file_name;
40
- $file = fopen($file_path, "w");
41
- fputcsv($file, array('id', 'enabled', 'deleted', 'exclusive', 'title', 'priority', 'apply_to', 'filters', 'conditions', 'product_adjustments', 'cart_adjustments', 'buy_x_get_x_adjustments', 'buy_x_get_y_adjustments', 'bulk_adjustments', 'set_adjustments', 'other_discounts', 'date_from', 'date_to', 'usage_limits', 'rule_language', 'used_limits', 'additional', 'max_discount_sum', 'advanced_discount_message', 'discount_type', 'used_coupons'));
42
- foreach ($rules as $rule_row) {
43
- $row_data = (array)$rule_row;
44
- fputcsv($file, $row_data);
45
- }
46
- fclose($file);
47
-
48
- $filepath = WDR_PLUGIN_URL . 'Export/' . $file_name;
49
- $rm_dir = WDR_PLUGIN_PATH . 'Export';
50
- if (forceDownloadFile($filepath)) {
51
- rmdir(WDR_PLUGIN_PATH . 'Export');
52
- }else{?>
53
- <h4><?php _e('Oops!. Download failed!!', WDR_TEXT_DOMAIN);?></h4><?php
54
- return false;
55
- }
56
- }
57
- ?>
58
  <form method="post">
59
  <button type="submit" id="wdr-export" name="wdr-export" class="button button-primary">
60
  <?php _e('Export', WDR_TEXT_DOMAIN);?>
@@ -63,48 +17,120 @@ function forceDownloadFile($filepath)
63
  </p>
64
 
65
  </div>
66
- </div><?php
67
- /* if (isset($_POST['wdr_import'])) {
 
 
 
 
 
 
 
 
 
68
 
69
- if (isset($_FILES["import_rules"]["name"]) && !empty($_FILES["import_rules"]["name"])) {
70
- $file_name = $_FILES["import_rules"]["name"];
71
- $ext_info = new SplFileInfo($file_name);
72
- if ($ext_info->getExtension() == 'csv') {
73
- $file = fopen($_FILES['import_rules']['tmp_name'], "r");
74
- if( $file !== FALSE ){
75
- while($csv_row = fgetcsv($file, 1000, ",")) {
76
- $rule_helper = new \Wdr\App\Helpers\Rule();
77
- $rule_helper->importCsvRules($csv_row, $this->input->post('wdp_import_data_reset_rules'));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
78
  }
79
- }
80
- fclose($file);
81
- } else {
82
- echo "Error: Please Upload only CSV File";
83
- }
84
- }
85
- }
86
- */?>
87
- <!--<form method="post" enctype="multipart/form-data">
88
- <div>
89
- <h3>Import tool</h3>
90
- <div>
91
- <div>
92
- <p>
93
- <input type="file" name="import_rules"/>
94
- </p>
95
- <input type="hidden" name="wdp_import_data_reset_rules" value="0">
96
- <input type="checkbox" name="wdp_import_data_reset_rules" value="1">
97
- <label for="wdp-import-data-reset-rules">
98
- Clear all rules before import </label>
99
- </div>
100
- </div>
101
  </div>
102
- <p>
103
- <button type="submit" id="wdr-import" name="wdr_import" class="button button-primary">
104
- Import
105
- </button>
106
- </p>
107
- </form>-->
108
-
109
  </div>
110
  </div>
1
  <?php
2
  if (!defined('ABSPATH')) exit;
3
+ use Wdr\App\Models\DBTable;
4
+ ?>
 
 
 
 
5
  <br>
6
  <div class="wdr_settings ui-page-theme-a awdr-container">
7
+ <div class="wdr_settings_container" style="border-bottom: 1px solid black; padding-bottom: 10px;">
8
  <div>
9
  <h3><?php _e('Export tool', WDR_TEXT_DOMAIN);?></h3>
10
  <div>
11
  <p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  <form method="post">
13
  <button type="submit" id="wdr-export" name="wdr-export" class="button button-primary">
14
  <?php _e('Export', WDR_TEXT_DOMAIN);?>
17
  </p>
18
 
19
  </div>
20
+ </div>
21
+ </div>
22
+ <div class="wdr_settings_container" >
23
+ <div>
24
+ <h3><?php _e('Import Tool', WDR_TEXT_DOMAIN);?></h3>
25
+ <div><?php
26
+ $message = '';
27
+ if (isset($_POST['wdr-import'])) {
28
+ $fileName = $_FILES["awdr_import_rule"]["tmp_name"];
29
+
30
+ if ($_FILES["awdr_import_rule"]["size"] > 0) {
31
 
32
+ $file = fopen($fileName, "r");
33
+ $current_date_time = '';
34
+ if (function_exists('current_time')) {
35
+ $current_time = current_time('timestamp');
36
+ $current_date_time = date('Y-m-d H:i:s', $current_time);
37
+ }
38
+ $current_user = get_current_user_id();
39
+ $i = 1;
40
+
41
+ while (($column = fgetcsv($file, 100000, ",")) !== FALSE) {
42
+ if($i == 1){
43
+ $i++;
44
+ continue;
45
+ }
46
+ $rule_id = isset($column[0]) ? $column[0] : NULL;
47
+ $enabled = isset($column[1]) ? $column[1] : 0;
48
+ $deleted = isset($column[2]) ? $column[2] : 0;
49
+ $exclusive = isset($column[3]) ? $column[3] : 0;
50
+ $title = isset($column[4]) ? $column[4] : "Untitled Rule";
51
+ $priority = isset($column[5]) ? $column[5] : $rule_id;
52
+ $apply_to = isset($column[6]) ? $column[6] : NULL;
53
+ $filters = isset($column[7]) ? $column[7] : '[]';
54
+ $conditions = isset($column[8]) ? $column[8] : '[]';
55
+ $product_adjustments = isset($column[9]) ? $column[9] : "[]";
56
+ $cart_adjustment = isset($column[10]) ? $column[10] : "[]";
57
+ $buy_x_get_x = isset($column[11]) ? $column[11] : "[]";
58
+ $buy_x_get_y = isset($column[12]) ? $column[12] : "[]";
59
+ $bulk_adjustment = isset($column[13]) ? $column[13] : "[]";
60
+ $set_adjustment = isset($column[14]) ? $column[14] : "[]";
61
+ $other_discount = isset($column[15]) ? $column[15] : NULL;
62
+ $date_from = isset($column[16]) ? $column[16] : NULL;
63
+ $date_to = isset($column[17]) ? $column[17] : NULL;
64
+ $usage_limits = isset($column[18]) ? $column[18] : 0;
65
+ $rule_language = isset($column[19]) ? $column[19] : "[]";
66
+ $used_limits = isset($column[20]) ? $column[20] : 0;
67
+ $additional = isset($column[21]) ? $column[21] : '{"condition_relationship":"and"}';
68
+ $max_discount_sum = isset($column[22]) ? $column[22] : NULL;
69
+ $advanced_discount_message = isset($column[23]) ? $column[23] : '{"display":"0","badge_color_picker":"#ffffff","badge_text_color_picker":"#000000","badge_text":""}';
70
+ $discount_type = isset($column[24]) ? $column[24] : "wdr_simple_discount";
71
+ $used_coupons = isset($column[25]) ? $column[25] : "[]";
72
+ $created_by = isset($column[26]) ? $column[26] : $current_user;
73
+ $created_on = isset($column[27]) ? $column[27] : $current_date_time;
74
+ $modified_by = isset($column[28]) ? $column[28] : $current_user;
75
+ $modified_on = isset($column[29]) ? $column[29] : $current_date_time;
76
+
77
+
78
+ $arg = array(
79
+ 'enabled' => $enabled,
80
+ 'deleted' => $deleted,
81
+ 'exclusive' => $exclusive,
82
+ 'title' => (empty($title)) ? esc_html__('Untitled Rule', WDR_TEXT_DOMAIN) : $title,
83
+ 'priority' => $priority,
84
+ 'apply_to' => $apply_to,
85
+ 'filters' => $filters,
86
+ 'conditions' => $conditions,
87
+ 'product_adjustments' => $product_adjustments,
88
+ 'cart_adjustments' => $cart_adjustment,
89
+ 'buy_x_get_x_adjustments' => $buy_x_get_x,
90
+ 'buy_x_get_y_adjustments' => $buy_x_get_y,
91
+ 'bulk_adjustments' => $bulk_adjustment,
92
+ 'set_adjustments' => $set_adjustment,
93
+ 'other_discounts' => $other_discount,
94
+ 'date_from' => $date_from,
95
+ 'date_to' => $date_to,
96
+ 'usage_limits' => $usage_limits,
97
+ 'rule_language' => $rule_language,
98
+ 'used_limits' => $used_limits,
99
+ 'additional' => $additional,
100
+ 'max_discount_sum' => $max_discount_sum,
101
+ 'advanced_discount_message' => $advanced_discount_message,
102
+ 'discount_type' => $discount_type,
103
+ 'used_coupons' => $used_coupons,
104
+ 'created_by' => $created_by,
105
+ 'created_on' => $created_on,
106
+ 'modified_by' => $modified_by,
107
+ 'modified_on' => $modified_on,
108
+ );
109
+
110
+
111
+ $column_format = array('%d','%d','%d', '%s', '%d', '%d', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%d', '%d', '%d', '%s', '%d','%s','%d','%s','%s','%s','%d', '%s', '%d', '%s');
112
+
113
+ $rule_id = DBTable::saveRule($column_format, $arg);
114
+
115
+ if (!empty($rule_id)) {
116
+ $type = "success";
117
+ $message = __('<b style="color: green;">Rules Imported successfully</b>', WDR_TEXT_DOMAIN);
118
+ } else {
119
+ $type = "error";
120
+ $message = __('<b style="color: red;">Problem in Importing CSV Data</b>', WDR_TEXT_DOMAIN);
121
+ break;
122
+ }
123
+ }
124
  }
125
+ }?>
126
+ <form method="post" name="awdr-import-csv" id="awdr-import-csv" enctype="multipart/form-data">
127
+ <input type="file" name="awdr_import_rule" id="awdr-file-uploader" accept=".csv"><br>
128
+ <span id="awdr-upload-response"><?php echo $message;?></span></br>
129
+ <button type="submit" id="wdr-import" name="wdr-import" class="button button-primary">
130
+ <?php _e('Import', WDR_TEXT_DOMAIN);?>
131
+ </button>
132
+ </form>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
133
  </div>
134
+ </div>
 
 
 
 
 
 
135
  </div>
136
  </div>
v2/App/Views/Admin/Tabs/Statistics.php CHANGED
@@ -63,7 +63,7 @@ if (!defined('ABSPATH')) {
63
  } ?>" style="height: 34px;">
64
  <!--<span class="wdr_desc_text"><?php /*_e('Vaild to', WDR_TEXT_DOMAIN); */ ?></span>-->
65
  </div>
66
- <div class="">
67
  <select name="type" class="chart-type" style="height: 33px">
68
  <?php foreach ( $charts as $group => $charts_by_group ): ?>
69
  <optgroup label="<?php echo $group ?>">
63
  } ?>" style="height: 34px;">
64
  <!--<span class="wdr_desc_text"><?php /*_e('Vaild to', WDR_TEXT_DOMAIN); */ ?></span>-->
65
  </div>
66
+ <div class="awdr-report-type" >
67
  <select name="type" class="chart-type" style="height: 33px">
68
  <?php foreach ( $charts as $group => $charts_by_group ): ?>
69
  <optgroup label="<?php echo $group ?>">
v2/App/Views/Admin/Tabs/settings.php CHANGED
@@ -77,13 +77,28 @@
77
  </tr>
78
  <tr>
79
  <td scope="row">
80
- <label for="suppress_other_discount_plugins" class="awdr-left-align"><?php _e('Suppress third party discount plugins', WDR_TEXT_DOMAIN) ?></label>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
81
  <span class="wdr_settings_desc_text awdr-clear-both"><?php esc_attr_e('suppress third party plugins from modifying the prices. other discount plugins may not works!', WDR_TEXT_DOMAIN); ?></span>
82
  </td>
83
  <td>
84
  <input type="radio" name="suppress_other_discount_plugins" id="suppress_other_discount_plugins"
85
  value="1" <?php echo($configuration->getConfig('suppress_other_discount_plugins', 0) ? 'checked' : '') ?>><label
86
- for="modify_price_at_product_page"><?php _e('Yes', WDR_TEXT_DOMAIN); ?></label>
87
  <input type="radio" name="suppress_other_discount_plugins"
88
  id="do_not_suppress_other_discount_plugins"
89
  value="0" <?php echo(!$configuration->getConfig('suppress_other_discount_plugins', 0) ? 'checked' : '') ?>><label
77
  </tr>
78
  <tr>
79
  <td scope="row">
80
+ <label class="awdr-left-align"><?php _e('Refresh order review in checkout', WDR_TEXT_DOMAIN) ?></label>
81
+ <span class="wdr_settings_desc_text awdr-clear-both"><?php esc_attr_e('Useful when you have purchase history/shipping address based discount.', WDR_TEXT_DOMAIN); ?></span>
82
+ </td>
83
+ <td>
84
+ <input type="radio" name="refresh_order_review" id="refresh_order_review_enable"
85
+ value="1" <?php echo($configuration->getConfig('refresh_order_review', 0) ? 'checked' : '') ?>><label
86
+ for="refresh_order_review_enable"><?php _e('Yes', WDR_TEXT_DOMAIN); ?></label>
87
+ <input type="radio" name="refresh_order_review"
88
+ id="refresh_order_review_disable"
89
+ value="0" <?php echo(!$configuration->getConfig('refresh_order_review', 0) ? 'checked' : '') ?>><label
90
+ for="refresh_order_review_disable"><?php _e('No', WDR_TEXT_DOMAIN); ?></label>
91
+ </td>
92
+ </tr>
93
+ <tr>
94
+ <td scope="row">
95
+ <label class="awdr-left-align"><?php _e('Suppress third party discount plugins', WDR_TEXT_DOMAIN) ?></label>
96
  <span class="wdr_settings_desc_text awdr-clear-both"><?php esc_attr_e('suppress third party plugins from modifying the prices. other discount plugins may not works!', WDR_TEXT_DOMAIN); ?></span>
97
  </td>
98
  <td>
99
  <input type="radio" name="suppress_other_discount_plugins" id="suppress_other_discount_plugins"
100
  value="1" <?php echo($configuration->getConfig('suppress_other_discount_plugins', 0) ? 'checked' : '') ?>><label
101
+ for="suppress_other_discount_plugins"><?php _e('Yes', WDR_TEXT_DOMAIN); ?></label>
102
  <input type="radio" name="suppress_other_discount_plugins"
103
  id="do_not_suppress_other_discount_plugins"
104
  value="0" <?php echo(!$configuration->getConfig('suppress_other_discount_plugins', 0) ? 'checked' : '') ?>><label
v2/Assets/Js/admin-statistics.js CHANGED
@@ -13,7 +13,9 @@ function googleChartsLoadCallback() {
13
 
14
  jQuery(document).ready(function () {
15
  isjQueryReady = true;
 
16
  init();
 
17
  });
18
 
19
  function init() {
@@ -116,7 +118,6 @@ function showChart(params) {
116
  function (response) {
117
  jQuery('.update-chart').prop('disabled', false);
118
  jQuery('.chart-placeholder').removeClass('loading');
119
-
120
  if (response.success) {
121
  if (response.data.columns.length > 1) {
122
  response_content = response;
@@ -124,6 +125,8 @@ function showChart(params) {
124
  } else {
125
  jQuery('#chart-container').html(wdr_data.localization_data.chart_data);
126
  }
 
 
127
  }
128
  },
129
  'json'
13
 
14
  jQuery(document).ready(function () {
15
  isjQueryReady = true;
16
+ jQuery('.chart-type').select2();
17
  init();
18
+
19
  });
20
 
21
  function init() {
118
  function (response) {
119
  jQuery('.update-chart').prop('disabled', false);
120
  jQuery('.chart-placeholder').removeClass('loading');
 
121
  if (response.success) {
122
  if (response.data.columns.length > 1) {
123
  response_content = response;
125
  } else {
126
  jQuery('#chart-container').html(wdr_data.localization_data.chart_data);
127
  }
128
+ }else {
129
+ jQuery('#chart-container').html(wdr_data.localization_data.chart_data);
130
  }
131
  },
132
  'json'
v2/Assets/Js/admin_script.js CHANGED
@@ -168,7 +168,21 @@ jQuery(document).ready(function ($) {
168
  datepicker: false,
169
  format: 'H:i'
170
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
171
  }
 
172
  //$('.wdr-condition-date').datetimepicker();
173
  make_wdr_select2_search($(this).parents('.wdr-conditions-container').find('[data-field="autocomplete"]'));
174
  make_select2_preloaded($(this).parents('.wdr-conditions-container').find('[data-field="preloaded"]'));
@@ -489,7 +503,7 @@ jQuery(document).ready(function ($) {
489
  * @param $el
490
  */
491
  function make_wdr_select2_search($el) {
492
- $el.select2({
493
  width: '100%',
494
  minimumInputLength: 1,
495
  placeholder: $el.data('placeholder'),
@@ -526,7 +540,7 @@ jQuery(document).ready(function ($) {
526
  /**
527
  * ajax edit search function on document ready
528
  */
529
- $('.edit-filters').select2({
530
  width: '100%',
531
  minimumInputLength: 1,
532
  placeholder: wdr_data.labels.placeholders,
@@ -565,7 +579,7 @@ jQuery(document).ready(function ($) {
565
  $els.each(function (index, el) {
566
  var $el = $(el);
567
  var data = wdr_data.lists[$el.data('list')];
568
- $el.select2({
569
  width: '100%',
570
  escapeMarkup: function (text) {
571
  return text;
@@ -592,7 +606,7 @@ jQuery(document).ready(function ($) {
592
  $els.each(function (index, el) {
593
  var $el = $(el);
594
  var data = wdr_data.lists[$el.data('list')];
595
- $el.select2({
596
  width: '100%',
597
  escapeMarkup: function (text) {
598
  return text;
@@ -617,7 +631,7 @@ jQuery(document).ready(function ($) {
617
  var $el = $(el);
618
  var data = wdr_data.lists[$el.data('list')];
619
 
620
- $el.select2({
621
  width: '100%',
622
  escapeMarkup: function (text) {
623
  return text;
@@ -642,7 +656,7 @@ jQuery(document).ready(function ($) {
642
  var $el = $(el);
643
  var data = wdr_data.lists[$el.data('list')];
644
 
645
- $el.select2({
646
  width: '100%',
647
  escapeMarkup: function (text) {
648
  return text;
@@ -2389,9 +2403,9 @@ jQuery(document).ready(function ($) {
2389
  $(document).on('change', '.awdr_mode_of_operator', function () {
2390
  let mode_of_operator = $(this).val();
2391
  if(mode_of_operator == "variation"){
2392
- $('.awdr-example').html(wdr_data.localization_data.mode_variation_cumulative_example)
2393
  }else{
2394
- $('.awdr-example').html('')
2395
  }
2396
  })
2397
  $(document).on('click', '.awdr-hidden-search', function () {
@@ -2399,4 +2413,41 @@ jQuery(document).ready(function ($) {
2399
  $('.wdr-rule-search-key').val(search_string);
2400
  $('#wdr-search-top').submit();
2401
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2402
  });
168
  datepicker: false,
169
  format: 'H:i'
170
  });
171
+ }else if(current_block != 'cart_subtotal'){
172
+ let promo_index = $(this).parents('.wdr-conditions-container').attr("data-index");
173
+ $('.promo_show_hide_' + promo_index).remove();
174
+ }else if(current_block == 'cart_subtotal'){
175
+ if(wdr_data.enable_subtotal_promo_text == '1'){
176
+ wdr_buildrule.wdr_clone_field({
177
+ addConditionType: 'empty-promo',
178
+ addFilterMethod: '.wdr-subtotal-promo-messeage-main',
179
+ addRemoveIcon: '.wdr-icon-remove',
180
+ ruleAppendTo: ".wdr-condition-group-items",
181
+ newIndex: last_index
182
+ });
183
+ }
184
  }
185
+
186
  //$('.wdr-condition-date').datetimepicker();
187
  make_wdr_select2_search($(this).parents('.wdr-conditions-container').find('[data-field="autocomplete"]'));
188
  make_select2_preloaded($(this).parents('.wdr-conditions-container').find('[data-field="preloaded"]'));
503
  * @param $el
504
  */
505
  function make_wdr_select2_search($el) {
506
+ $el.selectWoo({
507
  width: '100%',
508
  minimumInputLength: 1,
509
  placeholder: $el.data('placeholder'),
540
  /**
541
  * ajax edit search function on document ready
542
  */
543
+ $('.edit-filters').selectWoo({
544
  width: '100%',
545
  minimumInputLength: 1,
546
  placeholder: wdr_data.labels.placeholders,
579
  $els.each(function (index, el) {
580
  var $el = $(el);
581
  var data = wdr_data.lists[$el.data('list')];
582
+ $el.selectWoo({
583
  width: '100%',
584
  escapeMarkup: function (text) {
585
  return text;
606
  $els.each(function (index, el) {
607
  var $el = $(el);
608
  var data = wdr_data.lists[$el.data('list')];
609
+ $el.selectWoo({
610
  width: '100%',
611
  escapeMarkup: function (text) {
612
  return text;
631
  var $el = $(el);
632
  var data = wdr_data.lists[$el.data('list')];
633
 
634
+ $el.selectWoo({
635
  width: '100%',
636
  escapeMarkup: function (text) {
637
  return text;
656
  var $el = $(el);
657
  var data = wdr_data.lists[$el.data('list')];
658
 
659
+ $el.selectWoo({
660
  width: '100%',
661
  escapeMarkup: function (text) {
662
  return text;
2403
  $(document).on('change', '.awdr_mode_of_operator', function () {
2404
  let mode_of_operator = $(this).val();
2405
  if(mode_of_operator == "variation"){
2406
+ $('.awdr-example').html(wdr_data.localization_data.mode_variation_cumulative_example);
2407
  }else{
2408
+ $('.awdr-example').html('');
2409
  }
2410
  })
2411
  $(document).on('click', '.awdr-hidden-search', function () {
2413
  $('.wdr-rule-search-key').val(search_string);
2414
  $('#wdr-search-top').submit();
2415
  });
2416
+
2417
+ /**
2418
+ * Rule limit dynamic message
2419
+ */
2420
+ $(document).on('change', '#select_usage_limits', function () {
2421
+ let selected_limit = $( "#select_usage_limits option:selected" ).text();
2422
+ if( selected_limit == "Unlimited"){
2423
+ $('.usage-limits-display').hide();
2424
+ $('.awdr-rule-limit-disabled-outer .rule_limit_msg_outer').hide();
2425
+ $('.awdr-rule-limit-disabled').hide();
2426
+ }else{
2427
+ $('.usage-limits-display').show();
2428
+ var rule_applied_total = $('.awdr-used-limit-total').html();
2429
+ if(selected_limit <= parseInt(rule_applied_total)){
2430
+ $('.awdr-rule-limit-disabled').hide();
2431
+ $('.awdr-rule-limit-disabled-outer').show();
2432
+ $('.awdr-rule-limit-disabled-outer .rule_limit_msg_outer').html(wdr_data.localization_data.invalid_rule_limit);
2433
+ }else{
2434
+ $('.awdr-rule-limit-disabled').hide();
2435
+ $('.awdr-rule-limit-disabled-outer').hide();
2436
+ }
2437
+ }
2438
+ // awdrRuleDateValidationMessage();
2439
+ });
2440
+
2441
+ /**
2442
+ * Import File validation
2443
+ */
2444
+ $("#awdr-import-csv").on("submit", function () {
2445
+ var fileType = ".csv";
2446
+ var regex = new RegExp("([a-zA-Z0-9\s_\\.\-:])+(" + fileType + ")$");
2447
+ if (!regex.test($("#awdr-file-uploader").val().toLowerCase())) {
2448
+ $("#awdr-upload-response").html(wdr_data.localization_data.invalid_file_type);
2449
+ return false;
2450
+ }
2451
+ return true;
2452
+ });
2453
  });
v2/Assets/Js/site_main.js CHANGED
@@ -2,15 +2,18 @@
2
  /**
3
  * refresh cart when payment method changed
4
  */
5
- $(document).on('change', 'input[name="payment_method"],input[name="billing_city"],input[name="billing_postcode"]', function () {
6
- refreshCart();
7
- });
8
- /**
9
- * refresh cart when Email changed
10
- */
11
- $(document).on('blur', 'input[name="billing_email"]', function () {
12
- refreshCart();
13
- });
 
 
 
14
 
15
  function refreshCart() {
16
  $('body').trigger('update_checkout');
2
  /**
3
  * refresh cart when payment method changed
4
  */
5
+ if (awdr_params.refresh_order_review == '1') {
6
+ $(document).on('change', 'input[name="payment_method"],input[name="billing_city"],input[name="billing_postcode"]', function () {
7
+ refreshCart();
8
+ });
9
+
10
+ /**
11
+ * refresh cart when Email changed
12
+ */
13
+ $(document).on('blur', 'input[name="billing_email"], select#billing_state', function () {
14
+ refreshCart();
15
+ });
16
+ }
17
 
18
  function refreshCart() {
19
  $('body').trigger('update_checkout');
woo-discount-rules.php CHANGED
@@ -5,13 +5,13 @@
5
  * Description: Simple to complex discount rules for your WooCommerce store. Core package.
6
  * Author: Flycart Technologies LLP
7
  * Author URI: https://www.flycart.org
8
- * Version: 1.9.12
9
  * Slug: woo-discount-rules
10
  * Text Domain: woo-discount-rules
11
  * Domain Path: /i18n/languages/
12
  * Requires at least: 4.6.1
13
  * WC requires at least: 3.0
14
- * WC tested up to: 4.2
15
  */
16
  if (!defined('ABSPATH')) {
17
  exit;
@@ -30,13 +30,13 @@ $awdr_load_version = get_option('advanced_woo_discount_rules_load_version', null
30
  if($awdr_load_version === null || empty($awdr_load_version)){
31
  $awdr_load_version = 'v1';
32
  /* Hide this for public beta release */
33
- /*if(function_exists('get_posts')){
34
  $rules = get_posts(array('post_type' => 'woo_discount', 'numberposts' => '1'));
35
  if(empty($rules)){
36
  $cart_rules = get_posts(array('post_type' => 'woo_discount_cart', 'numberposts' => '1'));
37
  if(empty($cart_rules)) $awdr_load_version = 'v2';
38
  }
39
- }*/
40
  }
41
 
42
  /**
5
  * Description: Simple to complex discount rules for your WooCommerce store. Core package.
6
  * Author: Flycart Technologies LLP
7
  * Author URI: https://www.flycart.org
8
+ * Version: 2.0.0
9
  * Slug: woo-discount-rules
10
  * Text Domain: woo-discount-rules
11
  * Domain Path: /i18n/languages/
12
  * Requires at least: 4.6.1
13
  * WC requires at least: 3.0
14
+ * WC tested up to: 4.3
15
  */
16
  if (!defined('ABSPATH')) {
17
  exit;
30
  if($awdr_load_version === null || empty($awdr_load_version)){
31
  $awdr_load_version = 'v1';
32
  /* Hide this for public beta release */
33
+ if(function_exists('get_posts')){
34
  $rules = get_posts(array('post_type' => 'woo_discount', 'numberposts' => '1'));
35
  if(empty($rules)){
36
  $cart_rules = get_posts(array('post_type' => 'woo_discount_cart', 'numberposts' => '1'));
37
  if(empty($cart_rules)) $awdr_load_version = 'v2';
38
  }
39
+ }
40
  }
41
 
42
  /**