Discount Rules for WooCommerce - Version 1.5.5

Version Description

  • 19/03/18 =
  • Improvement - Cart rule UI content improvement
Download this release

Release Info

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

Code changes from version 1.5.4 to 1.5.5

assets/js/app.js CHANGED
@@ -320,8 +320,8 @@ function validateFields(){
320
  var order_status_list = $('#order_status_list_0 > option').clone();
321
  if (is_pro) {
322
  var form = '<div class="cart_rules_list row"> <div class="col-md-3 form-group"> <label>Type <select class="form-control cart_rule_type" id="cart_condition_type_' + count + '" name="discount_rule[' + count + '][type]"> <optgroup label="Cart Subtotal"><option value="subtotal_least" selected="selected">Subtotal at least</option><option value="subtotal_less">Subtotal less than</option></optgroup>' +
323
- '<optgroup label="Cart Item Count"><option value="item_count_least">Count of cart items at least</option><option value="item_count_less">Count of cart items less than</option></optgroup>' +
324
- '<optgroup label="Quantity Sum"><option value="quantity_least">Sum of item quantities at least</option><option value="quantity_less">Sum of item quantities less than</option></optgroup><!-- At least one of these should present in the cart to apply. -->' +
325
  '<optgroup label="Categories In Cart"><!-- At least one of these should present in the cart to apply. -->' +
326
  '<option value="categories_in">Categories in cart</option>' +
327
  '</optgroup>' +
@@ -349,8 +349,8 @@ function validateFields(){
349
  '</label></div>';
350
  } else {
351
  var form = '<div class="cart_rules_list row"> <div class="col-md-3 form-group"> <label>Type <select class="form-control cart_rule_type" id="cart_condition_type_' + count + '" name="discount_rule[' + count + '][type]"> <optgroup label="Cart Subtotal"><option value="subtotal_least" selected="selected">Subtotal at least</option><option value="subtotal_less">Subtotal less than</option></optgroup>' +
352
- '<optgroup label="Cart Item Count"><option value="item_count_least">Count of cart items at least</option><option value="item_count_less">Count of cart items less than</option></optgroup>' +
353
- '<optgroup label="Quantity Sum"><option disabled>Sum of item quantities at least <b>' + pro_suffix + '</b></option><option disabled>Sum of item quantities less than <b>' + pro_suffix + '</b></option></optgroup><!-- At least one of these should present in the cart to apply. -->' +
354
  '<optgroup label="Categories In Cart"><!-- At least one of these should present in the cart to apply. -->' +
355
  '<option disabled>Categories in cart <b>' + pro_suffix + '</b></option>' +
356
  '</optgroup>' +
320
  var order_status_list = $('#order_status_list_0 > option').clone();
321
  if (is_pro) {
322
  var form = '<div class="cart_rules_list row"> <div class="col-md-3 form-group"> <label>Type <select class="form-control cart_rule_type" id="cart_condition_type_' + count + '" name="discount_rule[' + count + '][type]"> <optgroup label="Cart Subtotal"><option value="subtotal_least" selected="selected">Subtotal at least</option><option value="subtotal_less">Subtotal less than</option></optgroup>' +
323
+ '<optgroup label="Cart Item Count"><option value="item_count_least">Number of line items in the cart (not quantity) at least</option><option value="item_count_less">Number of line items in the cart (not quantity) less than</option></optgroup>' +
324
+ '<optgroup label="Quantity Sum"><option value="quantity_least">Total number of quantities in the cart at least</option><option value="quantity_less">Total number of quantities in the cart less than</option></optgroup><!-- At least one of these should present in the cart to apply. -->' +
325
  '<optgroup label="Categories In Cart"><!-- At least one of these should present in the cart to apply. -->' +
326
  '<option value="categories_in">Categories in cart</option>' +
327
  '</optgroup>' +
349
  '</label></div>';
350
  } else {
351
  var form = '<div class="cart_rules_list row"> <div class="col-md-3 form-group"> <label>Type <select class="form-control cart_rule_type" id="cart_condition_type_' + count + '" name="discount_rule[' + count + '][type]"> <optgroup label="Cart Subtotal"><option value="subtotal_least" selected="selected">Subtotal at least</option><option value="subtotal_less">Subtotal less than</option></optgroup>' +
352
+ '<optgroup label="Cart Item Count"><option value="item_count_least">Number of line items in the cart (not quantity) at least</option><option value="item_count_less">Number of line items in the cart (not quantity) less than</option></optgroup>' +
353
+ '<optgroup label="Quantity Sum"><option disabled>Total number of quantities in the cart at least <b>' + pro_suffix + '</b></option><option disabled>Total number of quantities in the cart less than <b>' + pro_suffix + '</b></option></optgroup><!-- At least one of these should present in the cart to apply. -->' +
354
  '<optgroup label="Categories In Cart"><!-- At least one of these should present in the cart to apply. -->' +
355
  '<option disabled>Categories in cart <b>' + pro_suffix + '</b></option>' +
356
  '</optgroup>' +
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://flycart.org/
4
  Tags: woocommerce, discounts, dynamic pricing, Buy One Get One Free, pricing deals, price rules, bulk discounts, advanced discounts
5
  Requires at least: 4.4.1
6
  Tested up to: 4.9
7
- Stable tag: 1.5.4
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -241,6 +241,9 @@ Discount - Enter minimum & Maximum quantity -> Adjustment Type -> Product Discou
241
 
242
  == Changelog ==
243
 
 
 
 
244
  = 1.5.4 - 13/03/18 =
245
  * Fix - 500 error while having BOGO rules
246
 
4
  Tags: woocommerce, discounts, dynamic pricing, Buy One Get One Free, pricing deals, price rules, bulk discounts, advanced discounts
5
  Requires at least: 4.4.1
6
  Tested up to: 4.9
7
+ Stable tag: 1.5.5
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
241
 
242
  == Changelog ==
243
 
244
+ = 1.5.5 - 19/03/18 =
245
+ * Improvement - Cart rule UI content improvement
246
+
247
  = 1.5.4 - 13/03/18 =
248
  * Fix - 500 error while having BOGO rules
249
 
view/settings.php CHANGED
@@ -245,7 +245,7 @@ $isPro = (new FlycartWooDiscountRulesPurchase())->isPro();
245
  <label><input type="radio" name="do_not_run_while_have_third_party_coupon" value="0" <?php echo ($data['do_not_run_while_have_third_party_coupon'] == 0)? 'checked': '' ?> /> <?php esc_html_e('No', 'woo-discount-rules'); ?></label>
246
  </div>
247
  </div>
248
- <div class="row form-group">
249
  <div class="col-md-2">
250
  <label>
251
  <?php esc_html_e('Draft', 'woo-discount-rules'); ?>
245
  <label><input type="radio" name="do_not_run_while_have_third_party_coupon" value="0" <?php echo ($data['do_not_run_while_have_third_party_coupon'] == 0)? 'checked': '' ?> /> <?php esc_html_e('No', 'woo-discount-rules'); ?></label>
246
  </div>
247
  </div>
248
+ <div class="row form-group" style="display: none"><!-- Hide this because it is not required after v1.4.36 -->
249
  <div class="col-md-2">
250
  <label>
251
  <?php esc_html_e('Draft', 'woo-discount-rules'); ?>
view/view-cart-rules.php CHANGED
@@ -160,11 +160,11 @@ $isPro = (new FlycartWooDiscountRulesPurchase())->isPro();
160
  <optgroup label="Cart Item Count">
161
  <option
162
  value="item_count_least"<?php if ($type == 'item_count_least') { ?> selected=selected <?php } ?>>
163
- Count of cart items at least
164
  </option>
165
  <option
166
  value="item_count_less"<?php if ($type == 'item_count_less') { ?> selected=selected <?php } ?>>
167
- Count of cart items less than
168
  </option>
169
  </optgroup>
170
  <optgroup label="Quantity Sum">
@@ -173,10 +173,10 @@ $isPro = (new FlycartWooDiscountRulesPurchase())->isPro();
173
  }
174
  if ($type == 'quantity_least') { ?> selected=selected <?php } ?>>
175
  <?php if (!$pro) { ?>
176
- Sum of item quantities at least
177
  <b><?php echo $suffix; ?></b>
178
  <?php } else { ?>
179
- Sum of item quantities at least
180
  <?php } ?>
181
  </option>
182
 
@@ -185,10 +185,10 @@ $isPro = (new FlycartWooDiscountRulesPurchase())->isPro();
185
  }
186
  if ($type == 'quantity_less') { ?> selected=selected <?php } ?>>
187
  <?php if (!$pro) { ?>
188
- Sum of item quantities less than
189
  <b><?php echo $suffix; ?></b>
190
  <?php } else { ?>
191
- Sum of item quantities less than
192
  <?php } ?>
193
  </option>
194
  </optgroup>
160
  <optgroup label="Cart Item Count">
161
  <option
162
  value="item_count_least"<?php if ($type == 'item_count_least') { ?> selected=selected <?php } ?>>
163
+ Number of line items in the cart (not quantity) at least
164
  </option>
165
  <option
166
  value="item_count_less"<?php if ($type == 'item_count_less') { ?> selected=selected <?php } ?>>
167
+ Number of line items in the cart (not quantity) less than
168
  </option>
169
  </optgroup>
170
  <optgroup label="Quantity Sum">
173
  }
174
  if ($type == 'quantity_least') { ?> selected=selected <?php } ?>>
175
  <?php if (!$pro) { ?>
176
+ Total number of quantities in the cart at least
177
  <b><?php echo $suffix; ?></b>
178
  <?php } else { ?>
179
+ Total number of quantities in the cart at least
180
  <?php } ?>
181
  </option>
182
 
185
  }
186
  if ($type == 'quantity_less') { ?> selected=selected <?php } ?>>
187
  <?php if (!$pro) { ?>
188
+ Total number of quantities in the cart less than
189
  <b><?php echo $suffix; ?></b>
190
  <?php } else { ?>
191
+ Total number of quantities in the cart less than
192
  <?php } ?>
193
  </option>
194
  </optgroup>
woo-discount-rules.php CHANGED
@@ -5,7 +5,7 @@
5
  * Description: Simple Discount Rules for WooCommerce.
6
  * Author: Flycart Technologies LLP
7
  * Author URI: https://www.flycart.org
8
- * Version: 1.5.4
9
  * Slug: woo-discount-rules
10
  * Text Domain: woo-discount-rules
11
  * Requires at least: 4.6.1
5
  * Description: Simple Discount Rules for WooCommerce.
6
  * Author: Flycart Technologies LLP
7
  * Author URI: https://www.flycart.org
8
+ * Version: 1.5.5
9
  * Slug: woo-discount-rules
10
  * Text Domain: woo-discount-rules
11
  * Requires at least: 4.6.1