Discount Rules for WooCommerce - Version 1.6.1

Version Description

  • 22/05/18 =
  • Feature - Date and Time picker for start and end date fields
  • Fix - Reorder rule if order id already exists
  • Improvement - UI improvement
Download this release

Release Info

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

Code changes from version 1.6.0 to 1.6.1

assets/css/bootstrap-datetimepicker.min.css ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ * Datetimepicker for Bootstrap
3
+ *
4
+ * Copyright 2012 Stefan Petre
5
+ * Improvements by Andrew Rowls
6
+ * Licensed under the Apache License v2.0
7
+ * http://www.apache.org/licenses/LICENSE-2.0
8
+ *
9
+ */.datetimepicker{padding:4px;margin-top:1px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;direction:ltr}.datetimepicker-inline{width:220px}.datetimepicker.datetimepicker-rtl{direction:rtl}.datetimepicker.datetimepicker-rtl table tr td span{float:right}.datetimepicker-dropdown,.datetimepicker-dropdown-left{top:0;left:0}[class*=" datetimepicker-dropdown"]:before{content:'';display:inline-block;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-bottom-color:rgba(0,0,0,0.2);position:absolute}[class*=" datetimepicker-dropdown"]:after{content:'';display:inline-block;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #fff;position:absolute}[class*=" datetimepicker-dropdown-top"]:before{content:'';display:inline-block;border-left:7px solid transparent;border-right:7px solid transparent;border-top:7px solid #ccc;border-top-color:rgba(0,0,0,0.2);border-bottom:0}[class*=" datetimepicker-dropdown-top"]:after{content:'';display:inline-block;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #fff;border-bottom:0}.datetimepicker-dropdown-bottom-left:before{top:-7px;right:6px}.datetimepicker-dropdown-bottom-left:after{top:-6px;right:7px}.datetimepicker-dropdown-bottom-right:before{top:-7px;left:6px}.datetimepicker-dropdown-bottom-right:after{top:-6px;left:7px}.datetimepicker-dropdown-top-left:before{bottom:-7px;right:6px}.datetimepicker-dropdown-top-left:after{bottom:-6px;right:7px}.datetimepicker-dropdown-top-right:before{bottom:-7px;left:6px}.datetimepicker-dropdown-top-right:after{bottom:-6px;left:7px}.datetimepicker>div{display:none}.datetimepicker.minutes div.datetimepicker-minutes{display:block}.datetimepicker.hours div.datetimepicker-hours{display:block}.datetimepicker.days div.datetimepicker-days{display:block}.datetimepicker.months div.datetimepicker-months{display:block}.datetimepicker.years div.datetimepicker-years{display:block}.datetimepicker table{margin:0}.datetimepicker td,.datetimepicker th{text-align:center;width:20px;height:20px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;border:0}.table-striped .datetimepicker table tr td,.table-striped .datetimepicker table tr th{background-color:transparent}.datetimepicker table tr td.minute:hover{background:#eee;cursor:pointer}.datetimepicker table tr td.hour:hover{background:#eee;cursor:pointer}.datetimepicker table tr td.day:hover{background:#eee;cursor:pointer}.datetimepicker table tr td.old,.datetimepicker table tr td.new{color:#999}.datetimepicker table tr td.disabled,.datetimepicker table tr td.disabled:hover{background:0;color:#999;cursor:default}.datetimepicker table tr td.today,.datetimepicker table tr td.today:hover,.datetimepicker table tr td.today.disabled,.datetimepicker table tr td.today.disabled:hover{background-color:#fde19a;background-image:-moz-linear-gradient(top,#fdd49a,#fdf59a);background-image:-ms-linear-gradient(top,#fdd49a,#fdf59a);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fdd49a),to(#fdf59a));background-image:-webkit-linear-gradient(top,#fdd49a,#fdf59a);background-image:-o-linear-gradient(top,#fdd49a,#fdf59a);background-image:linear-gradient(to bottom,#fdd49a,#fdf59a);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fdd49a',endColorstr='#fdf59a',GradientType=0);border-color:#fdf59a #fdf59a #fbed50;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.datetimepicker table tr td.today:hover,.datetimepicker table tr td.today:hover:hover,.datetimepicker table tr td.today.disabled:hover,.datetimepicker table tr td.today.disabled:hover:hover,.datetimepicker table tr td.today:active,.datetimepicker table tr td.today:hover:active,.datetimepicker table tr td.today.disabled:active,.datetimepicker table tr td.today.disabled:hover:active,.datetimepicker table tr td.today.active,.datetimepicker table tr td.today:hover.active,.datetimepicker table tr td.today.disabled.active,.datetimepicker table tr td.today.disabled:hover.active,.datetimepicker table tr td.today.disabled,.datetimepicker table tr td.today:hover.disabled,.datetimepicker table tr td.today.disabled.disabled,.datetimepicker table tr td.today.disabled:hover.disabled,.datetimepicker table tr td.today[disabled],.datetimepicker table tr td.today:hover[disabled],.datetimepicker table tr td.today.disabled[disabled],.datetimepicker table tr td.today.disabled:hover[disabled]{background-color:#fdf59a}.datetimepicker table tr td.today:active,.datetimepicker table tr td.today:hover:active,.datetimepicker table tr td.today.disabled:active,.datetimepicker table tr td.today.disabled:hover:active,.datetimepicker table tr td.today.active,.datetimepicker table tr td.today:hover.active,.datetimepicker table tr td.today.disabled.active,.datetimepicker table tr td.today.disabled:hover.active{background-color:#fbf069}.datetimepicker table tr td.active,.datetimepicker table tr td.active:hover,.datetimepicker table tr td.active.disabled,.datetimepicker table tr td.active.disabled:hover{background-color:#006dcc;background-image:-moz-linear-gradient(top,#08c,#04c);background-image:-ms-linear-gradient(top,#08c,#04c);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#04c));background-image:-webkit-linear-gradient(top,#08c,#04c);background-image:-o-linear-gradient(top,#08c,#04c);background-image:linear-gradient(to bottom,#08c,#04c);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc',endColorstr='#0044cc',GradientType=0);border-color:#04c #04c #002a80;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25)}.datetimepicker table tr td.active:hover,.datetimepicker table tr td.active:hover:hover,.datetimepicker table tr td.active.disabled:hover,.datetimepicker table tr td.active.disabled:hover:hover,.datetimepicker table tr td.active:active,.datetimepicker table tr td.active:hover:active,.datetimepicker table tr td.active.disabled:active,.datetimepicker table tr td.active.disabled:hover:active,.datetimepicker table tr td.active.active,.datetimepicker table tr td.active:hover.active,.datetimepicker table tr td.active.disabled.active,.datetimepicker table tr td.active.disabled:hover.active,.datetimepicker table tr td.active.disabled,.datetimepicker table tr td.active:hover.disabled,.datetimepicker table tr td.active.disabled.disabled,.datetimepicker table tr td.active.disabled:hover.disabled,.datetimepicker table tr td.active[disabled],.datetimepicker table tr td.active:hover[disabled],.datetimepicker table tr td.active.disabled[disabled],.datetimepicker table tr td.active.disabled:hover[disabled]{background-color:#04c}.datetimepicker table tr td.active:active,.datetimepicker table tr td.active:hover:active,.datetimepicker table tr td.active.disabled:active,.datetimepicker table tr td.active.disabled:hover:active,.datetimepicker table tr td.active.active,.datetimepicker table tr td.active:hover.active,.datetimepicker table tr td.active.disabled.active,.datetimepicker table tr td.active.disabled:hover.active{background-color:#039}.datetimepicker table tr td span{display:block;width:23%;height:54px;line-height:54px;float:left;margin:1%;cursor:pointer;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.datetimepicker .datetimepicker-hours span{height:26px;line-height:26px}.datetimepicker .datetimepicker-hours table tr td span.hour_am,.datetimepicker .datetimepicker-hours table tr td span.hour_pm{width:14.6%}.datetimepicker .datetimepicker-hours fieldset legend,.datetimepicker .datetimepicker-minutes fieldset legend{margin-bottom:inherit;line-height:30px}.datetimepicker .datetimepicker-minutes span{height:26px;line-height:26px}.datetimepicker table tr td span:hover{background:#eee}.datetimepicker table tr td span.disabled,.datetimepicker table tr td span.disabled:hover{background:0;color:#999;cursor:default}.datetimepicker table tr td span.active,.datetimepicker table tr td span.active:hover,.datetimepicker table tr td span.active.disabled,.datetimepicker table tr td span.active.disabled:hover{background-color:#006dcc;background-image:-moz-linear-gradient(top,#08c,#04c);background-image:-ms-linear-gradient(top,#08c,#04c);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#04c));background-image:-webkit-linear-gradient(top,#08c,#04c);background-image:-o-linear-gradient(top,#08c,#04c);background-image:linear-gradient(to bottom,#08c,#04c);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc',endColorstr='#0044cc',GradientType=0);border-color:#04c #04c #002a80;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25)}.datetimepicker table tr td span.active:hover,.datetimepicker table tr td span.active:hover:hover,.datetimepicker table tr td span.active.disabled:hover,.datetimepicker table tr td span.active.disabled:hover:hover,.datetimepicker table tr td span.active:active,.datetimepicker table tr td span.active:hover:active,.datetimepicker table tr td span.active.disabled:active,.datetimepicker table tr td span.active.disabled:hover:active,.datetimepicker table tr td span.active.active,.datetimepicker table tr td span.active:hover.active,.datetimepicker table tr td span.active.disabled.active,.datetimepicker table tr td span.active.disabled:hover.active,.datetimepicker table tr td span.active.disabled,.datetimepicker table tr td span.active:hover.disabled,.datetimepicker table tr td span.active.disabled.disabled,.datetimepicker table tr td span.active.disabled:hover.disabled,.datetimepicker table tr td span.active[disabled],.datetimepicker table tr td span.active:hover[disabled],.datetimepicker table tr td span.active.disabled[disabled],.datetimepicker table tr td span.active.disabled:hover[disabled]{background-color:#04c}.datetimepicker table tr td span.active:active,.datetimepicker table tr td span.active:hover:active,.datetimepicker table tr td span.active.disabled:active,.datetimepicker table tr td span.active.disabled:hover:active,.datetimepicker table tr td span.active.active,.datetimepicker table tr td span.active:hover.active,.datetimepicker table tr td span.active.disabled.active,.datetimepicker table tr td span.active.disabled:hover.active{background-color:#039}.datetimepicker table tr td span.old{color:#999}.datetimepicker th.switch{width:145px}.datetimepicker th span.glyphicon{pointer-events:none}.datetimepicker thead tr:first-child th,.datetimepicker tfoot th{cursor:pointer}.datetimepicker thead tr:first-child th:hover,.datetimepicker tfoot th:hover{background:#eee}.input-append.date .add-on i,.input-prepend.date .add-on i,.input-group.date .input-group-addon span{cursor:pointer;width:14px;height:14px}
assets/js/app.js CHANGED
@@ -36,7 +36,14 @@ function trigger_woocommerce_tooltip(){
36
  var admin_url = $('#admin_path').val();
37
  var pro_suffix = $('#pro_suffix').val();
38
  var is_pro = $('#is_pro').val();
39
- $(".datepicker").datepicker();
 
 
 
 
 
 
 
40
 
41
  //--------------------------------------------------------------------------------------------------------------
42
  //--------------------------------------------PRICING RULES-----------------------------------------------------
@@ -74,13 +81,10 @@ function trigger_woocommerce_tooltip(){
74
  resizeChart = setTimeout(function () {
75
  current.val('Save Rule');
76
  }, 300);
77
- console.log(rule_id);
78
  // Reset, if its New Form.
79
  if (rule_id == 0) {
80
- console.log(admin_url);
81
  $('#form_price_rule')[0].reset();
82
-
83
- $(location).attr('href', admin_url);
84
  }
85
  adminNotice();
86
  }
@@ -223,12 +227,12 @@ function trigger_woocommerce_tooltip(){
223
  success: function (status) {
224
  // After Status Changed.
225
  if (status == 'Disable') {
226
- current.addClass('button-primary');
227
- current.removeClass('button-secondary');
228
  current.html('Enable');
229
  } else if (status == 'Publish') {
230
- current.removeClass('button-primary');
231
- current.addClass('button-secondary');
232
  current.html('Disable');
233
  }
234
  }
@@ -251,7 +255,7 @@ function trigger_woocommerce_tooltip(){
251
  success: function () {
252
  // After Removed.
253
  current.closest('tr').remove();
254
- location.reload();
255
  }
256
  });
257
  }
@@ -555,7 +559,7 @@ function trigger_woocommerce_tooltip(){
555
 
556
  // Reset, if its New Form.
557
  if (rule_id == 0) {
558
- $(location).attr('href', admin_url + '&tab=cart-rules');
559
  }
560
  adminNotice();
561
  }
@@ -591,12 +595,12 @@ function trigger_woocommerce_tooltip(){
591
  success: function (status) {
592
  // After Status Changed.
593
  if (status == 'Disable') {
594
- current.removeClass('button-primary');
595
- current.addClass('button-secondary');
596
  current.html('Enable');
597
  } else if (status == 'Publish') {
598
- current.addClass('button-primary');
599
- current.removeClass('button-secondary');
600
  current.html('Disable');
601
  }
602
  }
@@ -619,7 +623,7 @@ function trigger_woocommerce_tooltip(){
619
  success: function () {
620
  // After Removed.
621
  current.closest('tr').remove();
622
- location.reload();
623
  }
624
  });
625
  }
@@ -679,8 +683,6 @@ function trigger_woocommerce_tooltip(){
679
  console.log(ajax_url);
680
  var form = $('#discount_config').serialize();
681
  var current = $(this);
682
- current.removeClass('button-primary');
683
- current.addClass('button-secondary');
684
  current.val('Saving...');
685
  $.ajax({
686
  url: ajax_url,
@@ -689,9 +691,7 @@ function trigger_woocommerce_tooltip(){
689
  success: function () {
690
  // After Removed.
691
  resizeChart = setTimeout(function () {
692
- current.addClass('button-primary');
693
- current.removeClass('button-secondary');
694
- current.val('Save Rule');
695
  }, 300);
696
  adminNotice();
697
  }
36
  var admin_url = $('#admin_path').val();
37
  var pro_suffix = $('#pro_suffix').val();
38
  var is_pro = $('#is_pro').val();
39
+ // $(".datepicker").datepicker();
40
+ $(".datepicker").datetimepicker({
41
+ //format: "dd MM yyyy - hh:ii",
42
+ format: "mm/dd/yyyy hh:ii",
43
+ autoclose: true,
44
+ todayBtn: true,
45
+ pickerPosition: "top-right"
46
+ });
47
 
48
  //--------------------------------------------------------------------------------------------------------------
49
  //--------------------------------------------PRICING RULES-----------------------------------------------------
81
  resizeChart = setTimeout(function () {
82
  current.val('Save Rule');
83
  }, 300);
 
84
  // Reset, if its New Form.
85
  if (rule_id == 0) {
 
86
  $('#form_price_rule')[0].reset();
87
+ window.location.replace(admin_url);
 
88
  }
89
  adminNotice();
90
  }
227
  success: function (status) {
228
  // After Status Changed.
229
  if (status == 'Disable') {
230
+ current.addClass('btn-success');
231
+ current.removeClass('btn-warning');
232
  current.html('Enable');
233
  } else if (status == 'Publish') {
234
+ current.removeClass('btn-success');
235
+ current.addClass('btn-warning');
236
  current.html('Disable');
237
  }
238
  }
255
  success: function () {
256
  // After Removed.
257
  current.closest('tr').remove();
258
+ location.reload(true);
259
  }
260
  });
261
  }
559
 
560
  // Reset, if its New Form.
561
  if (rule_id == 0) {
562
+ window.location.replace(admin_url + '&tab=cart-rules');
563
  }
564
  adminNotice();
565
  }
595
  success: function (status) {
596
  // After Status Changed.
597
  if (status == 'Disable') {
598
+ current.removeClass('btn-warning');
599
+ current.addClass('btn-success');
600
  current.html('Enable');
601
  } else if (status == 'Publish') {
602
+ current.addClass('btn-warning');
603
+ current.removeClass('btn-success');
604
  current.html('Disable');
605
  }
606
  }
623
  success: function () {
624
  // After Removed.
625
  current.closest('tr').remove();
626
+ location.reload(true);
627
  }
628
  });
629
  }
683
  console.log(ajax_url);
684
  var form = $('#discount_config').serialize();
685
  var current = $(this);
 
 
686
  current.val('Saving...');
687
  $.ajax({
688
  url: ajax_url,
691
  success: function () {
692
  // After Removed.
693
  resizeChart = setTimeout(function () {
694
+ current.val('Save');
 
 
695
  }, 300);
696
  adminNotice();
697
  }
assets/js/bootstrap-datetimepicker.min.js ADDED
@@ -0,0 +1 @@
 
1
+ (function(a){if(typeof define==="function"&&define.amd){define(["jquery"],a)}else{if(typeof exports==="object"){a(require("jquery"))}else{a(jQuery)}}}(function(d,f){if(!("indexOf" in Array.prototype)){Array.prototype.indexOf=function(k,j){if(j===f){j=0}if(j<0){j+=this.length}if(j<0){j=0}for(var l=this.length;j<l;j++){if(j in this&&this[j]===k){return j}}return -1}}function a(){var q,k,p,l,j,n,m,o;k=(new Date()).toString();p=((m=k.split("(")[1])!=null?m.slice(0,-1):0)||k.split(" ");if(p instanceof Array){n=[];for(var l=0,j=p.length;l<j;l++){o=p[l];if((q=(m=o.match(/\b[A-Z]+\b/))!==null)?m[0]:0){n.push(q)}}p=n.pop()}return p}function h(){return new Date(Date.UTC.apply(Date,arguments))}var g=function(k,j){var m=this;this.element=d(k);this.container=j.container||"body";this.language=j.language||this.element.data("date-language")||"en";this.language=this.language in e?this.language:this.language.split("-")[0];this.language=this.language in e?this.language:"en";this.isRTL=e[this.language].rtl||false;this.formatType=j.formatType||this.element.data("format-type")||"standard";this.format=c.parseFormat(j.format||this.element.data("date-format")||e[this.language].format||c.getDefaultFormat(this.formatType,"input"),this.formatType);this.isInline=false;this.isVisible=false;this.isInput=this.element.is("input");this.fontAwesome=j.fontAwesome||this.element.data("font-awesome")||false;this.bootcssVer=j.bootcssVer||(this.isInput?(this.element.is(".form-control")?3:2):(this.bootcssVer=this.element.is(".input-group")?3:2));this.component=this.element.is(".date")?(this.bootcssVer===3?this.element.find(".input-group-addon .glyphicon-th, .input-group-addon .glyphicon-time, .input-group-addon .glyphicon-remove, .input-group-addon .glyphicon-calendar, .input-group-addon .fa-calendar, .input-group-addon .fa-clock-o").parent():this.element.find(".add-on .icon-th, .add-on .icon-time, .add-on .icon-calendar, .add-on .fa-calendar, .add-on .fa-clock-o").parent()):false;this.componentReset=this.element.is(".date")?(this.bootcssVer===3?this.element.find(".input-group-addon .glyphicon-remove, .input-group-addon .fa-times").parent():this.element.find(".add-on .icon-remove, .add-on .fa-times").parent()):false;this.hasInput=this.component&&this.element.find("input").length;if(this.component&&this.component.length===0){this.component=false}this.linkField=j.linkField||this.element.data("link-field")||false;this.linkFormat=c.parseFormat(j.linkFormat||this.element.data("link-format")||c.getDefaultFormat(this.formatType,"link"),this.formatType);this.minuteStep=j.minuteStep||this.element.data("minute-step")||5;this.pickerPosition=j.pickerPosition||this.element.data("picker-position")||"bottom-right";this.showMeridian=j.showMeridian||this.element.data("show-meridian")||false;this.initialDate=j.initialDate||new Date();this.zIndex=j.zIndex||this.element.data("z-index")||f;this.title=typeof j.title==="undefined"?false:j.title;this.timezone=j.timezone||a();this.icons={leftArrow:this.fontAwesome?"fa-arrow-left":(this.bootcssVer===3?"glyphicon-arrow-left":"icon-arrow-left"),rightArrow:this.fontAwesome?"fa-arrow-right":(this.bootcssVer===3?"glyphicon-arrow-right":"icon-arrow-right")};this.icontype=this.fontAwesome?"fa":"glyphicon";this._attachEvents();this.clickedOutside=function(n){if(d(n.target).closest(".datetimepicker").length===0){m.hide()}};this.formatViewType="datetime";if("formatViewType" in j){this.formatViewType=j.formatViewType}else{if("formatViewType" in this.element.data()){this.formatViewType=this.element.data("formatViewType")}}this.minView=0;if("minView" in j){this.minView=j.minView}else{if("minView" in this.element.data()){this.minView=this.element.data("min-view")}}this.minView=c.convertViewMode(this.minView);this.maxView=c.modes.length-1;if("maxView" in j){this.maxView=j.maxView}else{if("maxView" in this.element.data()){this.maxView=this.element.data("max-view")}}this.maxView=c.convertViewMode(this.maxView);this.wheelViewModeNavigation=false;if("wheelViewModeNavigation" in j){this.wheelViewModeNavigation=j.wheelViewModeNavigation}else{if("wheelViewModeNavigation" in this.element.data()){this.wheelViewModeNavigation=this.element.data("view-mode-wheel-navigation")}}this.wheelViewModeNavigationInverseDirection=false;if("wheelViewModeNavigationInverseDirection" in j){this.wheelViewModeNavigationInverseDirection=j.wheelViewModeNavigationInverseDirection}else{if("wheelViewModeNavigationInverseDirection" in this.element.data()){this.wheelViewModeNavigationInverseDirection=this.element.data("view-mode-wheel-navigation-inverse-dir")}}this.wheelViewModeNavigationDelay=100;if("wheelViewModeNavigationDelay" in j){this.wheelViewModeNavigationDelay=j.wheelViewModeNavigationDelay}else{if("wheelViewModeNavigationDelay" in this.element.data()){this.wheelViewModeNavigationDelay=this.element.data("view-mode-wheel-navigation-delay")}}this.startViewMode=2;if("startView" in j){this.startViewMode=j.startView}else{if("startView" in this.element.data()){this.startViewMode=this.element.data("start-view")}}this.startViewMode=c.convertViewMode(this.startViewMode);this.viewMode=this.startViewMode;this.viewSelect=this.minView;if("viewSelect" in j){this.viewSelect=j.viewSelect}else{if("viewSelect" in this.element.data()){this.viewSelect=this.element.data("view-select")}}this.viewSelect=c.convertViewMode(this.viewSelect);this.forceParse=true;if("forceParse" in j){this.forceParse=j.forceParse}else{if("dateForceParse" in this.element.data()){this.forceParse=this.element.data("date-force-parse")}}var l=this.bootcssVer===3?c.templateV3:c.template;while(l.indexOf("{iconType}")!==-1){l=l.replace("{iconType}",this.icontype)}while(l.indexOf("{leftArrow}")!==-1){l=l.replace("{leftArrow}",this.icons.leftArrow)}while(l.indexOf("{rightArrow}")!==-1){l=l.replace("{rightArrow}",this.icons.rightArrow)}this.picker=d(l).appendTo(this.isInline?this.element:this.container).on({click:d.proxy(this.click,this),mousedown:d.proxy(this.mousedown,this)});if(this.wheelViewModeNavigation){if(d.fn.mousewheel){this.picker.on({mousewheel:d.proxy(this.mousewheel,this)})}else{console.log("Mouse Wheel event is not supported. Please include the jQuery Mouse Wheel plugin before enabling this option")}}if(this.isInline){this.picker.addClass("datetimepicker-inline")}else{this.picker.addClass("datetimepicker-dropdown-"+this.pickerPosition+" dropdown-menu")}if(this.isRTL){this.picker.addClass("datetimepicker-rtl");var i=this.bootcssVer===3?".prev span, .next span":".prev i, .next i";this.picker.find(i).toggleClass(this.icons.leftArrow+" "+this.icons.rightArrow)}d(document).on("mousedown touchend",this.clickedOutside);this.autoclose=false;if("autoclose" in j){this.autoclose=j.autoclose}else{if("dateAutoclose" in this.element.data()){this.autoclose=this.element.data("date-autoclose")}}this.keyboardNavigation=true;if("keyboardNavigation" in j){this.keyboardNavigation=j.keyboardNavigation}else{if("dateKeyboardNavigation" in this.element.data()){this.keyboardNavigation=this.element.data("date-keyboard-navigation")}}this.todayBtn=(j.todayBtn||this.element.data("date-today-btn")||false);this.clearBtn=(j.clearBtn||this.element.data("date-clear-btn")||false);this.todayHighlight=(j.todayHighlight||this.element.data("date-today-highlight")||false);this.weekStart=0;if(typeof j.weekStart!=="undefined"){this.weekStart=j.weekStart}else{if(typeof this.element.data("date-weekstart")!=="undefined"){this.weekStart=this.element.data("date-weekstart")}else{if(typeof e[this.language].weekStart!=="undefined"){this.weekStart=e[this.language].weekStart}}}this.weekStart=this.weekStart%7;this.weekEnd=((this.weekStart+6)%7);this.onRenderDay=function(n){var p=(j.onRenderDay||function(){return[]})(n);if(typeof p==="string"){p=[p]}var o=["day"];return o.concat((p?p:[]))};this.onRenderHour=function(n){var p=(j.onRenderHour||function(){return[]})(n);var o=["hour"];if(typeof p==="string"){p=[p]}return o.concat((p?p:[]))};this.onRenderMinute=function(n){var p=(j.onRenderMinute||function(){return[]})(n);var o=["minute"];if(typeof p==="string"){p=[p]}if(n<this.startDate||n>this.endDate){o.push("disabled")}else{if(Math.floor(this.date.getUTCMinutes()/this.minuteStep)===Math.floor(n.getUTCMinutes()/this.minuteStep)){o.push("active")}}return o.concat((p?p:[]))};this.onRenderYear=function(o){var q=(j.onRenderYear||function(){return[]})(o);var p=["year"];if(typeof q==="string"){q=[q]}if(this.date.getUTCFullYear()===o.getUTCFullYear()){p.push("active")}var n=o.getUTCFullYear();var r=this.endDate.getUTCFullYear();if(o<this.startDate||n>r){p.push("disabled")}return p.concat((q?q:[]))};this.onRenderMonth=function(n){var p=(j.onRenderMonth||function(){return[]})(n);var o=["month"];if(typeof p==="string"){p=[p]}return o.concat((p?p:[]))};this.startDate=new Date(-8639968443048000);this.endDate=new Date(8639968443048000);this.datesDisabled=[];this.daysOfWeekDisabled=[];this.setStartDate(j.startDate||this.element.data("date-startdate"));this.setEndDate(j.endDate||this.element.data("date-enddate"));this.setDatesDisabled(j.datesDisabled||this.element.data("date-dates-disabled"));this.setDaysOfWeekDisabled(j.daysOfWeekDisabled||this.element.data("date-days-of-week-disabled"));this.setMinutesDisabled(j.minutesDisabled||this.element.data("date-minute-disabled"));this.setHoursDisabled(j.hoursDisabled||this.element.data("date-hour-disabled"));this.fillDow();this.fillMonths();this.update();this.showMode();if(this.isInline){this.show()}};g.prototype={constructor:g,_events:[],_attachEvents:function(){this._detachEvents();if(this.isInput){this._events=[[this.element,{focus:d.proxy(this.show,this),keyup:d.proxy(this.update,this),keydown:d.proxy(this.keydown,this)}]]}else{if(this.component&&this.hasInput){this._events=[[this.element.find("input"),{focus:d.proxy(this.show,this),keyup:d.proxy(this.update,this),keydown:d.proxy(this.keydown,this)}],[this.component,{click:d.proxy(this.show,this)}]];if(this.componentReset){this._events.push([this.componentReset,{click:d.proxy(this.reset,this)}])}}else{if(this.element.is("div")){this.isInline=true}else{this._events=[[this.element,{click:d.proxy(this.show,this)}]]}}}for(var j=0,k,l;j<this._events.length;j++){k=this._events[j][0];l=this._events[j][1];k.on(l)}},_detachEvents:function(){for(var j=0,k,l;j<this._events.length;j++){k=this._events[j][0];l=this._events[j][1];k.off(l)}this._events=[]},show:function(i){this.picker.show();this.height=this.component?this.component.outerHeight():this.element.outerHeight();if(this.forceParse){this.update()}this.place();d(window).on("resize",d.proxy(this.place,this));if(i){i.stopPropagation();i.preventDefault()}this.isVisible=true;this.element.trigger({type:"show",date:this.date})},hide:function(){if(!this.isVisible){return}if(this.isInline){return}this.picker.hide();d(window).off("resize",this.place);this.viewMode=this.startViewMode;this.showMode();if(!this.isInput){d(document).off("mousedown",this.hide)}if(this.forceParse&&(this.isInput&&this.element.val()||this.hasInput&&this.element.find("input").val())){this.setValue()}this.isVisible=false;this.element.trigger({type:"hide",date:this.date})},remove:function(){this._detachEvents();d(document).off("mousedown",this.clickedOutside);this.picker.remove();delete this.picker;delete this.element.data().datetimepicker},getDate:function(){var i=this.getUTCDate();if(i===null){return null}return new Date(i.getTime()+(i.getTimezoneOffset()*60000))},getUTCDate:function(){return this.date},getInitialDate:function(){return this.initialDate},setInitialDate:function(i){this.initialDate=i},setDate:function(i){this.setUTCDate(new Date(i.getTime()-(i.getTimezoneOffset()*60000)))},setUTCDate:function(i){if(i>=this.startDate&&i<=this.endDate){this.date=i;this.setValue();this.viewDate=this.date;this.fill()}else{this.element.trigger({type:"outOfRange",date:i,startDate:this.startDate,endDate:this.endDate})}},setFormat:function(j){this.format=c.parseFormat(j,this.formatType);var i;if(this.isInput){i=this.element}else{if(this.component){i=this.element.find("input")}}if(i&&i.val()){this.setValue()}},setValue:function(){var i=this.getFormattedDate();if(!this.isInput){if(this.component){this.element.find("input").val(i)}this.element.data("date",i)}else{this.element.val(i)}if(this.linkField){d("#"+this.linkField).val(this.getFormattedDate(this.linkFormat))}},getFormattedDate:function(i){i=i||this.format;return c.formatDate(this.date,i,this.language,this.formatType,this.timezone)},setStartDate:function(i){this.startDate=i||this.startDate;if(this.startDate.valueOf()!==8639968443048000){this.startDate=c.parseDate(this.startDate,this.format,this.language,this.formatType,this.timezone)}this.update();this.updateNavArrows()},setEndDate:function(i){this.endDate=i||this.endDate;if(this.endDate.valueOf()!==8639968443048000){this.endDate=c.parseDate(this.endDate,this.format,this.language,this.formatType,this.timezone)}this.update();this.updateNavArrows()},setDatesDisabled:function(j){this.datesDisabled=j||[];if(!d.isArray(this.datesDisabled)){this.datesDisabled=this.datesDisabled.split(/,\s*/)}var i=this;this.datesDisabled=d.map(this.datesDisabled,function(k){return c.parseDate(k,i.format,i.language,i.formatType,i.timezone).toDateString()});this.update();this.updateNavArrows()},setTitle:function(i,j){return this.picker.find(i).find("th:eq(1)").text(this.title===false?j:this.title)},setDaysOfWeekDisabled:function(i){this.daysOfWeekDisabled=i||[];if(!d.isArray(this.daysOfWeekDisabled)){this.daysOfWeekDisabled=this.daysOfWeekDisabled.split(/,\s*/)}this.daysOfWeekDisabled=d.map(this.daysOfWeekDisabled,function(j){return parseInt(j,10)});this.update();this.updateNavArrows()},setMinutesDisabled:function(i){this.minutesDisabled=i||[];if(!d.isArray(this.minutesDisabled)){this.minutesDisabled=this.minutesDisabled.split(/,\s*/)}this.minutesDisabled=d.map(this.minutesDisabled,function(j){return parseInt(j,10)});this.update();this.updateNavArrows()},setHoursDisabled:function(i){this.hoursDisabled=i||[];if(!d.isArray(this.hoursDisabled)){this.hoursDisabled=this.hoursDisabled.split(/,\s*/)}this.hoursDisabled=d.map(this.hoursDisabled,function(j){return parseInt(j,10)});this.update();this.updateNavArrows()},place:function(){if(this.isInline){return}if(!this.zIndex){var j=0;d("div").each(function(){var o=parseInt(d(this).css("zIndex"),10);if(o>j){j=o}});this.zIndex=j+10}var n,m,l,k;if(this.container instanceof d){k=this.container.offset()}else{k=d(this.container).offset()}if(this.component){n=this.component.offset();l=n.left;if(this.pickerPosition==="bottom-left"||this.pickerPosition==="top-left"){l+=this.component.outerWidth()-this.picker.outerWidth()}}else{n=this.element.offset();l=n.left;if(this.pickerPosition==="bottom-left"||this.pickerPosition==="top-left"){l+=this.element.outerWidth()-this.picker.outerWidth()}}var i=document.body.clientWidth||window.innerWidth;if(l+220>i){l=i-220}if(this.pickerPosition==="top-left"||this.pickerPosition==="top-right"){m=n.top-this.picker.outerHeight()}else{m=n.top+this.height}m=m-k.top;l=l-k.left;this.picker.css({top:m,left:l,zIndex:this.zIndex})},hour_minute:"^([0-9]|0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]",update:function(){var i,j=false;if(arguments&&arguments.length&&(typeof arguments[0]==="string"||arguments[0] instanceof Date)){i=arguments[0];j=true}else{i=(this.isInput?this.element.val():this.element.find("input").val())||this.element.data("date")||this.initialDate;if(typeof i==="string"){i=i.replace(/^\s+|\s+$/g,"")}}if(!i){i=new Date();j=false}if(typeof i==="string"){if(new RegExp(this.hour_minute).test(i)||new RegExp(this.hour_minute+":[0-5][0-9]").test(i)){i=this.getDate()}}this.date=c.parseDate(i,this.format,this.language,this.formatType,this.timezone);if(j){this.setValue()}if(this.date<this.startDate){this.viewDate=new Date(this.startDate)}else{if(this.date>this.endDate){this.viewDate=new Date(this.endDate)}else{this.viewDate=new Date(this.date)}}this.fill()},fillDow:function(){var i=this.weekStart,j="<tr>";while(i<this.weekStart+7){j+='<th class="dow">'+e[this.language].daysMin[(i++)%7]+"</th>"}j+="</tr>";this.picker.find(".datetimepicker-days thead").append(j)},fillMonths:function(){var l="";var m=new Date(this.viewDate);for(var k=0;k<12;k++){m.setUTCMonth(k);var j=this.onRenderMonth(m);l+='<span class="'+j.join(" ")+'">'+e[this.language].monthsShort[k]+"</span>"}this.picker.find(".datetimepicker-months td").html(l)},fill:function(){if(!this.date||!this.viewDate){return}var E=new Date(this.viewDate),t=E.getUTCFullYear(),G=E.getUTCMonth(),n=E.getUTCDate(),A=E.getUTCHours(),w=this.startDate.getUTCFullYear(),B=this.startDate.getUTCMonth(),p=this.endDate.getUTCFullYear(),x=this.endDate.getUTCMonth()+1,q=(new h(this.date.getUTCFullYear(),this.date.getUTCMonth(),this.date.getUTCDate())).valueOf(),D=new Date();this.setTitle(".datetimepicker-days",e[this.language].months[G]+" "+t);if(this.formatViewType==="time"){var k=this.getFormattedDate();this.setTitle(".datetimepicker-hours",k);this.setTitle(".datetimepicker-minutes",k)}else{this.setTitle(".datetimepicker-hours",n+" "+e[this.language].months[G]+" "+t);this.setTitle(".datetimepicker-minutes",n+" "+e[this.language].months[G]+" "+t)}this.picker.find("tfoot th.today").text(e[this.language].today||e.en.today).toggle(this.todayBtn!==false);this.picker.find("tfoot th.clear").text(e[this.language].clear||e.en.clear).toggle(this.clearBtn!==false);this.updateNavArrows();this.fillMonths();var I=h(t,G-1,28,0,0,0,0),z=c.getDaysInMonth(I.getUTCFullYear(),I.getUTCMonth());I.setUTCDate(z);I.setUTCDate(z-(I.getUTCDay()-this.weekStart+7)%7);var j=new Date(I);j.setUTCDate(j.getUTCDate()+42);j=j.valueOf();var r=[];var F;while(I.valueOf()<j){if(I.getUTCDay()===this.weekStart){r.push("<tr>")}F=this.onRenderDay(I);if(I.getUTCFullYear()<t||(I.getUTCFullYear()===t&&I.getUTCMonth()<G)){F.push("old")}else{if(I.getUTCFullYear()>t||(I.getUTCFullYear()===t&&I.getUTCMonth()>G)){F.push("new")}}if(this.todayHighlight&&I.getUTCFullYear()===D.getFullYear()&&I.getUTCMonth()===D.getMonth()&&I.getUTCDate()===D.getDate()){F.push("today")}if(I.valueOf()===q){F.push("active")}if((I.valueOf()+86400000)<=this.startDate||I.valueOf()>this.endDate||d.inArray(I.getUTCDay(),this.daysOfWeekDisabled)!==-1||d.inArray(I.toDateString(),this.datesDisabled)!==-1){F.push("disabled")}r.push('<td class="'+F.join(" ")+'">'+I.getUTCDate()+"</td>");if(I.getUTCDay()===this.weekEnd){r.push("</tr>")}I.setUTCDate(I.getUTCDate()+1)}this.picker.find(".datetimepicker-days tbody").empty().append(r.join(""));r=[];var u="",C="",s="";var l=this.hoursDisabled||[];E=new Date(this.viewDate);for(var y=0;y<24;y++){E.setUTCHours(y);F=this.onRenderHour(E);if(l.indexOf(y)!==-1){F.push("disabled")}var v=h(t,G,n,y);if((v.valueOf()+3600000)<=this.startDate||v.valueOf()>this.endDate){F.push("disabled")}else{if(A===y){F.push("active")}}if(this.showMeridian&&e[this.language].meridiem.length===2){C=(y<12?e[this.language].meridiem[0]:e[this.language].meridiem[1]);if(C!==s){if(s!==""){r.push("</fieldset>")}r.push('<fieldset class="hour"><legend>'+C.toUpperCase()+"</legend>")}s=C;u=(y%12?y%12:12);if(y<12){F.push("hour_am")}else{F.push("hour_pm")}r.push('<span class="'+F.join(" ")+'">'+u+"</span>");if(y===23){r.push("</fieldset>")}}else{u=y+":00";r.push('<span class="'+F.join(" ")+'">'+u+"</span>")}}this.picker.find(".datetimepicker-hours td").html(r.join(""));r=[];u="";C="";s="";var m=this.minutesDisabled||[];E=new Date(this.viewDate);for(var y=0;y<60;y+=this.minuteStep){if(m.indexOf(y)!==-1){continue}E.setUTCMinutes(y);E.setUTCSeconds(0);F=this.onRenderMinute(E);if(this.showMeridian&&e[this.language].meridiem.length===2){C=(A<12?e[this.language].meridiem[0]:e[this.language].meridiem[1]);if(C!==s){if(s!==""){r.push("</fieldset>")}r.push('<fieldset class="minute"><legend>'+C.toUpperCase()+"</legend>")}s=C;u=(A%12?A%12:12);r.push('<span class="'+F.join(" ")+'">'+u+":"+(y<10?"0"+y:y)+"</span>");if(y===59){r.push("</fieldset>")}}else{u=y+":00";r.push('<span class="'+F.join(" ")+'">'+A+":"+(y<10?"0"+y:y)+"</span>")}}this.picker.find(".datetimepicker-minutes td").html(r.join(""));var J=this.date.getUTCFullYear();var o=this.setTitle(".datetimepicker-months",t).end().find(".month").removeClass("active");if(J===t){o.eq(this.date.getUTCMonth()).addClass("active")}if(t<w||t>p){o.addClass("disabled")}if(t===w){o.slice(0,B).addClass("disabled")}if(t===p){o.slice(x).addClass("disabled")}r="";t=parseInt(t/10,10)*10;var H=this.setTitle(".datetimepicker-years",t+"-"+(t+9)).end().find("td");t-=1;E=new Date(this.viewDate);for(var y=-1;y<11;y++){E.setUTCFullYear(t);F=this.onRenderYear(E);if(y===-1||y===10){F.push(b)}r+='<span class="'+F.join(" ")+'">'+t+"</span>";t+=1}H.html(r);this.place()},updateNavArrows:function(){var m=new Date(this.viewDate),k=m.getUTCFullYear(),l=m.getUTCMonth(),j=m.getUTCDate(),i=m.getUTCHours();switch(this.viewMode){case 0:if(k<=this.startDate.getUTCFullYear()&&l<=this.startDate.getUTCMonth()&&j<=this.startDate.getUTCDate()&&i<=this.startDate.getUTCHours()){this.picker.find(".prev").css({visibility:"hidden"})}else{this.picker.find(".prev").css({visibility:"visible"})}if(k>=this.endDate.getUTCFullYear()&&l>=this.endDate.getUTCMonth()&&j>=this.endDate.getUTCDate()&&i>=this.endDate.getUTCHours()){this.picker.find(".next").css({visibility:"hidden"})}else{this.picker.find(".next").css({visibility:"visible"})}break;case 1:if(k<=this.startDate.getUTCFullYear()&&l<=this.startDate.getUTCMonth()&&j<=this.startDate.getUTCDate()){this.picker.find(".prev").css({visibility:"hidden"})}else{this.picker.find(".prev").css({visibility:"visible"})}if(k>=this.endDate.getUTCFullYear()&&l>=this.endDate.getUTCMonth()&&j>=this.endDate.getUTCDate()){this.picker.find(".next").css({visibility:"hidden"})}else{this.picker.find(".next").css({visibility:"visible"})}break;case 2:if(k<=this.startDate.getUTCFullYear()&&l<=this.startDate.getUTCMonth()){this.picker.find(".prev").css({visibility:"hidden"})}else{this.picker.find(".prev").css({visibility:"visible"})}if(k>=this.endDate.getUTCFullYear()&&l>=this.endDate.getUTCMonth()){this.picker.find(".next").css({visibility:"hidden"})}else{this.picker.find(".next").css({visibility:"visible"})}break;case 3:case 4:if(k<=this.startDate.getUTCFullYear()){this.picker.find(".prev").css({visibility:"hidden"})}else{this.picker.find(".prev").css({visibility:"visible"})}if(k>=this.endDate.getUTCFullYear()){this.picker.find(".next").css({visibility:"hidden"})}else{this.picker.find(".next").css({visibility:"visible"})}break}},mousewheel:function(j){j.preventDefault();j.stopPropagation();if(this.wheelPause){return}this.wheelPause=true;var i=j.originalEvent;var l=i.wheelDelta;var k=l>0?1:(l===0)?0:-1;if(this.wheelViewModeNavigationInverseDirection){k=-k}this.showMode(k);setTimeout(d.proxy(function(){this.wheelPause=false},this),this.wheelViewModeNavigationDelay)},click:function(m){m.stopPropagation();m.preventDefault();var n=d(m.target).closest("span, td, th, legend");if(n.is("."+this.icontype)){n=d(n).parent().closest("span, td, th, legend")}if(n.length===1){if(n.is(".disabled")){this.element.trigger({type:"outOfRange",date:this.viewDate,startDate:this.startDate,endDate:this.endDate});return}switch(n[0].nodeName.toLowerCase()){case"th":switch(n[0].className){case"switch":this.showMode(1);break;case"prev":case"next":var i=c.modes[this.viewMode].navStep*(n[0].className==="prev"?-1:1);switch(this.viewMode){case 0:this.viewDate=this.moveHour(this.viewDate,i);break;case 1:this.viewDate=this.moveDate(this.viewDate,i);break;case 2:this.viewDate=this.moveMonth(this.viewDate,i);break;case 3:case 4:this.viewDate=this.moveYear(this.viewDate,i);break}this.fill();this.element.trigger({type:n[0].className+":"+this.convertViewModeText(this.viewMode),date:this.viewDate,startDate:this.startDate,endDate:this.endDate});break;case"clear":this.reset();if(this.autoclose){this.hide()}break;case"today":var j=new Date();j=h(j.getFullYear(),j.getMonth(),j.getDate(),j.getHours(),j.getMinutes(),j.getSeconds(),0);if(j<this.startDate){j=this.startDate}else{if(j>this.endDate){j=this.endDate}}this.viewMode=this.startViewMode;this.showMode(0);this._setDate(j);this.fill();if(this.autoclose){this.hide()}break}break;case"span":if(!n.is(".disabled")){var p=this.viewDate.getUTCFullYear(),o=this.viewDate.getUTCMonth(),q=this.viewDate.getUTCDate(),r=this.viewDate.getUTCHours(),k=this.viewDate.getUTCMinutes(),s=this.viewDate.getUTCSeconds();if(n.is(".month")){this.viewDate.setUTCDate(1);o=n.parent().find("span").index(n);q=this.viewDate.getUTCDate();this.viewDate.setUTCMonth(o);this.element.trigger({type:"changeMonth",date:this.viewDate});if(this.viewSelect>=3){this._setDate(h(p,o,q,r,k,s,0))}}else{if(n.is(".year")){this.viewDate.setUTCDate(1);p=parseInt(n.text(),10)||0;this.viewDate.setUTCFullYear(p);this.element.trigger({type:"changeYear",date:this.viewDate});if(this.viewSelect>=4){this._setDate(h(p,o,q,r,k,s,0))}}else{if(n.is(".hour")){r=parseInt(n.text(),10)||0;if(n.hasClass("hour_am")||n.hasClass("hour_pm")){if(r===12&&n.hasClass("hour_am")){r=0}else{if(r!==12&&n.hasClass("hour_pm")){r+=12}}}this.viewDate.setUTCHours(r);this.element.trigger({type:"changeHour",date:this.viewDate});if(this.viewSelect>=1){this._setDate(h(p,o,q,r,k,s,0))}}else{if(n.is(".minute")){k=parseInt(n.text().substr(n.text().indexOf(":")+1),10)||0;this.viewDate.setUTCMinutes(k);this.element.trigger({type:"changeMinute",date:this.viewDate});if(this.viewSelect>=0){this._setDate(h(p,o,q,r,k,s,0))}}}}}if(this.viewMode!==0){var l=this.viewMode;this.showMode(-1);this.fill();if(l===this.viewMode&&this.autoclose){this.hide()}}else{this.fill();if(this.autoclose){this.hide()}}}break;case"td":if(n.is(".day")&&!n.is(".disabled")){var q=parseInt(n.text(),10)||1;var p=this.viewDate.getUTCFullYear(),o=this.viewDate.getUTCMonth(),r=this.viewDate.getUTCHours(),k=this.viewDate.getUTCMinutes(),s=this.viewDate.getUTCSeconds();if(n.is(".old")){if(o===0){o=11;p-=1}else{o-=1}}else{if(n.is(".new")){if(o===11){o=0;p+=1}else{o+=1}}}this.viewDate.setUTCFullYear(p);this.viewDate.setUTCMonth(o,q);this.element.trigger({type:"changeDay",date:this.viewDate});if(this.viewSelect>=2){this._setDate(h(p,o,q,r,k,s,0))}}var l=this.viewMode;this.showMode(-1);this.fill();if(l===this.viewMode&&this.autoclose){this.hide()}break}}},_setDate:function(i,k){if(!k||k==="date"){this.date=i}if(!k||k==="view"){this.viewDate=i}this.fill();this.setValue();var j;if(this.isInput){j=this.element}else{if(this.component){j=this.element.find("input")}}if(j){j.change()}this.element.trigger({type:"changeDate",date:this.getDate()});if(i===null){this.date=this.viewDate}},moveMinute:function(j,i){if(!i){return j}var k=new Date(j.valueOf());k.setUTCMinutes(k.getUTCMinutes()+(i*this.minuteStep));return k},moveHour:function(j,i){if(!i){return j}var k=new Date(j.valueOf());k.setUTCHours(k.getUTCHours()+i);return k},moveDate:function(j,i){if(!i){return j}var k=new Date(j.valueOf());k.setUTCDate(k.getUTCDate()+i);return k},moveMonth:function(j,k){if(!k){return j}var n=new Date(j.valueOf()),r=n.getUTCDate(),o=n.getUTCMonth(),m=Math.abs(k),q,p;k=k>0?1:-1;if(m===1){p=k===-1?function(){return n.getUTCMonth()===o}:function(){return n.getUTCMonth()!==q};q=o+k;n.setUTCMonth(q);if(q<0||q>11){q=(q+12)%12}}else{for(var l=0;l<m;l++){n=this.moveMonth(n,k)}q=n.getUTCMonth();n.setUTCDate(r);p=function(){return q!==n.getUTCMonth()}}while(p()){n.setUTCDate(--r);n.setUTCMonth(q)}return n},moveYear:function(j,i){return this.moveMonth(j,i*12)},dateWithinRange:function(i){return i>=this.startDate&&i<=this.endDate},keydown:function(o){if(this.picker.is(":not(:visible)")){if(o.keyCode===27){this.show()}return}var k=false,j,i,n;switch(o.keyCode){case 27:this.hide();o.preventDefault();break;case 37:case 39:if(!this.keyboardNavigation){break}j=o.keyCode===37?-1:1;var m=this.viewMode;if(o.ctrlKey){m+=2}else{if(o.shiftKey){m+=1}}if(m===4){i=this.moveYear(this.date,j);n=this.moveYear(this.viewDate,j)}else{if(m===3){i=this.moveMonth(this.date,j);n=this.moveMonth(this.viewDate,j)}else{if(m===2){i=this.moveDate(this.date,j);n=this.moveDate(this.viewDate,j)}else{if(m===1){i=this.moveHour(this.date,j);n=this.moveHour(this.viewDate,j)}else{if(m===0){i=this.moveMinute(this.date,j);n=this.moveMinute(this.viewDate,j)}}}}}if(this.dateWithinRange(i)){this.date=i;this.viewDate=n;this.setValue();this.update();o.preventDefault();k=true}break;case 38:case 40:if(!this.keyboardNavigation){break}j=o.keyCode===38?-1:1;m=this.viewMode;if(o.ctrlKey){m+=2}else{if(o.shiftKey){m+=1}}if(m===4){i=this.moveYear(this.date,j);n=this.moveYear(this.viewDate,j)}else{if(m===3){i=this.moveMonth(this.date,j);n=this.moveMonth(this.viewDate,j)}else{if(m===2){i=this.moveDate(this.date,j*7);n=this.moveDate(this.viewDate,j*7)}else{if(m===1){if(this.showMeridian){i=this.moveHour(this.date,j*6);n=this.moveHour(this.viewDate,j*6)}else{i=this.moveHour(this.date,j*4);n=this.moveHour(this.viewDate,j*4)}}else{if(m===0){i=this.moveMinute(this.date,j*4);n=this.moveMinute(this.viewDate,j*4)}}}}}if(this.dateWithinRange(i)){this.date=i;this.viewDate=n;this.setValue();this.update();o.preventDefault();k=true}break;case 13:if(this.viewMode!==0){var p=this.viewMode;this.showMode(-1);this.fill();if(p===this.viewMode&&this.autoclose){this.hide()}}else{this.fill();if(this.autoclose){this.hide()}}o.preventDefault();break;case 9:this.hide();break}if(k){var l;if(this.isInput){l=this.element}else{if(this.component){l=this.element.find("input")}}if(l){l.change()}this.element.trigger({type:"changeDate",date:this.getDate()})}},showMode:function(i){if(i){var j=Math.max(0,Math.min(c.modes.length-1,this.viewMode+i));if(j>=this.minView&&j<=this.maxView){this.element.trigger({type:"changeMode",date:this.viewDate,oldViewMode:this.viewMode,newViewMode:j});this.viewMode=j}}this.picker.find(">div").hide().filter(".datetimepicker-"+c.modes[this.viewMode].clsName).css("display","block");this.updateNavArrows()},reset:function(){this._setDate(null,"date")},convertViewModeText:function(i){switch(i){case 4:return"decade";case 3:return"year";case 2:return"month";case 1:return"day";case 0:return"hour"}}};var b=d.fn.datetimepicker;d.fn.datetimepicker=function(k){var i=Array.apply(null,arguments);i.shift();var j;this.each(function(){var n=d(this),m=n.data("datetimepicker"),l=typeof k==="object"&&k;if(!m){n.data("datetimepicker",(m=new g(this,d.extend({},d.fn.datetimepicker.defaults,l))))}if(typeof k==="string"&&typeof m[k]==="function"){j=m[k].apply(m,i);if(j!==f){return false}}});if(j!==f){return j}else{return this}};d.fn.datetimepicker.defaults={};d.fn.datetimepicker.Constructor=g;var e=d.fn.datetimepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa","Su"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],meridiem:["am","pm"],suffix:["st","nd","rd","th"],today:"Today",clear:"Clear"}};var c={modes:[{clsName:"minutes",navFnc:"Hours",navStep:1},{clsName:"hours",navFnc:"Date",navStep:1},{clsName:"days",navFnc:"Month",navStep:1},{clsName:"months",navFnc:"FullYear",navStep:1},{clsName:"years",navFnc:"FullYear",navStep:10}],isLeapYear:function(i){return(((i%4===0)&&(i%100!==0))||(i%400===0))},getDaysInMonth:function(i,j){return[31,(c.isLeapYear(i)?29:28),31,30,31,30,31,31,30,31,30,31][j]},getDefaultFormat:function(i,j){if(i==="standard"){if(j==="input"){return"yyyy-mm-dd hh:ii"}else{return"yyyy-mm-dd hh:ii:ss"}}else{if(i==="php"){if(j==="input"){return"Y-m-d H:i"}else{return"Y-m-d H:i:s"}}else{throw new Error("Invalid format type.")}}},validParts:function(i){if(i==="standard"){return/t|hh?|HH?|p|P|z|Z|ii?|ss?|dd?|DD?|mm?|MM?|yy(?:yy)?/g}else{if(i==="php"){return/[dDjlNwzFmMnStyYaABgGhHis]/g}else{throw new Error("Invalid format type.")}}},nonpunctuation:/[^ -\/:-@\[-`{-~\t\n\rTZ]+/g,parseFormat:function(l,j){var i=l.replace(this.validParts(j),"\0").split("\0"),k=l.match(this.validParts(j));if(!i||!i.length||!k||k.length===0){throw new Error("Invalid date format.")}return{separators:i,parts:k}},parseDate:function(A,y,v,j,r){if(A instanceof Date){var u=new Date(A.valueOf()-A.getTimezoneOffset()*60000);u.setMilliseconds(0);return u}if(/^\d{4}\-\d{1,2}\-\d{1,2}$/.test(A)){y=this.parseFormat("yyyy-mm-dd",j)}if(/^\d{4}\-\d{1,2}\-\d{1,2}[T ]\d{1,2}\:\d{1,2}$/.test(A)){y=this.parseFormat("yyyy-mm-dd hh:ii",j)}if(/^\d{4}\-\d{1,2}\-\d{1,2}[T ]\d{1,2}\:\d{1,2}\:\d{1,2}[Z]{0,1}$/.test(A)){y=this.parseFormat("yyyy-mm-dd hh:ii:ss",j)}if(/^[-+]\d+[dmwy]([\s,]+[-+]\d+[dmwy])*$/.test(A)){var l=/([-+]\d+)([dmwy])/,q=A.match(/([-+]\d+)([dmwy])/g),t,p;A=new Date();for(var x=0;x<q.length;x++){t=l.exec(q[x]);p=parseInt(t[1]);switch(t[2]){case"d":A.setUTCDate(A.getUTCDate()+p);break;case"m":A=g.prototype.moveMonth.call(g.prototype,A,p);break;case"w":A.setUTCDate(A.getUTCDate()+p*7);break;case"y":A=g.prototype.moveYear.call(g.prototype,A,p);break}}return h(A.getUTCFullYear(),A.getUTCMonth(),A.getUTCDate(),A.getUTCHours(),A.getUTCMinutes(),A.getUTCSeconds(),0)}var q=A&&A.toString().match(this.nonpunctuation)||[],A=new Date(0,0,0,0,0,0,0),m={},z=["hh","h","ii","i","ss","s","yyyy","yy","M","MM","m","mm","D","DD","d","dd","H","HH","p","P","z","Z"],o={hh:function(s,i){return s.setUTCHours(i)},h:function(s,i){return s.setUTCHours(i)},HH:function(s,i){return s.setUTCHours(i===12?0:i)},H:function(s,i){return s.setUTCHours(i===12?0:i)},ii:function(s,i){return s.setUTCMinutes(i)},i:function(s,i){return s.setUTCMinutes(i)},ss:function(s,i){return s.setUTCSeconds(i)},s:function(s,i){return s.setUTCSeconds(i)},yyyy:function(s,i){return s.setUTCFullYear(i)},yy:function(s,i){return s.setUTCFullYear(2000+i)},m:function(s,i){i-=1;while(i<0){i+=12}i%=12;s.setUTCMonth(i);while(s.getUTCMonth()!==i){if(isNaN(s.getUTCMonth())){return s}else{s.setUTCDate(s.getUTCDate()-1)}}return s},d:function(s,i){return s.setUTCDate(i)},p:function(s,i){return s.setUTCHours(i===1?s.getUTCHours()+12:s.getUTCHours())},z:function(){return r}},B,k,t;o.M=o.MM=o.mm=o.m;o.dd=o.d;o.P=o.p;o.Z=o.z;A=h(A.getFullYear(),A.getMonth(),A.getDate(),A.getHours(),A.getMinutes(),A.getSeconds());if(q.length===y.parts.length){for(var x=0,w=y.parts.length;x<w;x++){B=parseInt(q[x],10);t=y.parts[x];if(isNaN(B)){switch(t){case"MM":k=d(e[v].months).filter(function(){var i=this.slice(0,q[x].length),s=q[x].slice(0,i.length);return i===s});B=d.inArray(k[0],e[v].months)+1;break;case"M":k=d(e[v].monthsShort).filter(function(){var i=this.slice(0,q[x].length),s=q[x].slice(0,i.length);return i.toLowerCase()===s.toLowerCase()});B=d.inArray(k[0],e[v].monthsShort)+1;break;case"p":case"P":B=d.inArray(q[x].toLowerCase(),e[v].meridiem);break;case"z":case"Z":r;break}}m[t]=B}for(var x=0,n;x<z.length;x++){n=z[x];if(n in m&&!isNaN(m[n])){o[n](A,m[n])}}}return A},formatDate:function(l,q,m,p,o){if(l===null){return""}var k;if(p==="standard"){k={t:l.getTime(),yy:l.getUTCFullYear().toString().substring(2),yyyy:l.getUTCFullYear(),m:l.getUTCMonth()+1,M:e[m].monthsShort[l.getUTCMonth()],MM:e[m].months[l.getUTCMonth()],d:l.getUTCDate(),D:e[m].daysShort[l.getUTCDay()],DD:e[m].days[l.getUTCDay()],p:(e[m].meridiem.length===2?e[m].meridiem[l.getUTCHours()<12?0:1]:""),h:l.getUTCHours(),i:l.getUTCMinutes(),s:l.getUTCSeconds(),z:o};if(e[m].meridiem.length===2){k.H=(k.h%12===0?12:k.h%12)}else{k.H=k.h}k.HH=(k.H<10?"0":"")+k.H;k.P=k.p.toUpperCase();k.Z=k.z;k.hh=(k.h<10?"0":"")+k.h;k.ii=(k.i<10?"0":"")+k.i;k.ss=(k.s<10?"0":"")+k.s;k.dd=(k.d<10?"0":"")+k.d;k.mm=(k.m<10?"0":"")+k.m}else{if(p==="php"){k={y:l.getUTCFullYear().toString().substring(2),Y:l.getUTCFullYear(),F:e[m].months[l.getUTCMonth()],M:e[m].monthsShort[l.getUTCMonth()],n:l.getUTCMonth()+1,t:c.getDaysInMonth(l.getUTCFullYear(),l.getUTCMonth()),j:l.getUTCDate(),l:e[m].days[l.getUTCDay()],D:e[m].daysShort[l.getUTCDay()],w:l.getUTCDay(),N:(l.getUTCDay()===0?7:l.getUTCDay()),S:(l.getUTCDate()%10<=e[m].suffix.length?e[m].suffix[l.getUTCDate()%10-1]:""),a:(e[m].meridiem.length===2?e[m].meridiem[l.getUTCHours()<12?0:1]:""),g:(l.getUTCHours()%12===0?12:l.getUTCHours()%12),G:l.getUTCHours(),i:l.getUTCMinutes(),s:l.getUTCSeconds()};k.m=(k.n<10?"0":"")+k.n;k.d=(k.j<10?"0":"")+k.j;k.A=k.a.toString().toUpperCase();k.h=(k.g<10?"0":"")+k.g;k.H=(k.G<10?"0":"")+k.G;k.i=(k.i<10?"0":"")+k.i;k.s=(k.s<10?"0":"")+k.s}else{throw new Error("Invalid format type.")}}var l=[],r=d.extend([],q.separators);for(var n=0,j=q.parts.length;n<j;n++){if(r.length){l.push(r.shift())}l.push(k[q.parts[n]])}if(r.length){l.push(r.shift())}return l.join("")},convertViewMode:function(i){switch(i){case 4:case"decade":i=4;break;case 3:case"year":i=3;break;case 2:case"month":i=2;break;case 1:case"day":i=1;break;case 0:case"hour":i=0;break}return i},headTemplate:'<thead><tr><th class="prev"><i class="{iconType} {leftArrow}"/></th><th colspan="5" class="switch"></th><th class="next"><i class="{iconType} {rightArrow}"/></th></tr></thead>',headTemplateV3:'<thead><tr><th class="prev"><span class="{iconType} {leftArrow}"></span> </th><th colspan="5" class="switch"></th><th class="next"><span class="{iconType} {rightArrow}"></span> </th></tr></thead>',contTemplate:'<tbody><tr><td colspan="7"></td></tr></tbody>',footTemplate:'<tfoot><tr><th colspan="7" class="today"></th></tr><tr><th colspan="7" class="clear"></th></tr></tfoot>'};c.template='<div class="datetimepicker"><div class="datetimepicker-minutes"><table class=" table-condensed">'+c.headTemplate+c.contTemplate+c.footTemplate+'</table></div><div class="datetimepicker-hours"><table class=" table-condensed">'+c.headTemplate+c.contTemplate+c.footTemplate+'</table></div><div class="datetimepicker-days"><table class=" table-condensed">'+c.headTemplate+"<tbody></tbody>"+c.footTemplate+'</table></div><div class="datetimepicker-months"><table class="table-condensed">'+c.headTemplate+c.contTemplate+c.footTemplate+'</table></div><div class="datetimepicker-years"><table class="table-condensed">'+c.headTemplate+c.contTemplate+c.footTemplate+"</table></div></div>";c.templateV3='<div class="datetimepicker"><div class="datetimepicker-minutes"><table class=" table-condensed">'+c.headTemplateV3+c.contTemplate+c.footTemplate+'</table></div><div class="datetimepicker-hours"><table class=" table-condensed">'+c.headTemplateV3+c.contTemplate+c.footTemplate+'</table></div><div class="datetimepicker-days"><table class=" table-condensed">'+c.headTemplateV3+"<tbody></tbody>"+c.footTemplate+'</table></div><div class="datetimepicker-months"><table class="table-condensed">'+c.headTemplateV3+c.contTemplate+c.footTemplate+'</table></div><div class="datetimepicker-years"><table class="table-condensed">'+c.headTemplateV3+c.contTemplate+c.footTemplate+"</table></div></div>";d.fn.datetimepicker.DPGlobal=c;d.fn.datetimepicker.noConflict=function(){d.fn.datetimepicker=b;return this};d(document).on("focus.datetimepicker.data-api click.datetimepicker.data-api",'[data-provide="datetimepicker"]',function(j){var i=d(this);if(i.data("datetimepicker")){return}j.preventDefault();i.datetimepicker("show")});d(function(){d('[data-provide="datetimepicker-inline"]').datetimepicker()})}));
helper/general-helper.php CHANGED
@@ -426,5 +426,76 @@ if ( ! class_exists( 'FlycartWooDiscountRulesGeneralHelper' ) ) {
426
 
427
  return $result;
428
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
429
  }
430
  }
426
 
427
  return $result;
428
  }
429
+
430
+ /**
431
+ * Get Current date and time based on Wordpress time zone
432
+ *
433
+ * @param string $date
434
+ * @return string
435
+ * */
436
+ public static function getCurrentDateAndTimeBasedOnTimeZone($date = ''){
437
+ if(empty($date)){
438
+ $current_date = new DateTime('now', new DateTimeZone('UTC'));
439
+ $date = $current_date->format('Y-m-d H:i:s');
440
+ }
441
+ $offset = get_option('gmt_offset');
442
+ if(empty($offset)){
443
+ $offset = 0;
444
+ }
445
+ //$time_zone = get_option('timezone_string');
446
+ return date("Y-m-d H:i:s", strtotime($date) + (3600 * $offset) );
447
+ }
448
+
449
+ /**
450
+ * Validate the start and end date
451
+ *
452
+ * @param string $date_from
453
+ * @param string $date_to
454
+ * @return boolean
455
+ * */
456
+ public static function validateDateAndTime($date_from, $date_to){
457
+ $valid = true;
458
+ $current_date = self::getCurrentDateAndTimeBasedOnTimeZone();
459
+ if($date_from != ''){
460
+ if(!(strtotime($date_from) <= strtotime($current_date))) $valid = false;
461
+ }
462
+ if($date_to != ''){
463
+ if(!(strtotime($date_to) >= strtotime($current_date))) $valid = false;
464
+ }
465
+
466
+ return $valid;
467
+ }
468
+
469
+ /**
470
+ * Reorder the rule if order id already exists
471
+ *
472
+ * @param int $id
473
+ * @param int $order_id
474
+ * @param string $post_type
475
+ * @return int
476
+ * */
477
+ public static function reOrderRuleIfExists($id, $order_id, $post_type){
478
+ $posts = get_posts(array('post_type' => $post_type, 'numberposts' => '-1', 'exclude' => array($id)));
479
+ $greaterId = $alreadyExists = 0;
480
+ if (!empty($posts) && count($posts) > 0) {
481
+ foreach ($posts as $index => $item) {
482
+ $orderId = get_post_meta($item->ID, 'rule_order', true);
483
+ if(!empty($orderId)){
484
+ if((int)$order_id == (int)$orderId){
485
+ $alreadyExists = 1;
486
+ }
487
+ if($orderId > $greaterId){
488
+ $greaterId = $orderId;
489
+ }
490
+ }
491
+ }
492
+ }
493
+ if($alreadyExists){
494
+ $greaterId++;
495
+ return $greaterId;
496
+ }
497
+
498
+ return $order_id;
499
+ }
500
  }
501
  }
i18n/languages/woo-discount-rules.po ADDED
@@ -0,0 +1,987 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #, # Copyright (C) 2018 Flycart
2
+ msgid ""
3
+ 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: \n"
8
+ "PO-Revision-Date: \n"
9
+ "Last-Translator: \n"
10
+ "Language-Team: Flycart\n"
11
+ "MIME-Version: 1.0\n"
12
+ "Language: en\n"
13
+ "X-Generator: Poedit 2.0.6\n"
14
+
15
+ #. Text in echo
16
+ #: woo-discount-rules/view/view-pricing-rules.php:465
17
+ msgid " Product(s) "
18
+ msgstr ""
19
+
20
+ #. Text in echo
21
+ #: woo-discount-rules/view/view-pricing-rules.php:621
22
+ msgid "100% percent"
23
+ msgstr ""
24
+
25
+ #. Text in echo
26
+ #: woo-discount-rules/view/cart-rules.php:118
27
+ #: woo-discount-rules/view/pricing-rules.php:147
28
+ #: woo-discount-rules/view/view-cart-rules.php:443
29
+ msgid "Action"
30
+ msgstr ""
31
+
32
+ #. Text in echo
33
+ #: woo-discount-rules/view/view-cart-rules.php:131
34
+ msgid "Add Condition"
35
+ msgstr ""
36
+
37
+ #. Text in echo
38
+ #: woo-discount-rules/view/view-pricing-rules.php:484
39
+ msgid "Add New Range"
40
+ msgstr ""
41
+
42
+ #. Text in echo
43
+ #: woo-discount-rules/view/cart-rules.php:42
44
+ #: woo-discount-rules/view/pricing-rules.php:73
45
+ msgid "Add New Rule"
46
+ msgstr ""
47
+
48
+ #. Text in echo
49
+ #: woo-discount-rules/view/view-pricing-rules.php:517
50
+ msgid "Adjustment Type"
51
+ msgstr ""
52
+
53
+ #. Text in echo
54
+ #: woo-discount-rules/view/view-pricing-rules.php:240
55
+ #: woo-discount-rules/view/view-pricing-rules.php:458
56
+ msgid "All"
57
+ msgstr ""
58
+
59
+ #. Text in echo
60
+ #: woo-discount-rules/view/view-pricing-rules.php:149
61
+ msgid "All products"
62
+ msgstr ""
63
+
64
+ #. Text in echo
65
+ #: woo-discount-rules/view/view-cart-rules.php:315
66
+ #: woo-discount-rules/view/view-cart-rules.php:317
67
+ #: woo-discount-rules/view/view-pricing-rules.php:560
68
+ msgid "All selected"
69
+ msgstr ""
70
+
71
+ #. Text in echo
72
+ #: woo-discount-rules/view/view-pricing-rules.php:436
73
+ msgid "Any"
74
+ msgstr ""
75
+
76
+ #. Text in echo
77
+ #: woo-discount-rules/view/view-pricing-rules.php:562
78
+ msgid "Any one cheapest from all products"
79
+ msgstr ""
80
+
81
+ #. Text in echo
82
+ #: woo-discount-rules/view/view-pricing-rules.php:561
83
+ msgid "Any one cheapest from selected"
84
+ msgstr ""
85
+
86
+ #. Text in echo
87
+ #: woo-discount-rules/view/view-pricing-rules.php:143
88
+ msgid "Apply To"
89
+ msgstr ""
90
+
91
+ #. Text in echo
92
+ #: woo-discount-rules/view/settings.php:243
93
+ #: woo-discount-rules/view/settings.php:245
94
+ msgid "Apply all matched rules"
95
+ msgstr ""
96
+
97
+ #. Text in echo
98
+ #: woo-discount-rules/view/settings.php:252
99
+ #: woo-discount-rules/view/settings.php:254
100
+ msgid "Apply biggest discount"
101
+ msgstr ""
102
+
103
+ #. Text in echo
104
+ #: woo-discount-rules/view/settings.php:100
105
+ #: woo-discount-rules/view/settings.php:237
106
+ msgid "Apply first matched rule"
107
+ msgstr ""
108
+
109
+ #. Text in echo
110
+ #: woo-discount-rules/view/view-pricing-rules.php:558
111
+ msgid "Apply for"
112
+ msgstr ""
113
+
114
+ #. Text in echo
115
+ #: woo-discount-rules/view/view-pricing-rules.php:299
116
+ msgid "Apply if all coupon applied"
117
+ msgstr ""
118
+
119
+ #. Text in echo
120
+ #: woo-discount-rules/view/view-pricing-rules.php:298
121
+ msgid "Apply if any one coupon applied"
122
+ msgstr ""
123
+
124
+ #. Text in echo
125
+ #: woo-discount-rules/view/view-cart-rules.php:305
126
+ #: woo-discount-rules/view/view-cart-rules.php:307
127
+ msgid "Atleast any one"
128
+ msgstr ""
129
+
130
+ #. Text in echo
131
+ #: woo-discount-rules/view/view-cart-rules.php:293
132
+ #: woo-discount-rules/view/view-cart-rules.php:295
133
+ msgid "Based on Purchase history"
134
+ msgstr ""
135
+
136
+ #. Text in echo
137
+ #: woo-discount-rules/view/view-cart-rules.php:269
138
+ #: woo-discount-rules/view/view-cart-rules.php:271
139
+ msgid "Billing city"
140
+ msgstr ""
141
+
142
+ #. Text in echo
143
+ #: woo-discount-rules/view/view-pricing-rules.php:434
144
+ msgid "Buy"
145
+ msgstr ""
146
+
147
+ #. Text in echo
148
+ #: woo-discount-rules/view/view-cart-rules.php:128
149
+ msgid "Cart Conditions"
150
+ msgstr ""
151
+
152
+ #. Text in echo
153
+ #: woo-discount-rules/view/view-cart-rules.php:166
154
+ msgid "Cart Item Count"
155
+ msgstr ""
156
+
157
+ #. Text in echo
158
+ #: woo-discount-rules/view/cart-rules.php:22
159
+ msgid "Cart Rules"
160
+ msgstr ""
161
+
162
+ #. Text in echo
163
+ #: woo-discount-rules/view/view-cart-rules.php:156
164
+ msgid "Cart Subtotal"
165
+ msgstr ""
166
+
167
+ #. Text in echo
168
+ #: woo-discount-rules/view/settings.php:211
169
+ msgid "Cart rules settings"
170
+ msgstr ""
171
+
172
+ #. Text in echo
173
+ #: woo-discount-rules/view/view-cart-rules.php:201
174
+ msgid "Categories In Cart"
175
+ msgstr ""
176
+
177
+ #. Text in echo
178
+ #: woo-discount-rules/view/view-cart-rules.php:206
179
+ msgid "Categories in cart"
180
+ msgstr ""
181
+
182
+ #. Text in echo
183
+ #: woo-discount-rules/view/view-pricing-rules.php:196
184
+ msgid "Check this box to apply child category(ies)"
185
+ msgstr ""
186
+
187
+ #. Text in echo
188
+ #: woo-discount-rules/view/view-pricing-rules.php:193
189
+ msgid "Check this box to count quantities cumulatively across category(ies)"
190
+ msgstr ""
191
+
192
+ #. Text in echo
193
+ #: woo-discount-rules/view/view-pricing-rules.php:181
194
+ msgid "Check this box to count quantities cumulatively across products"
195
+ msgstr ""
196
+
197
+ #. Text in echo
198
+ #: woo-discount-rules/view/view-cart-rules.php:51
199
+ #: woo-discount-rules/view/view-pricing-rules.php:35
200
+ msgid "Close"
201
+ msgstr ""
202
+
203
+ #. Text in echo
204
+ #: woo-discount-rules/view/view-pricing-rules.php:438
205
+ msgid "Combine"
206
+ msgstr ""
207
+
208
+ #. Text in echo
209
+ #: woo-discount-rules/view/view-pricing-rules.php:289
210
+ msgid "Coupon"
211
+ msgstr ""
212
+
213
+ #. Text in echo
214
+ #: woo-discount-rules/view/settings.php:218
215
+ msgid "Coupon Name to be displayed :"
216
+ msgstr ""
217
+
218
+ #. Text in echo
219
+ #: woo-discount-rules/view/view-cart-rules.php:299
220
+ msgid "Coupon applied"
221
+ msgstr ""
222
+
223
+ #. Text in echo
224
+ #: woo-discount-rules/view/view-cart-rules.php:263
225
+ msgid "Customer Billing Details"
226
+ msgstr ""
227
+
228
+ #. Text in echo
229
+ #: woo-discount-rules/view/view-cart-rules.php:209
230
+ msgid "Customer Details (must be logged in)"
231
+ msgstr ""
232
+
233
+ #. Text in echo
234
+ #: woo-discount-rules/view/view-cart-rules.php:241
235
+ msgid "Customer Email"
236
+ msgstr ""
237
+
238
+ #. Text in echo
239
+ #: woo-discount-rules/view/view-cart-rules.php:275
240
+ msgid "Customer Shipping Details"
241
+ msgstr ""
242
+
243
+ #. Text in echo
244
+ #: woo-discount-rules/view/view-pricing-rules.php:235
245
+ msgid "Customers"
246
+ msgstr ""
247
+
248
+ #. Text in echo
249
+ #: woo-discount-rules/view/cart-rules.php:101
250
+ #: woo-discount-rules/view/pricing-rules.php:130
251
+ msgid "Delete"
252
+ msgstr ""
253
+
254
+ #. Text in echo
255
+ #: woo-discount-rules/view/view-pricing-rules.php:101
256
+ #: woo-discount-rules/view/view-pricing-rules.php:103
257
+ msgid "Dependant product based discount"
258
+ msgstr ""
259
+
260
+ #. Text in function
261
+ #: woo-discount-rules/view/cart-rules.php:69
262
+ #: woo-discount-rules/view/pricing-rules.php:98
263
+ msgid "Disable"
264
+ msgstr ""
265
+
266
+ #. Text in echo
267
+ #: woo-discount-rules/view/settings.php:263
268
+ msgid "Disable the rules while have coupon(Third party) in cart"
269
+ msgstr ""
270
+
271
+ #. Text in echo
272
+ #: woo-discount-rules/view/settings.php:285
273
+ #: woo-discount-rules/view/settings.php:292
274
+ msgid "Disabled"
275
+ msgstr ""
276
+
277
+ #. Text in echo
278
+ #: woo-discount-rules/view/template/discount-table.php:16
279
+ #: woo-discount-rules/view/view-cart-rules.php:460
280
+ #: woo-discount-rules/view/view-pricing-rules.php:481
281
+ msgid "Discount"
282
+ msgstr ""
283
+
284
+ #. Text in echo
285
+ #: woo-discount-rules/view/view-pricing-rules.php:138
286
+ msgid "Discount Conditions"
287
+ msgstr ""
288
+
289
+ #. Text in echo
290
+ #: woo-discount-rules/view/settings.php:224
291
+ msgid "Discount Coupon Name"
292
+ msgstr ""
293
+
294
+ #. Text in echo
295
+ #: woo-discount-rules/view/settings.php:165
296
+ msgid "Discount Table :"
297
+ msgstr ""
298
+
299
+ #. Text in echo
300
+ #: woo-discount-rules/view/view-cart-rules.php:476
301
+ msgid "Discount Type :"
302
+ msgstr ""
303
+
304
+ #. Text in echo
305
+ #: woo-discount-rules/view/view-pricing-rules.php:297
306
+ #: woo-discount-rules/view/view-pricing-rules.php:335
307
+ msgid "Do not use"
308
+ msgstr ""
309
+
310
+ #. Text in echo
311
+ #: woo-discount-rules/view/cart-rules.php:27
312
+ #: woo-discount-rules/view/pricing-rules.php:59
313
+ msgid "Documentation"
314
+ msgstr ""
315
+
316
+ #. Text in echo
317
+ #: woo-discount-rules/view/settings.php:326
318
+ msgid "Draft"
319
+ msgstr ""
320
+
321
+ #. Text in echo
322
+ #: woo-discount-rules/view/view-pricing-rules.php:582
323
+ msgid "Dynamic item count"
324
+ msgstr ""
325
+
326
+ #. Text in echo
327
+ #: woo-discount-rules/view/view-pricing-rules.php:437
328
+ msgid "Each"
329
+ msgstr ""
330
+
331
+ #. Text in echo
332
+ #: woo-discount-rules/view/cart-rules.php:95
333
+ #: woo-discount-rules/view/pricing-rules.php:124
334
+ msgid "Edit"
335
+ msgstr ""
336
+
337
+ #. Text in echo
338
+ #: woo-discount-rules/view/view-cart-rules.php:56
339
+ msgid "Edit Cart Rule"
340
+ msgstr ""
341
+
342
+ #. Text in echo
343
+ #: woo-discount-rules/view/view-pricing-rules.php:40
344
+ msgid "Edit Price Rule"
345
+ msgstr ""
346
+
347
+ #. Text in echo
348
+ #: woo-discount-rules/view/view-cart-rules.php:257
349
+ #: woo-discount-rules/view/view-cart-rules.php:259
350
+ msgid "Email with Domain (Eg: gmail.com)"
351
+ msgstr ""
352
+
353
+ #. Text in echo
354
+ #: woo-discount-rules/view/view-cart-rules.php:247
355
+ #: woo-discount-rules/view/view-cart-rules.php:249
356
+ msgid "Email with TLD (Eg: edu)"
357
+ msgstr ""
358
+
359
+ #. Text in function
360
+ #: woo-discount-rules/view/cart-rules.php:69
361
+ #: woo-discount-rules/view/pricing-rules.php:98
362
+ msgid "Enable"
363
+ msgstr ""
364
+
365
+ #. Text in echo
366
+ #: woo-discount-rules/view/settings.php:63
367
+ msgid "Enable Bootstrap"
368
+ msgstr ""
369
+
370
+ #. Text in echo
371
+ #: woo-discount-rules/view/settings.php:275
372
+ msgid "Enable free shipping option"
373
+ msgstr ""
374
+
375
+ #. Text in echo
376
+ #: woo-discount-rules/view/view-pricing-rules.php:350
377
+ msgid "Enter the amount"
378
+ msgstr ""
379
+
380
+ #. Text in echo
381
+ #: woo-discount-rules/view/view-pricing-rules.php:350
382
+ msgid "Enter the coupon code separated by comma(,)"
383
+ msgstr ""
384
+
385
+ #. Text in echo
386
+ #: woo-discount-rules/view/view-pricing-rules.php:443
387
+ msgid "Equal"
388
+ msgstr ""
389
+
390
+ #. Text in echo
391
+ #: woo-discount-rules/view/settings.php:336
392
+ msgid "Exclude Draft products in product select box."
393
+ msgstr ""
394
+
395
+ #. Text in echo
396
+ #: woo-discount-rules/view/view-pricing-rules.php:215
397
+ msgid "Exclude products"
398
+ msgstr ""
399
+
400
+ #. Text in echo
401
+ #: woo-discount-rules/view/cart-rules.php:116
402
+ #: woo-discount-rules/view/pricing-rules.php:145
403
+ msgid "Expired On"
404
+ msgstr ""
405
+
406
+ #. Text in echo
407
+ #: woo-discount-rules/view/view-pricing-rules.php:459
408
+ msgid "First quantity(s)"
409
+ msgstr ""
410
+
411
+ #. Text in echo
412
+ #: woo-discount-rules/view/view-pricing-rules.php:652
413
+ msgid "Fixed"
414
+ msgstr ""
415
+
416
+ #. Text in echo
417
+ #: woo-discount-rules/view/view-pricing-rules.php:581
418
+ msgid "Fixed item count"
419
+ msgstr ""
420
+
421
+ #. Text in echo
422
+ #: woo-discount-rules/view/settings.php:75
423
+ msgid "Force refresh the cart widget while add and remove item to cart"
424
+ msgstr ""
425
+
426
+ #. Text in function
427
+ #: woo-discount-rules/view/settings.php:316
428
+ msgid "Free Shipping"
429
+ msgstr ""
430
+
431
+ #. Text in echo
432
+ #: woo-discount-rules/view/settings.php:319
433
+ msgid "Free Shipping title"
434
+ msgstr ""
435
+
436
+ #. Text in echo
437
+ #: woo-discount-rules/view/view-pricing-rules.php:568
438
+ msgid "Free quantity"
439
+ msgstr ""
440
+
441
+ #. Text in echo
442
+ #: woo-discount-rules/view/view-cart-rules.php:495
443
+ #: woo-discount-rules/view/view-cart-rules.php:497
444
+ msgid "Free shipping"
445
+ msgstr ""
446
+
447
+ #. Text in echo
448
+ #: woo-discount-rules/view/settings.php:312
449
+ msgid "Free shipping text to be displayed"
450
+ msgstr ""
451
+
452
+ #. Text in echo
453
+ #: woo-discount-rules/view/view-cart-rules.php:115
454
+ #: woo-discount-rules/view/view-pricing-rules.php:125
455
+ #: woo-discount-rules/view/view-pricing-rules.php:444
456
+ msgid "From"
457
+ msgstr ""
458
+
459
+ #. Text in echo
460
+ #: woo-discount-rules/view/view-cart-rules.php:59
461
+ #: woo-discount-rules/view/view-pricing-rules.php:43
462
+ msgid "General"
463
+ msgstr ""
464
+
465
+ #. Text in echo
466
+ #: woo-discount-rules/view/settings.php:23
467
+ msgid "General Settings"
468
+ msgstr ""
469
+
470
+ #. Text in echo
471
+ #: woo-discount-rules/view/view-pricing-rules.php:398
472
+ msgid "Greater than or equal to"
473
+ msgstr ""
474
+
475
+ #. Text in function
476
+ #: woo-discount-rules/helper/general-helper.php:1
477
+ msgid "Guest"
478
+ msgstr ""
479
+
480
+ #. Text in echo
481
+ #: woo-discount-rules/view/view-cart-rules.php:417
482
+ #: woo-discount-rules/view/view-pricing-rules.php:402
483
+ msgid "In Order status"
484
+ msgstr ""
485
+
486
+ #. Text in echo
487
+ #: woo-discount-rules/view/settings.php:158
488
+ msgid "It displays only if any rule matches"
489
+ msgstr ""
490
+
491
+ #. Text in echo
492
+ #: woo-discount-rules/view/view-pricing-rules.php:585
493
+ msgid "Item count"
494
+ msgstr ""
495
+
496
+ #. Text in echo
497
+ #: woo-discount-rules/view/view-pricing-rules.php:592
498
+ msgid "Item quantity"
499
+ msgstr ""
500
+
501
+ #. Text in echo
502
+ #: woo-discount-rules/view/view-pricing-rules.php:442
503
+ msgid "Less than"
504
+ msgstr ""
505
+
506
+ #. Text in echo
507
+ #: woo-discount-rules/view/view-pricing-rules.php:399
508
+ msgid "Less than or equal to"
509
+ msgstr ""
510
+
511
+ #. Text in echo
512
+ #: woo-discount-rules/view/settings.php:30
513
+ msgid "License Key :"
514
+ msgstr ""
515
+
516
+ #. Text in echo
517
+ #: woo-discount-rules/view/settings.php:48
518
+ msgid "License key seems to be Invalid. Please enter a valid license key"
519
+ msgstr ""
520
+
521
+ #. Text in echo
522
+ #: woo-discount-rules/view/view-pricing-rules.php:622
523
+ msgid "Limited percent"
524
+ msgstr ""
525
+
526
+ #. Text in echo
527
+ #: woo-discount-rules/view/template/sidebar.php:7
528
+ msgid "Looking for more features? Upgrade to PRO"
529
+ msgstr ""
530
+
531
+ #. Text in echo
532
+ #: woo-discount-rules/view/view-pricing-rules.php:511
533
+ msgid "Max Quantity"
534
+ msgstr ""
535
+
536
+ #. Text in echo
537
+ #: woo-discount-rules/view/view-pricing-rules.php:86
538
+ msgid "Method"
539
+ msgstr ""
540
+
541
+ #. Text in echo
542
+ #: woo-discount-rules/view/view-pricing-rules.php:504
543
+ msgid "Min Quantity"
544
+ msgstr ""
545
+
546
+ #. Text in echo
547
+ #: woo-discount-rules/view/view-pricing-rules.php:441
548
+ msgid "More than"
549
+ msgstr ""
550
+
551
+ #. Text in echo
552
+ #: woo-discount-rules/view/view-pricing-rules.php:565
553
+ msgid "More than one cheapest from all"
554
+ msgstr ""
555
+
556
+ #. Text in echo
557
+ #: woo-discount-rules/view/view-pricing-rules.php:564
558
+ msgid "More than one cheapest from selected"
559
+ msgstr ""
560
+
561
+ #. Text in echo
562
+ #: woo-discount-rules/view/view-pricing-rules.php:563
563
+ msgid "More than one cheapest from selected category"
564
+ msgstr ""
565
+
566
+ #. Text in echo
567
+ #: woo-discount-rules/view/cart-rules.php:114
568
+ #: woo-discount-rules/view/pricing-rules.php:143
569
+ #: woo-discount-rules/view/template/discount-table.php:12
570
+ msgid "Name"
571
+ msgstr ""
572
+
573
+ #. Text in echo
574
+ #: woo-discount-rules/view/includes/footer.php:5
575
+ msgid "Need help in setting up the rules?"
576
+ msgstr ""
577
+
578
+ #. Text in echo
579
+ #: woo-discount-rules/view/view-cart-rules.php:54
580
+ msgid "New Cart Rule"
581
+ msgstr ""
582
+
583
+ #. Text in echo
584
+ #: woo-discount-rules/view/view-pricing-rules.php:38
585
+ msgid "New Price Rule"
586
+ msgstr ""
587
+
588
+ #. Text in echo
589
+ #: woo-discount-rules/view/view-cart-rules.php:124
590
+ #: woo-discount-rules/view/view-cart-rules.php:455
591
+ #: woo-discount-rules/view/view-pricing-rules.php:133
592
+ #: woo-discount-rules/view/view-pricing-rules.php:474
593
+ msgid "Next"
594
+ msgstr ""
595
+
596
+ #. Text in echo
597
+ #: woo-discount-rules/view/settings.php:69
598
+ #: woo-discount-rules/view/settings.php:81
599
+ #: woo-discount-rules/view/settings.php:206
600
+ #: woo-discount-rules/view/settings.php:269
601
+ msgid "No"
602
+ msgstr ""
603
+
604
+ #. Text in echo
605
+ #: woo-discount-rules/view/template/discount-table.php:45
606
+ msgid "No Active Discounts."
607
+ msgstr ""
608
+
609
+ #. Text in echo
610
+ #: woo-discount-rules/view/view-cart-rules.php:169
611
+ msgid "Number of line items in the cart (not quantity) at least"
612
+ msgstr ""
613
+
614
+ #. Text in echo
615
+ #: woo-discount-rules/view/view-cart-rules.php:173
616
+ msgid "Number of line items in the cart (not quantity) less than"
617
+ msgstr ""
618
+
619
+ #. Text in echo
620
+ #: woo-discount-rules/view/view-pricing-rules.php:247
621
+ #: woo-discount-rules/view/view-pricing-rules.php:249
622
+ msgid "Only Given"
623
+ msgstr ""
624
+
625
+ #. Text in echo
626
+ #: woo-discount-rules/view/cart-rules.php:117
627
+ #: woo-discount-rules/view/pricing-rules.php:146
628
+ msgid "Order"
629
+ msgstr ""
630
+
631
+ #. Text in echo
632
+ #: woo-discount-rules/view/view-cart-rules.php:63
633
+ #: woo-discount-rules/view/view-pricing-rules.php:47
634
+ msgid "Order :"
635
+ msgstr ""
636
+
637
+ #. Text in echo
638
+ #: woo-discount-rules/view/view-pricing-rules.php:651
639
+ msgid "Percent"
640
+ msgstr ""
641
+
642
+ #. Text in echo
643
+ #: woo-discount-rules/view/view-cart-rules.php:480
644
+ #: woo-discount-rules/view/view-pricing-rules.php:523
645
+ msgid "Percentage Discount"
646
+ msgstr ""
647
+
648
+ #. Text in echo
649
+ #: woo-discount-rules/view/view-cart-rules.php:102
650
+ #: woo-discount-rules/view/view-pricing-rules.php:112
651
+ msgid "Period of Rule Active. Format: month/day/Year Hour:Min"
652
+ msgstr ""
653
+
654
+ #. Text in echo
655
+ #: woo-discount-rules/view/includes/footer.php:5
656
+ msgid "Please contact our support team"
657
+ msgstr ""
658
+
659
+ #. Text in echo
660
+ #: woo-discount-rules/view/view-cart-rules.php:454
661
+ #: woo-discount-rules/view/view-cart-rules.php:514
662
+ #: woo-discount-rules/view/view-pricing-rules.php:473
663
+ #: woo-discount-rules/view/view-pricing-rules.php:658
664
+ msgid "Previous"
665
+ msgstr ""
666
+
667
+ #. Text in echo
668
+ #: woo-discount-rules/view/view-cart-rules.php:486
669
+ #: woo-discount-rules/view/view-cart-rules.php:488
670
+ #: woo-discount-rules/view/view-pricing-rules.php:531
671
+ #: woo-discount-rules/view/view-pricing-rules.php:533
672
+ msgid "Price Discount"
673
+ msgstr ""
674
+
675
+ #. Text in echo
676
+ #: woo-discount-rules/view/pricing-rules.php:54
677
+ msgid "Price Rules"
678
+ msgstr ""
679
+
680
+ #. Text in echo
681
+ #: woo-discount-rules/view/settings.php:86
682
+ msgid "Price rules settings"
683
+ msgstr ""
684
+
685
+ #. Text in echo
686
+ #: woo-discount-rules/view/view-pricing-rules.php:541
687
+ #: woo-discount-rules/view/view-pricing-rules.php:543
688
+ msgid "Product Discount"
689
+ msgstr ""
690
+
691
+ #. Text in echo
692
+ #: woo-discount-rules/view/view-pricing-rules.php:452
693
+ msgid "Product(s) from"
694
+ msgstr ""
695
+
696
+ #. Text in echo
697
+ #: woo-discount-rules/view/view-cart-rules.php:287
698
+ #: woo-discount-rules/view/view-pricing-rules.php:371
699
+ msgid "Purchase History"
700
+ msgstr ""
701
+
702
+ #. Text in echo
703
+ #: woo-discount-rules/view/view-pricing-rules.php:446
704
+ #: woo-discount-rules/view/view-pricing-rules.php:449
705
+ #: woo-discount-rules/view/view-pricing-rules.php:462
706
+ msgid "Quantity"
707
+ msgstr ""
708
+
709
+ #. Text in echo
710
+ #: woo-discount-rules/view/view-cart-rules.php:176
711
+ msgid "Quantity Sum"
712
+ msgstr ""
713
+
714
+ #. Text in echo
715
+ #: woo-discount-rules/view/view-pricing-rules.php:94
716
+ msgid "Quantity based by product/category and BOGO deals"
717
+ msgstr ""
718
+
719
+ #. Text in echo
720
+ #: woo-discount-rules/view/template/discount-table.php:15
721
+ msgid "Range"
722
+ msgstr ""
723
+
724
+ #. Text in echo
725
+ #: woo-discount-rules/view/view-cart-rules.php:444
726
+ #: woo-discount-rules/view/view-pricing-rules.php:636
727
+ msgid "Remove"
728
+ msgstr ""
729
+
730
+ #. Text in echo
731
+ #: woo-discount-rules/view/view-cart-rules.php:90
732
+ #: woo-discount-rules/view/view-pricing-rules.php:75
733
+ msgid "Rule Description"
734
+ msgstr ""
735
+
736
+ #. Text in echo
737
+ #: woo-discount-rules/view/view-cart-rules.php:78
738
+ #: woo-discount-rules/view/view-pricing-rules.php:63
739
+ msgid "Rule Name"
740
+ msgstr ""
741
+
742
+ #. Text in echo
743
+ #: woo-discount-rules/view/settings.php:231
744
+ msgid "Rule Setup for Cart:"
745
+ msgstr ""
746
+
747
+ #. Text in echo
748
+ #: woo-discount-rules/view/settings.php:94
749
+ msgid "Rule Setup for Price:"
750
+ msgstr ""
751
+
752
+ #. Text in echo
753
+ #: woo-discount-rules/view/view-cart-rules.php:235
754
+ #: woo-discount-rules/view/view-cart-rules.php:237
755
+ msgid "Shipping country in list"
756
+ msgstr ""
757
+
758
+ #. Text in echo
759
+ #: woo-discount-rules/view/view-cart-rules.php:281
760
+ #: woo-discount-rules/view/view-cart-rules.php:283
761
+ msgid "Shipping state"
762
+ msgstr ""
763
+
764
+ #. Text in echo
765
+ #: woo-discount-rules/view/settings.php:189
766
+ msgid "Show"
767
+ msgstr ""
768
+
769
+ #. Text in echo
770
+ #: woo-discount-rules/view/settings.php:183
771
+ msgid "Show Discount Title on Table :"
772
+ msgstr ""
773
+
774
+ #. Text in echo
775
+ #: woo-discount-rules/view/settings.php:127
776
+ msgid "Show Price discount on product page :"
777
+ msgstr ""
778
+
779
+ #. Text in echo
780
+ #: woo-discount-rules/view/settings.php:146
781
+ msgid "Show Sale tag on product page :"
782
+ msgstr ""
783
+
784
+ #. Text in echo
785
+ #: woo-discount-rules/view/settings.php:200
786
+ msgid "Show strikeout discount in cart item"
787
+ msgstr ""
788
+
789
+ #. Text in echo
790
+ #: woo-discount-rules/view/view-pricing-rules.php:460
791
+ msgid "Skip first quantity(s)"
792
+ msgstr ""
793
+
794
+ #. Text in echo
795
+ #: woo-discount-rules/view/view-pricing-rules.php:168
796
+ #: woo-discount-rules/view/view-pricing-rules.php:170
797
+ msgid "Specific attributes"
798
+ msgstr ""
799
+
800
+ #. Text in echo
801
+ #: woo-discount-rules/view/view-pricing-rules.php:159
802
+ #: woo-discount-rules/view/view-pricing-rules.php:161
803
+ msgid "Specific categories"
804
+ msgstr ""
805
+
806
+ #. Text in echo
807
+ #: woo-discount-rules/view/view-pricing-rules.php:153
808
+ msgid "Specific products"
809
+ msgstr ""
810
+
811
+ #. Text in echo
812
+ #: woo-discount-rules/view/cart-rules.php:115
813
+ #: woo-discount-rules/view/pricing-rules.php:144
814
+ msgid "Start Date"
815
+ msgstr ""
816
+
817
+ #. Text in echo
818
+ #: woo-discount-rules/view/view-pricing-rules.php:325
819
+ msgid "Subtotal"
820
+ msgstr ""
821
+
822
+ #. Text in echo
823
+ #: woo-discount-rules/view/view-cart-rules.php:159
824
+ msgid "Subtotal at least"
825
+ msgstr ""
826
+
827
+ #. Text in echo
828
+ #: woo-discount-rules/view/view-pricing-rules.php:336
829
+ msgid "Subtotal atleast"
830
+ msgstr ""
831
+
832
+ #. Text in echo
833
+ #: woo-discount-rules/view/view-cart-rules.php:163
834
+ msgid "Subtotal less than"
835
+ msgstr ""
836
+
837
+ #. Text in echo
838
+ #: woo-discount-rules/view/settings.php:330
839
+ #: woo-discount-rules/view/view-pricing-rules.php:553
840
+ msgid "Supported in PRO version"
841
+ msgstr ""
842
+
843
+ #. Text in echo
844
+ #: woo-discount-rules/view/view-pricing-rules.php:350
845
+ msgid "Supported in WooCommerce 3.x"
846
+ msgstr ""
847
+
848
+ #. Text in echo
849
+ #: woo-discount-rules/view/view-cart-rules.php:119
850
+ msgid "To"
851
+ msgstr ""
852
+
853
+ #. Text in echo
854
+ #: woo-discount-rules/view/view-pricing-rules.php:129
855
+ msgid "To - Leave Empty if No Expiry"
856
+ msgstr ""
857
+
858
+ #. Text in echo
859
+ #: woo-discount-rules/view/view-cart-rules.php:185
860
+ msgid "Total number of quantities in the cart at least"
861
+ msgstr ""
862
+
863
+ #. Text in echo
864
+ #: woo-discount-rules/view/view-cart-rules.php:197
865
+ msgid "Total number of quantities in the cart less than"
866
+ msgstr ""
867
+
868
+ #. Text in echo
869
+ #: woo-discount-rules/view/view-pricing-rules.php:396
870
+ msgid "Total purchased amount "
871
+ msgstr ""
872
+
873
+ #. Text in echo
874
+ #: woo-discount-rules/view/view-cart-rules.php:416
875
+ msgid "Total purchased amount at least"
876
+ msgstr ""
877
+
878
+ #. Text in echo
879
+ #: woo-discount-rules/view/view-cart-rules.php:152
880
+ msgid "Type"
881
+ msgstr ""
882
+
883
+ #. Text in echo
884
+ #: woo-discount-rules/view/settings.php:298
885
+ msgid "Use Woo-Discount free shipping"
886
+ msgstr ""
887
+
888
+ #. Text in echo
889
+ #: woo-discount-rules/view/settings.php:295
890
+ msgid "Use Woocommerce free shipping"
891
+ msgstr ""
892
+
893
+ #. Text in echo
894
+ #: woo-discount-rules/view/view-cart-rules.php:215
895
+ #: woo-discount-rules/view/view-cart-rules.php:217
896
+ msgid "User in list"
897
+ msgstr ""
898
+
899
+ #. Text in echo
900
+ #: woo-discount-rules/view/view-cart-rules.php:225
901
+ #: woo-discount-rules/view/view-cart-rules.php:227
902
+ msgid "User role in list"
903
+ msgstr ""
904
+
905
+ #. Text in echo
906
+ #: woo-discount-rules/view/view-pricing-rules.php:263
907
+ msgid "User roles"
908
+ msgstr ""
909
+
910
+ #. Text in echo
911
+ #: woo-discount-rules/view/view-cart-rules.php:101
912
+ #: woo-discount-rules/view/view-pricing-rules.php:111
913
+ msgid "Validity"
914
+ msgstr ""
915
+
916
+ #. Text in echo
917
+ #: woo-discount-rules/view/view-cart-rules.php:325
918
+ #: woo-discount-rules/view/view-pricing-rules.php:547
919
+ #: woo-discount-rules/view/view-pricing-rules.php:653
920
+ msgid "Value"
921
+ msgstr ""
922
+
923
+ #. Text in echo
924
+ #: woo-discount-rules/view/cart-rules.php:26
925
+ #: woo-discount-rules/view/pricing-rules.php:58
926
+ msgid "View Examples"
927
+ msgstr ""
928
+
929
+ #. Text in echo
930
+ #: woo-discount-rules/view/view-cart-rules.php:72
931
+ #: woo-discount-rules/view/view-pricing-rules.php:57
932
+ msgid "WARNING: More than one rule should not have same priority."
933
+ msgstr ""
934
+
935
+ #. Text in echo
936
+ #: woo-discount-rules/view/settings.php:68
937
+ #: woo-discount-rules/view/settings.php:80
938
+ #: woo-discount-rules/view/settings.php:205
939
+ #: woo-discount-rules/view/settings.php:268
940
+ msgid "Yes"
941
+ msgstr ""
942
+
943
+ #. Text in echo
944
+ #: woo-discount-rules/view/view-pricing-rules.php:379
945
+ msgid "Yes, based on Purchase history."
946
+ msgstr ""
947
+
948
+ #. Text in echo
949
+ #: woo-discount-rules/view/cart-rules.php:37
950
+ #: woo-discount-rules/view/pricing-rules.php:69
951
+ msgid "You Reach Max. Rule Limit"
952
+ msgstr ""
953
+
954
+ #. Text in echo
955
+ #: woo-discount-rules/view/view-pricing-rules.php:619
956
+ msgid "and"
957
+ msgstr ""
958
+
959
+ #. Text in echo
960
+ #: woo-discount-rules/view/view-pricing-rules.php:456
961
+ msgid "and get discount in "
962
+ msgstr ""
963
+
964
+ #. Text in echo
965
+ #: woo-discount-rules/view/view-pricing-rules.php:631
966
+ msgid "as discount"
967
+ msgstr ""
968
+
969
+ #. Text in echo
970
+ #: woo-discount-rules/view/view-pricing-rules.php:573
971
+ msgid "ex. 1"
972
+ msgstr ""
973
+
974
+ #. Text in echo
975
+ #: woo-discount-rules/view/view-pricing-rules.php:552
976
+ msgid "ex. 50"
977
+ msgstr ""
978
+
979
+ #. Text in echo
980
+ #: woo-discount-rules/view/view-pricing-rules.php:448
981
+ msgid "to"
982
+ msgstr ""
983
+
984
+ #. Text in echo
985
+ #: woo-discount-rules/view/view-cart-rules.php:506
986
+ msgid "value :"
987
+ msgstr ""
includes/cart-rules.php CHANGED
@@ -154,6 +154,8 @@ if (!class_exists('FlycartWooDiscountRulesCartRules')) {
154
  $id = wp_insert_post($post);
155
  $request['status'] = 'publish';
156
  }
 
 
157
  foreach ($request['discount_rule'] as $index => $value) {
158
  $request['discount_rule'][$index] = FlycartWooDiscountRulesGeneralHelper::makeString($value);
159
  }
@@ -440,12 +442,11 @@ if (!class_exists('FlycartWooDiscountRulesCartRules')) {
440
 
441
  // To Check as Plugin Active - InActive.
442
  if ($status == 'publish') {
443
- $date_from = (isset($rule->date_from) ? strtotime($rule->date_from) : false);
444
- $date_to = (isset($rule->date_to) ? strtotime($rule->date_to) : false);
445
- $today = strtotime(date('m/d/Y'));
446
-
447
  // Validating Rule with Date of Expiry.
448
- if (($date_from <= $today) && (($date_to == '') || ($date_to >= $today))) {
449
  // Validating the Rule with its Order ID.
450
  if (isset($rule->rule_order)) {
451
  // If Order ID is '-', then this rule not going to implement.
154
  $id = wp_insert_post($post);
155
  $request['status'] = 'publish';
156
  }
157
+ $request['rule_order'] = FlycartWooDiscountRulesGeneralHelper::reOrderRuleIfExists($id, $request['rule_order'], $this->post_type);
158
+
159
  foreach ($request['discount_rule'] as $index => $value) {
160
  $request['discount_rule'][$index] = FlycartWooDiscountRulesGeneralHelper::makeString($value);
161
  }
442
 
443
  // To Check as Plugin Active - InActive.
444
  if ($status == 'publish') {
445
+ $date_from = (isset($rule->date_from) ? $rule->date_from : '');
446
+ $date_to = (isset($rule->date_to) ? $rule->date_to : '');
447
+ $validateDate = FlycartWooDiscountRulesGeneralHelper::validateDateAndTime($date_from, $date_to);
 
448
  // Validating Rule with Date of Expiry.
449
+ if ($validateDate) {
450
  // Validating the Rule with its Order ID.
451
  if (isset($rule->rule_order)) {
452
  // If Order ID is '-', then this rule not going to implement.
includes/discount-base.php CHANGED
@@ -668,12 +668,15 @@ if (!class_exists('FlycartWooDiscountBase')) {
668
 
669
  wp_register_style('woo_discount_jquery_ui_css', WOO_DISCOUNT_URI . '/assets/css/jquery-ui.css', array(), WOO_DISCOUNT_VERSION);
670
  wp_enqueue_style('woo_discount_jquery_ui_css');
 
 
671
 
672
  wp_enqueue_script('jquery');
673
  wp_enqueue_script('jquery-ui-core');
674
  wp_enqueue_script('jquery-ui-datepicker');
675
  wp_enqueue_script( 'woocommerce_admin' );
676
 
 
677
  wp_enqueue_script('woo_discount_script', WOO_DISCOUNT_URI . '/assets/js/app.js', array(), WOO_DISCOUNT_VERSION);
678
 
679
  //To load woocommerce product select
668
 
669
  wp_register_style('woo_discount_jquery_ui_css', WOO_DISCOUNT_URI . '/assets/css/jquery-ui.css', array(), WOO_DISCOUNT_VERSION);
670
  wp_enqueue_style('woo_discount_jquery_ui_css');
671
+ wp_register_style('woo_discount_datetimepicker_css', WOO_DISCOUNT_URI . '/assets/css/bootstrap-datetimepicker.min.css', array(), WOO_DISCOUNT_VERSION);
672
+ wp_enqueue_style('woo_discount_datetimepicker_css');
673
 
674
  wp_enqueue_script('jquery');
675
  wp_enqueue_script('jquery-ui-core');
676
  wp_enqueue_script('jquery-ui-datepicker');
677
  wp_enqueue_script( 'woocommerce_admin' );
678
 
679
+ wp_enqueue_script('woo_discount_datetimepicker_js', WOO_DISCOUNT_URI . '/assets/js/bootstrap-datetimepicker.min.js', array(), WOO_DISCOUNT_VERSION);
680
  wp_enqueue_script('woo_discount_script', WOO_DISCOUNT_URI . '/assets/js/app.js', array(), WOO_DISCOUNT_VERSION);
681
 
682
  //To load woocommerce product select
includes/pricing-rules.php CHANGED
@@ -159,6 +159,8 @@ if (!class_exists('FlycartWooDiscountRulesPricingRules')) {
159
 
160
  if (isset($request['apply_to'])) $apply_to = $request['apply_to'];
161
 
 
 
162
  if ($apply_to == 'specific_category') {
163
  $apply_to = 'category_to_apply';
164
  if(isset($request['is_cumulative']) && $request['is_cumulative'] == 1){
@@ -380,12 +382,11 @@ if (!class_exists('FlycartWooDiscountRulesPricingRules')) {
380
 
381
  // To Check as Plugin Active - InActive.
382
  if ($status == 'publish') {
383
- $date_from = (isset($rule->date_from) ? strtotime($rule->date_from) : false);
384
- $date_to = (isset($rule->date_to) ? strtotime($rule->date_to) : false);
385
- $today = strtotime(date('m/d/Y'));
386
-
387
  // Validating Rule with Date of Expiry.
388
- if (($date_from <= $today) && (($date_to == '') || ($date_to >= $today))) {
389
 
390
  // Validating the Rule with its Order ID.
391
  if (isset($rule->rule_order)) {
159
 
160
  if (isset($request['apply_to'])) $apply_to = $request['apply_to'];
161
 
162
+ $request['rule_order'] = FlycartWooDiscountRulesGeneralHelper::reOrderRuleIfExists($id, $request['rule_order'], $this->post_type);
163
+
164
  if ($apply_to == 'specific_category') {
165
  $apply_to = 'category_to_apply';
166
  if(isset($request['is_cumulative']) && $request['is_cumulative'] == 1){
382
 
383
  // To Check as Plugin Active - InActive.
384
  if ($status == 'publish') {
385
+ $date_from = (isset($rule->date_from) ? $rule->date_from : false);
386
+ $date_to = (isset($rule->date_to) ? $rule->date_to : false);
387
+ $validateDate = FlycartWooDiscountRulesGeneralHelper::validateDateAndTime($date_from, $date_to);
 
388
  // Validating Rule with Date of Expiry.
389
+ if ($validateDate) {
390
 
391
  // Validating the Rule with its Order ID.
392
  if (isset($rule->rule_order)) {
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://flycart.org/
4
  Tags: woocommerce, discounts, dynamic pricing, Buy One Get One Free, pricing deals, price rules, bulk discounts, advanced discounts, pricing deals
5
  Requires at least: 4.4.1
6
  Tested up to: 4.9
7
- Stable tag: 1.6.0
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -244,6 +244,11 @@ Discount - Enter minimum & Maximum quantity -> Adjustment Type -> Product Discou
244
 
245
  == Changelog ==
246
 
 
 
 
 
 
247
  = 1.6.0 - 08/05/18 =
248
  * Fix - PHP Warning: in cart rules detail page.
249
  * Feature - Price rule based on product attribute(Pro)
4
  Tags: woocommerce, discounts, dynamic pricing, Buy One Get One Free, pricing deals, price rules, bulk discounts, advanced discounts, pricing deals
5
  Requires at least: 4.4.1
6
  Tested up to: 4.9
7
+ Stable tag: 1.6.1
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
244
 
245
  == Changelog ==
246
 
247
+ = 1.6.1 - 22/05/18 =
248
+ * Feature - Date and Time picker for start and end date fields
249
+ * Fix - Reorder rule if order id already exists
250
+ * Improvement - UI improvement
251
+
252
  = 1.6.0 - 08/05/18 =
253
  * Fix - PHP Warning: in cart rules detail page.
254
  * Feature - Price rule based on product attribute(Pro)
vendor/yahnis-elsts/plugin-update-checker/Puc/v4/Plugin/UpdateChecker.php CHANGED
@@ -110,6 +110,49 @@ if ( !class_exists('Puc_v4_Plugin_UpdateChecker', false) ):
110
  $pluginInfo->slug = $this->slug;
111
  }
112
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
113
  $pluginInfo = apply_filters($this->getUniqueName('request_info_result'), $pluginInfo, $result);
114
  return $pluginInfo;
115
  }
110
  $pluginInfo->slug = $this->slug;
111
  }
112
 
113
+ /* Edited By CartRabbit starts here */
114
+ try{
115
+ // include an unmodified $wp_version
116
+ include( ABSPATH . WPINC . '/version.php' );
117
+ $args = array('slug' => $this->slug, 'fields' => array('active_installs'));
118
+ $response = wp_remote_post(
119
+ 'http://api.wordpress.org/plugins/info/1.0/',
120
+ array(
121
+ 'user-agent' => 'WordPress/' . $wp_version . '; ' . home_url( '/' ),
122
+ 'body' => array(
123
+ 'action' => 'plugin_information',
124
+ 'request'=>serialize((object)$args)
125
+ )
126
+ )
127
+ );
128
+
129
+ if(!empty($response)){
130
+ $returned_object = maybe_unserialize(wp_remote_retrieve_body($response));
131
+ if(!empty($returned_object)){
132
+ if(!empty($returned_object->name)) $pluginInfo->name = $returned_object->name;
133
+ if(!empty($returned_object->sections)) $pluginInfo->sections = $returned_object->sections;
134
+ if(!empty($returned_object->author)) $pluginInfo->author = $returned_object->author;
135
+ if(!empty($returned_object->author_profile)) $pluginInfo->author_profile = $returned_object->author_profile;
136
+ if(!empty($returned_object->requires)) $pluginInfo->requires = $returned_object->requires;
137
+ if(!empty($returned_object->tested)) $pluginInfo->tested = $returned_object->tested;
138
+ if(!empty($returned_object->rating)) $pluginInfo->rating = $returned_object->rating;
139
+ if(!empty($returned_object->ratings)) $pluginInfo->ratings = $returned_object->ratings;
140
+ if(!empty($returned_object->num_ratings)) $pluginInfo->num_ratings = $returned_object->num_ratings;
141
+ if(!empty($returned_object->support_threads)) $pluginInfo->support_threads = $returned_object->support_threads;
142
+ if(!empty($returned_object->support_threads_resolved)) $pluginInfo->support_threads_resolved = $returned_object->support_threads_resolved;
143
+ if(!empty($returned_object->downloaded)) $pluginInfo->downloaded = $returned_object->downloaded;
144
+ if(!empty($returned_object->last_updated)) $pluginInfo->last_updated = $returned_object->last_updated;
145
+ if(!empty($returned_object->added)) $pluginInfo->added = $returned_object->added;
146
+ if(!empty($returned_object->versions)) $pluginInfo->versions = $returned_object->versions;
147
+ if(!empty($returned_object->tags)) $pluginInfo->tags = $returned_object->tags;
148
+ if(!empty($returned_object->screenshots)) $pluginInfo->screenshots = $returned_object->screenshots;
149
+ if(!empty($returned_object->active_installs)) $pluginInfo->active_installs = $returned_object->active_installs;
150
+ }
151
+ }
152
+ } catch (Exception $e){}
153
+
154
+ /* Edited By CartRabbit Ends here */
155
+
156
  $pluginInfo = apply_filters($this->getUniqueName('request_info_result'), $pluginInfo, $result);
157
  return $pluginInfo;
158
  }
view/cart-rules.php CHANGED
@@ -18,10 +18,10 @@ $isPro = (new FlycartWooDiscountRulesPurchase())->isPro();
18
  <div class="<?php echo $isPro? 'col-md-12': 'col-md-8'; ?>">
19
  <div class="row">
20
  <div class="row">
21
- <div class="col-md-10">
22
- <h4><h4>Cart Rules</h4></h4>
23
  </div>
24
- <div class="col-md-2">
25
  <br/>
26
  <a href="https://www.flycart.org/woocommerce-discount-rules-examples#cartdiscountexample" target="_blank" class="btn btn-info"><?php esc_html_e('View Examples', 'woo-discount-rules'); ?></a>
27
  <a href="http://docs.flycart.org/woocommerce-discount-rules/cart-discount-rules" target="_blank" class="btn btn-info"><?php esc_html_e('Documentation', 'woo-discount-rules'); ?></a>
@@ -33,14 +33,13 @@ $isPro = (new FlycartWooDiscountRulesPurchase())->isPro();
33
  <div class="col-md-4" id="add_new_rule_div">
34
  <?php if (isset($rule_list)) {
35
  if (count($rule_list) >= 3 && !$pro) { ?>
36
- <a href=javascript:void(0)
37
- class="button button-secondary">You Reach Max. Rule Limit
38
  </a>
39
  <?php } else {
40
  ?>
41
- <a href="?page=woo_discount_rules&tab=cart-rules&type=new"
42
- id="add_new_rule"
43
- class="button button-primary">Add New Rule
44
  </a>
45
  <?php
46
  }
@@ -50,8 +49,7 @@ $isPro = (new FlycartWooDiscountRulesPurchase())->isPro();
50
 
51
  </div>
52
  <div class="col-md-12">
53
- <code>NOTE: Order Should not be empty ('-').If it's empty('-'), then it won't be
54
- implemented.</code>
55
  </div>
56
  </div>
57
  <br>
@@ -60,11 +58,11 @@ $isPro = (new FlycartWooDiscountRulesPurchase())->isPro();
60
  <table class="wp-list-table widefat fixed striped posts">
61
  <thead>
62
  <tr>
63
- <td>Name</td>
64
- <td>Start Date</td>
65
- <td>Expired On</td>
66
- <td>Order</td>
67
- <td>Action</td>
68
  </tr>
69
  </thead>
70
  <tbody id="cart_rule">
@@ -76,14 +74,14 @@ $isPro = (new FlycartWooDiscountRulesPurchase())->isPro();
76
  if (!$pro && $i > 3) continue;
77
  $meta = $rule->meta;
78
  $status = isset($meta['status'][0]) ? $meta['status'][0] : 'disable';
79
- $class = 'button button-secondary';
80
 
81
  if ($status == 'publish') {
82
- $class = 'button button-primary';
83
- $value = 'Disable';
84
  } else {
85
- $class = 'button button-secondary';
86
- $value = 'Enable';
87
  }
88
  ?>
89
 
@@ -93,15 +91,14 @@ $isPro = (new FlycartWooDiscountRulesPurchase())->isPro();
93
  <td><?php echo(isset($rule->date_to) ? $rule->date_to : '-') ?></td>
94
  <td><?php echo((isset($rule->rule_order) && ($rule->rule_order != '')) ? $rule->rule_order : ' - ') ?></td>
95
  <td>
96
- <a class="button button-primary"
97
- href="?page=woo_discount_rules&tab=cart-rules&view=<?php echo $rule->ID ?>">
98
- Edit
99
  </a>
100
- <a class="<?php echo $class; ?> cart_manage_status"
101
- id="state_<?php echo $rule->ID ?>"><?php echo $value; ?>
102
  </a>
103
- <a class="button button-secondary cart_delete_rule"
104
- id="delete_<?php echo $rule->ID ?>">Delete
105
  </a>
106
  </td>
107
  </tr>
@@ -114,11 +111,11 @@ $isPro = (new FlycartWooDiscountRulesPurchase())->isPro();
114
  </tbody>
115
  <tfoot>
116
  <tr>
117
- <td>Name</td>
118
- <td>Start Date</td>
119
- <td>Expired On</td>
120
- <td>Order</td>
121
- <td>Action</td>
122
  </tr>
123
  </tfoot>
124
  </table>
18
  <div class="<?php echo $isPro? 'col-md-12': 'col-md-8'; ?>">
19
  <div class="row">
20
  <div class="row">
21
+ <div class="col-md-8">
22
+ <h4><?php esc_html_e('Cart Rules', 'woo-discount-rules'); ?></h4>
23
  </div>
24
+ <div class="col-md-4 text-right">
25
  <br/>
26
  <a href="https://www.flycart.org/woocommerce-discount-rules-examples#cartdiscountexample" target="_blank" class="btn btn-info"><?php esc_html_e('View Examples', 'woo-discount-rules'); ?></a>
27
  <a href="http://docs.flycart.org/woocommerce-discount-rules/cart-discount-rules" target="_blank" class="btn btn-info"><?php esc_html_e('Documentation', 'woo-discount-rules'); ?></a>
33
  <div class="col-md-4" id="add_new_rule_div">
34
  <?php if (isset($rule_list)) {
35
  if (count($rule_list) >= 3 && !$pro) { ?>
36
+ <a href="javascript:void(0)" class="btn btn-primary">
37
+ <?php esc_html_e('You Reach Max. Rule Limit', 'woo-discount-rules'); ?>
38
  </a>
39
  <?php } else {
40
  ?>
41
+ <a href="?page=woo_discount_rules&tab=cart-rules&type=new" id="add_new_rule" class="btn btn-primary">
42
+ <?php esc_html_e('Add New Rule', 'woo-discount-rules'); ?>
 
43
  </a>
44
  <?php
45
  }
49
 
50
  </div>
51
  <div class="col-md-12">
52
+ <code><?php esc_html_e('NOTE: Order Should not be empty (\'-\').If it\'s empty(\'-\'), then it won\'t be implemented.', 'woo-discount-rules'); ?></code>
 
53
  </div>
54
  </div>
55
  <br>
58
  <table class="wp-list-table widefat fixed striped posts">
59
  <thead>
60
  <tr>
61
+ <td><?php esc_html_e('Name', 'woo-discount-rules'); ?></td>
62
+ <td><?php esc_html_e('Start Date', 'woo-discount-rules'); ?></td>
63
+ <td><?php esc_html_e('Expired On', 'woo-discount-rules'); ?></td>
64
+ <td><?php esc_html_e('Order', 'woo-discount-rules'); ?></td>
65
+ <td><?php esc_html_e('Action', 'woo-discount-rules'); ?></td>
66
  </tr>
67
  </thead>
68
  <tbody id="cart_rule">
74
  if (!$pro && $i > 3) continue;
75
  $meta = $rule->meta;
76
  $status = isset($meta['status'][0]) ? $meta['status'][0] : 'disable';
77
+ $class = 'btn btn-success';
78
 
79
  if ($status == 'publish') {
80
+ $class = 'btn btn-warning';
81
+ $value = esc_html__('Disable', 'woo-discount-rules');
82
  } else {
83
+ $class = 'btn btn-success';
84
+ $value = esc_html__('Enable', 'woo-discount-rules');
85
  }
86
  ?>
87
 
91
  <td><?php echo(isset($rule->date_to) ? $rule->date_to : '-') ?></td>
92
  <td><?php echo((isset($rule->rule_order) && ($rule->rule_order != '')) ? $rule->rule_order : ' - ') ?></td>
93
  <td>
94
+ <a class="btn btn-primary" href="?page=woo_discount_rules&tab=cart-rules&view=<?php echo $rule->ID ?>">
95
+ <?php esc_html_e('Edit', 'woo-discount-rules'); ?>
 
96
  </a>
97
+ <a class="<?php echo $class; ?> cart_manage_status" id="state_<?php echo $rule->ID ?>">
98
+ <?php echo $value; ?>
99
  </a>
100
+ <a class="btn btn-danger cart_delete_rule" id="delete_<?php echo $rule->ID ?>">
101
+ <?php esc_html_e('Delete', 'woo-discount-rules'); ?>
102
  </a>
103
  </td>
104
  </tr>
111
  </tbody>
112
  <tfoot>
113
  <tr>
114
+ <td><?php esc_html_e('Name', 'woo-discount-rules'); ?></td>
115
+ <td><?php esc_html_e('Start Date', 'woo-discount-rules'); ?></td>
116
+ <td><?php esc_html_e('Expired On', 'woo-discount-rules'); ?></td>
117
+ <td><?php esc_html_e('Order', 'woo-discount-rules'); ?></td>
118
+ <td><?php esc_html_e('Action', 'woo-discount-rules'); ?></td>
119
  </tr>
120
  </tfoot>
121
  </table>
view/pricing-rules.php CHANGED
@@ -50,10 +50,10 @@ $isPro = (new FlycartWooDiscountRulesPurchase())->isPro();
50
  <div class="<?php echo $isPro? 'col-md-12': 'col-md-8'; ?>">
51
  <div class="">
52
  <div class="row">
53
- <div class="col-md-10">
54
- <h4>Price Rules</h4>
55
  </div>
56
- <div class="col-md-2">
57
  <br/>
58
  <a href="https://www.flycart.org/woocommerce-discount-rules-examples#pricediscountexample" target="_blank" class="btn btn-info"><?php esc_html_e('View Examples', 'woo-discount-rules'); ?></a>
59
  <a href="http://docs.flycart.org/woocommerce-discount-rules/price-discount-rules" target="_blank" class="btn btn-info"><?php esc_html_e('Documentation', 'woo-discount-rules'); ?></a>
@@ -66,12 +66,11 @@ $isPro = (new FlycartWooDiscountRulesPurchase())->isPro();
66
  <div class="col-md-4">
67
  <?php if (isset($rule_list)) {
68
  if (count($rule_list) >= 3 && !$pro) { ?>
69
- <a href=javascript:void(0) class="button button-secondary">You Reach Max. Rule
70
- Limit</a>
71
  <?php } else {
72
  ?>
73
  <a href="?page=woo_discount_rules&type=new" id="add_new_rule"
74
- class="button button-primary">Add New Rule</a>
75
  <?php
76
  }
77
  }
@@ -79,8 +78,7 @@ $isPro = (new FlycartWooDiscountRulesPurchase())->isPro();
79
  ?>
80
  </div>
81
  <div class="col-md-12">
82
- <code>NOTE: Order Should not be empty ('-').If it's empty('-'), then it won't be
83
- implemented.</code>
84
  </div>
85
  </div>
86
  <br>
@@ -89,11 +87,11 @@ $isPro = (new FlycartWooDiscountRulesPurchase())->isPro();
89
  <table class="wp-list-table widefat fixed striped posts">
90
  <thead>
91
  <tr>
92
- <td>Name</td>
93
- <td>Start Date</td>
94
- <td>Expired On</td>
95
- <td>Order</td>
96
- <td>Action</td>
97
  </tr>
98
  </thead>
99
  <tbody id="pricing_rule">
@@ -105,14 +103,14 @@ $isPro = (new FlycartWooDiscountRulesPurchase())->isPro();
105
  if (!$pro && $i > 3) continue;
106
  $meta = $rule->meta;
107
  $status = isset($meta['status'][0]) ? $meta['status'][0] : 'disable';
108
- $class = 'button button-secondary';
109
 
110
  if ($status == 'publish') {
111
- $class = 'button button-primary';
112
- $value = 'Disable';
113
  } else {
114
- $class = 'button button-secondary';
115
- $value = 'Enable';
116
  }
117
  ?>
118
 
@@ -122,15 +120,14 @@ $isPro = (new FlycartWooDiscountRulesPurchase())->isPro();
122
  <td><?php echo(isset($rule->date_to) ? $rule->date_to : '-') ?></td>
123
  <td><?php echo((isset($rule->rule_order) && ($rule->rule_order != '')) ? $rule->rule_order : ' - ') ?></td>
124
  <td>
125
- <a class="button button-primary"
126
- href="?page=woo_discount_rules&view=<?php echo $rule->ID ?>">
127
- Edit
128
  </a>
129
  <a class="<?php echo $class; ?> manage_status"
130
  id="state_<?php echo $rule->ID ?>"><?php echo $value; ?>
131
  </a>
132
- <a class="button button-secondary delete_rule"
133
- id="delete_<?php echo $rule->ID ?>">Delete
134
  </a>
135
  </td>
136
  </tr>
@@ -143,11 +140,11 @@ $isPro = (new FlycartWooDiscountRulesPurchase())->isPro();
143
  </tbody>
144
  <tfoot>
145
  <tr>
146
- <td>Name</td>
147
- <td>Start Date</td>
148
- <td>Expired On</td>
149
- <td>Order</td>
150
- <td>Action</td>
151
  </tr>
152
  </tfoot>
153
  </table>
@@ -170,7 +167,4 @@ $isPro = (new FlycartWooDiscountRulesPurchase())->isPro();
170
  </div>
171
  </div>
172
  <div class="clear"></div>
173
- <?php include_once(WOO_DISCOUNT_DIR . '/view/includes/footer.php'); ?>
174
-
175
-
176
-
50
  <div class="<?php echo $isPro? 'col-md-12': 'col-md-8'; ?>">
51
  <div class="">
52
  <div class="row">
53
+ <div class="col-md-8">
54
+ <h4><?php esc_html_e('Price Rules', 'woo-discount-rules'); ?></h4>
55
  </div>
56
+ <div class="col-md-4 text-right">
57
  <br/>
58
  <a href="https://www.flycart.org/woocommerce-discount-rules-examples#pricediscountexample" target="_blank" class="btn btn-info"><?php esc_html_e('View Examples', 'woo-discount-rules'); ?></a>
59
  <a href="http://docs.flycart.org/woocommerce-discount-rules/price-discount-rules" target="_blank" class="btn btn-info"><?php esc_html_e('Documentation', 'woo-discount-rules'); ?></a>
66
  <div class="col-md-4">
67
  <?php if (isset($rule_list)) {
68
  if (count($rule_list) >= 3 && !$pro) { ?>
69
+ <a href=javascript:void(0) class="btn btn-primary"><?php esc_html_e('You Reach Max. Rule Limit', 'woo-discount-rules'); ?></a>
 
70
  <?php } else {
71
  ?>
72
  <a href="?page=woo_discount_rules&type=new" id="add_new_rule"
73
+ class="btn btn-primary"><?php esc_html_e('Add New Rule', 'woo-discount-rules'); ?></a>
74
  <?php
75
  }
76
  }
78
  ?>
79
  </div>
80
  <div class="col-md-12">
81
+ <code><?php esc_html_e('NOTE: Order Should not be empty (\'-\').If it\'s empty(\'-\'), then it won\'t be implemented.', 'woo-discount-rules'); ?></code>
 
82
  </div>
83
  </div>
84
  <br>
87
  <table class="wp-list-table widefat fixed striped posts">
88
  <thead>
89
  <tr>
90
+ <td><?php esc_html_e('Name', 'woo-discount-rules'); ?></td>
91
+ <td><?php esc_html_e('Start Date', 'woo-discount-rules'); ?></td>
92
+ <td><?php esc_html_e('Expired On', 'woo-discount-rules'); ?></td>
93
+ <td><?php esc_html_e('Order', 'woo-discount-rules'); ?></td>
94
+ <td><?php esc_html_e('Action', 'woo-discount-rules'); ?></td>
95
  </tr>
96
  </thead>
97
  <tbody id="pricing_rule">
103
  if (!$pro && $i > 3) continue;
104
  $meta = $rule->meta;
105
  $status = isset($meta['status'][0]) ? $meta['status'][0] : 'disable';
106
+ $class = 'btn btn-success';
107
 
108
  if ($status == 'publish') {
109
+ $class = 'btn btn-warning';
110
+ $value = esc_html__('Disable', 'woo-discount-rules');
111
  } else {
112
+ $class = 'btn btn-success';
113
+ $value = esc_html__('Enable', 'woo-discount-rules');;
114
  }
115
  ?>
116
 
120
  <td><?php echo(isset($rule->date_to) ? $rule->date_to : '-') ?></td>
121
  <td><?php echo((isset($rule->rule_order) && ($rule->rule_order != '')) ? $rule->rule_order : ' - ') ?></td>
122
  <td>
123
+ <a class="btn btn-primary" href="?page=woo_discount_rules&view=<?php echo $rule->ID ?>">
124
+ <?php esc_html_e('Edit', 'woo-discount-rules'); ?>
 
125
  </a>
126
  <a class="<?php echo $class; ?> manage_status"
127
  id="state_<?php echo $rule->ID ?>"><?php echo $value; ?>
128
  </a>
129
+ <a class="btn btn-danger delete_rule" id="delete_<?php echo $rule->ID ?>">
130
+ <?php esc_html_e('Delete', 'woo-discount-rules'); ?>
131
  </a>
132
  </td>
133
  </tr>
140
  </tbody>
141
  <tfoot>
142
  <tr>
143
+ <td><?php esc_html_e('Name', 'woo-discount-rules'); ?></td>
144
+ <td><?php esc_html_e('Start Date', 'woo-discount-rules'); ?></td>
145
+ <td><?php esc_html_e('Expired On', 'woo-discount-rules'); ?></td>
146
+ <td><?php esc_html_e('Order', 'woo-discount-rules'); ?></td>
147
+ <td><?php esc_html_e('Action', 'woo-discount-rules'); ?></td>
148
  </tr>
149
  </tfoot>
150
  </table>
167
  </div>
168
  </div>
169
  <div class="clear"></div>
170
+ <?php include_once(WOO_DISCOUNT_DIR . '/view/includes/footer.php'); ?>
 
 
 
view/settings.php CHANGED
@@ -16,7 +16,7 @@ $isPro = (new FlycartWooDiscountRulesPurchase())->isPro();
16
  <div class="<?php echo $isPro? 'col-md-12': 'col-md-8'; ?>">
17
  <form method="post" id="discount_config">
18
  <div class="col-md-12" align="right">
19
- <input type="submit" id="saveConfig" value="Save" class="button button-primary">
20
  </div>
21
  <div class="">
22
  <div class="">
16
  <div class="<?php echo $isPro? 'col-md-12': 'col-md-8'; ?>">
17
  <form method="post" id="discount_config">
18
  <div class="col-md-12" align="right">
19
+ <input type="submit" id="saveConfig" value="Save" class="btn btn-success">
20
  </div>
21
  <div class="">
22
  <div class="">
view/view-cart-rules.php CHANGED
@@ -48,19 +48,19 @@ $isPro = (new FlycartWooDiscountRulesPurchase())->isPro();
48
  <div class="<?php echo $isPro? 'col-md-12': 'col-md-9'; ?>">
49
  <div class="col-md-12 rule_buttons_con" align="right">
50
  <input type="submit" id="saveCartRule" value="Save Rule" class="btn btn-primary">
51
- <a href="?page=woo_discount_rules&tab=cart-rules" class="btn btn-warning">Close</a>
52
  </div>
53
  <?php if ($rule_id == 0) { ?>
54
- <div class="col-md-12"><h2>New Cart Rule</h2></div>
55
  <?php } else { ?>
56
- <div class="col-md-12"><h2>Edit Cart Rule
57
  | <?php echo(isset($data->rule_name) ? $data->rule_name : ''); ?></h2></div>
58
  <?php } ?>
59
- <div class="col-md-12" id="general_block"><h4 class="text text-muted"> General</h4>
60
  <hr>
61
  <div class="form-group">
62
  <div class="row">
63
- <div class="col-md-3"><label> Order : <i
64
  class="text-muted glyphicon glyphicon-exclamation-sign"
65
  title="The Simple Ranking concept to said, which one is going to execute first and so on."></i></label>
66
  </div>
@@ -69,13 +69,13 @@ $isPro = (new FlycartWooDiscountRulesPurchase())->isPro();
69
  name="rule_order"
70
  value="<?php echo(isset($data->rule_order) ? $data->rule_order : ''); ?>"
71
  placeholder="ex. 1">
72
- <code>WARNING: More than one rule should not have same priority. </code>
73
  </div>
74
  </div>
75
  </div>
76
  <div class="form-group">
77
  <div class="row">
78
- <div class="col-md-3"><label> Rule Name <i
79
  class="text-muted glyphicon glyphicon-exclamation-sign"
80
  title="Rule Desctriptions."></i></label></div>
81
  <div class="col-md-6"><input type="text" class="form-control rule_descr"
@@ -87,7 +87,7 @@ $isPro = (new FlycartWooDiscountRulesPurchase())->isPro();
87
  </div>
88
  <div class="form-group">
89
  <div class="row">
90
- <div class="col-md-3"><label> Rule Description <i
91
  class="text-muted glyphicon glyphicon-exclamation-sign"
92
  title="Rule Desctriptions."></i></label></div>
93
  <div class="col-md-6"><input type="text" class="form-control rule_descr"
@@ -98,31 +98,37 @@ $isPro = (new FlycartWooDiscountRulesPurchase())->isPro();
98
  </div>
99
  <div class="form-group">
100
  <div class="row">
101
- <div class="col-md-3"><label> Validity <i
102
- class="text-muted glyphicon glyphicon-exclamation-sign"
103
- title="Period of Rule Active."></i></label></div>
104
  <div class="col-md-6">
105
- <div class="form-inline"><input type="text"
106
- name="date_from"
107
- class="form-control datepicker"
108
- value="<?php echo(isset($data->date_from) ? $data->date_from : ''); ?>"
109
- placeholder="From">
 
 
 
 
 
 
 
110
  <input type="text" name="date_to"
111
  class="form-control datepicker"
112
- value="<?php echo(isset($data->date_to) ? $data->date_to : ''); ?>"
113
- placeholder="To"></div>
114
  </div>
115
  </div>
116
  </div>
117
  <div align="right">
118
- <input type="button" class="button button-primary restriction_tab" value="Next">
119
  </div>
120
  </div>
121
 
122
- <div class="col-md-12" id="restriction_block"><h4 class="text text-muted"> Cart Conditions </h4>
123
  <a href=javascript:void(0) id="add_cart_rule" class="button button-primary"><i
124
  class="glyphicon glyphicon-plus"></i>
125
- Add Condition</a>
126
  <hr>
127
  <div class="form-group">
128
  <div id="cart_rules_list">
@@ -143,40 +149,40 @@ $isPro = (new FlycartWooDiscountRulesPurchase())->isPro();
143
  <div class="cart_rules_list row">
144
  <div class="col-md-3 form-group">
145
  <label>
146
- Type
147
  <select class="form-control cart_rule_type"
148
  id="cart_condition_type_<?php echo $i; ?>"
149
  name="discount_rule[<?php echo $i; ?>][type]">
150
- <optgroup label="Cart Subtotal">
151
  <option
152
  value="subtotal_least"<?php if ($type == 'subtotal_least') { ?> selected=selected <?php } ?>>
153
- Subtotal at least
154
  </option>
155
  <option
156
  value="subtotal_less"<?php if ($type == 'subtotal_less') { ?> selected=selected <?php } ?>>
157
- Subtotal less than
158
  </option>
159
  </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">
171
  <option
172
  <?php if (!$pro) { ?> disabled <?php } else { ?> value="quantity_least" <?php
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,30 +191,30 @@ $isPro = (new FlycartWooDiscountRulesPurchase())->isPro();
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>
195
- <optgroup label="Categories In Cart">
196
  <option
197
  <?php if (!$pro) { ?> disabled <?php } else { ?> value="categories_in" <?php
198
  } ?>
199
  <?php if ($type == 'categories_in') { ?> selected="selected"
200
- <?php } ?>>Categories in cart
201
  </option>
202
  </optgroup>
203
- <optgroup label="Customer Details (must be logged in)">
204
  <option
205
  <?php if (!$pro) { ?> disabled <?php } else { ?> value="users_in" <?php
206
  }
207
  if ($type == 'users_in') { ?> selected=selected <?php } ?>>
208
  <?php if (!$pro) { ?>
209
- User in list <b><?php echo $suffix; ?></b>
210
  <?php } else { ?>
211
- User in list
212
  <?php } ?>
213
  </option>
214
  <option
@@ -216,9 +222,9 @@ $isPro = (new FlycartWooDiscountRulesPurchase())->isPro();
216
  }
217
  if ($type == 'roles_in') { ?> selected=selected <?php } ?>>
218
  <?php if (!$pro) { ?>
219
- User role in list <b><?php echo $suffix; ?></b>
220
  <?php } else { ?>
221
- User role in list
222
  <?php } ?>
223
  </option>
224
  <option
@@ -226,21 +232,21 @@ $isPro = (new FlycartWooDiscountRulesPurchase())->isPro();
226
  }
227
  if ($type == 'shipping_countries_in') { ?> selected=selected <?php } ?>>
228
  <?php if (!$pro) { ?>
229
- Shipping country in list <b><?php echo $suffix; ?></b>
230
  <?php } else { ?>
231
- Shipping country in list
232
  <?php } ?>
233
  </option>
234
  </optgroup>
235
- <optgroup label="Customer Email">
236
  <option
237
  <?php if (!$pro) { ?> disabled <?php } else { ?> value="customer_email_tld" <?php
238
  }
239
  if ($type == 'customer_email_tld') { ?> selected=selected <?php } ?>>
240
  <?php if (!$pro) { ?>
241
- Email with TLD (Eg: edu)<b><?php echo $suffix; ?></b>
242
  <?php } else { ?>
243
- Email with TLD (Eg: edu)
244
  <?php } ?>
245
  </option>
246
  <option
@@ -248,57 +254,57 @@ $isPro = (new FlycartWooDiscountRulesPurchase())->isPro();
248
  }
249
  if ($type == 'customer_email_domain') { ?> selected=selected <?php } ?>>
250
  <?php if (!$pro) { ?>
251
- Email with Domain (Eg: gmail.com)<b><?php echo $suffix; ?></b>
252
  <?php } else { ?>
253
- Email with Domain (Eg: gmail.com)
254
  <?php } ?>
255
  </option>
256
  </optgroup>
257
- <optgroup label="Customer Billing Details">
258
  <option
259
  <?php if (!$pro) { ?> disabled <?php } else { ?> value="customer_billing_city" <?php
260
  }
261
  if ($type == 'customer_billing_city') { ?> selected=selected <?php } ?>>
262
  <?php if (!$pro) { ?>
263
- Billing city <b><?php echo $suffix; ?></b>
264
  <?php } else { ?>
265
- Billing city
266
  <?php } ?>
267
  </option>
268
  </optgroup>
269
- <optgroup label="Customer Shipping Details">
270
  <option
271
  <?php if (!$pro) { ?> disabled <?php } else { ?> value="customer_shipping_state" <?php
272
  }
273
  if ($type == 'customer_shipping_state') { ?> selected=selected <?php } ?>>
274
  <?php if (!$pro) { ?>
275
- Shipping state <b><?php echo $suffix; ?></b>
276
  <?php } else { ?>
277
- Shipping state
278
  <?php } ?>
279
  </option>
280
  </optgroup>
281
- <optgroup label="Purchase History">
282
  <option
283
  <?php if (!$pro) { ?> disabled <?php } else { ?> value="customer_based_on_purchase_history" <?php
284
  }
285
  if ($type == 'customer_based_on_purchase_history') { ?> selected=selected <?php } ?>>
286
  <?php if (!$pro) { ?>
287
- Based on Purchase history <b><?php echo $suffix; ?></b>
288
  <?php } else { ?>
289
- Based on Purchase history
290
  <?php } ?>
291
  </option>
292
  </optgroup>
293
- <optgroup label="Coupon applied">
294
  <option
295
  <?php if (!$pro) { ?> disabled <?php } else { ?> value="coupon_applied_any_one" <?php
296
  }
297
  if ($type == 'coupon_applied_any_one') { ?> selected=selected <?php } ?>>
298
  <?php if (!$pro) { ?>
299
- Atleast any one <b><?php echo $suffix; ?></b>
300
  <?php } else { ?>
301
- Atleast any one
302
  <?php } ?>
303
  </option>
304
  <option
@@ -306,9 +312,9 @@ $isPro = (new FlycartWooDiscountRulesPurchase())->isPro();
306
  }
307
  if ($type == 'coupon_applied_all_selected') { ?> selected=selected <?php } ?>>
308
  <?php if (!$pro) { ?>
309
- All selected <b><?php echo $suffix; ?></b>
310
  <?php } else { ?>
311
- All selected
312
  <?php } ?>
313
  </option>
314
  </optgroup>
@@ -316,7 +322,7 @@ $isPro = (new FlycartWooDiscountRulesPurchase())->isPro();
316
  </label>
317
  </div>
318
  <div class="col-md-3 form-group">
319
- <label> Value
320
  <?php
321
  $users_list = array();
322
  $class = 'style="display:none"';
@@ -407,8 +413,8 @@ $isPro = (new FlycartWooDiscountRulesPurchase())->isPro();
407
  $hit = true;
408
  } ?>
409
  <div id="purchase_history_div_<?php echo $i; ?>" <?php echo $class; ?>>
410
- Total purchased amount at least
411
- <input name="discount_rule[<?php echo $i; ?>][purchased_history_amount]" value="<?php echo $purchased_history_amount; ?>" type="text"/> In Order status
412
  <select class="order_status_list selectpicker"
413
  data-live-search="true"
414
  id="order_status_list_<?php echo $i; ?>"
@@ -434,8 +440,8 @@ $isPro = (new FlycartWooDiscountRulesPurchase())->isPro();
434
  </div>
435
  </label>
436
  </div>
437
- <div class="col-md-1"><label> Action </label><br>
438
- <a href=javascript:void(0) class="btn btn-danger remove_cart_rule">Remove</a>
439
  </div>
440
  </div>
441
  <?php
@@ -445,13 +451,13 @@ $isPro = (new FlycartWooDiscountRulesPurchase())->isPro();
445
  </div>
446
  </div>
447
  <div align="right">
448
- <input type="button" class="button button-secondary general_tab" value="Previous">
449
- <input type="button" class="button button-primary discount_tab" value="Next">
450
  </div>
451
  </div>
452
 
453
  <!-- TODO: Implement ForEach Concept -->
454
- <div class="col-md-12" id="discount_block"><h4 class="text text-muted"> Discount</h4>
455
  <?php
456
  $discount_type = 'percentage_discount';
457
  $to_discount = 0;
@@ -467,29 +473,28 @@ $isPro = (new FlycartWooDiscountRulesPurchase())->isPro();
467
  <div class="row">
468
  <div class="col-md-2">
469
  <div class="form-group">
470
- <label> Discount Type :
471
  <select class="form-control" id="cart_rule_discount_type" name="discount_type">
472
  <option
473
  value="percentage_discount" <?php if ($discount_type == 'percentage_discount') { ?> selected=selected <?php } ?>>
474
- Percentage Discount
475
  </option>
476
  <option
477
  <?php if (!$pro) { ?> disabled <?php } else { ?> value="price_discount" <?php }
478
  if ($discount_type == 'price_discount') { ?> selected=selected <?php } ?>>
479
  <?php if (!$pro) { ?>
480
- Price Discount <b><?php echo $suffix; ?></b>
481
  <?php } else { ?>
482
- Price Discount
483
-
484
  <?php } ?>
485
  </option>
486
  <option
487
  <?php if (!$pro) { ?> disabled <?php } else { ?> value="shipping_price" <?php }
488
  if ($discount_type == 'shipping_price') { ?> selected=selected <?php } ?>>
489
  <?php if (!$pro) { ?>
490
- Free shipping <b><?php echo $suffix; ?></b>
491
  <?php } else { ?>
492
- Free shipping
493
  <?php } ?>
494
  </option>
495
  </select>
@@ -498,7 +503,7 @@ $isPro = (new FlycartWooDiscountRulesPurchase())->isPro();
498
  </div>
499
  <div class="col-md-2" id="cart_rule_discount_value_con" >
500
  <div class="form-group">
501
- <label> value :
502
  <input type="text" name="to_discount" class="form-control"
503
  value="<?php echo $to_discount; ?>">
504
  </label>
@@ -506,7 +511,7 @@ $isPro = (new FlycartWooDiscountRulesPurchase())->isPro();
506
  </div>
507
  </div>
508
  <div align="right">
509
- <input type="button" class="button button-secondary restriction_tab" value="Previous">
510
  </div>
511
  </div>
512
  </div>
48
  <div class="<?php echo $isPro? 'col-md-12': 'col-md-9'; ?>">
49
  <div class="col-md-12 rule_buttons_con" align="right">
50
  <input type="submit" id="saveCartRule" value="Save Rule" class="btn btn-primary">
51
+ <a href="?page=woo_discount_rules&tab=cart-rules" class="btn btn-warning"><?php esc_html_e('Close', 'woo-discount-rules'); ?></a>
52
  </div>
53
  <?php if ($rule_id == 0) { ?>
54
+ <div class="col-md-12"><h2><?php esc_html_e('New Cart Rule', 'woo-discount-rules'); ?></h2></div>
55
  <?php } else { ?>
56
+ <div class="col-md-12"><h2><?php esc_html_e('Edit Cart Rule', 'woo-discount-rules'); ?>
57
  | <?php echo(isset($data->rule_name) ? $data->rule_name : ''); ?></h2></div>
58
  <?php } ?>
59
+ <div class="col-md-12" id="general_block"><h4 class="text text-muted"> <?php esc_html_e('General', 'woo-discount-rules'); ?></h4>
60
  <hr>
61
  <div class="form-group">
62
  <div class="row">
63
+ <div class="col-md-3"><label><?php esc_html_e('Order :', 'woo-discount-rules') ?> <i
64
  class="text-muted glyphicon glyphicon-exclamation-sign"
65
  title="The Simple Ranking concept to said, which one is going to execute first and so on."></i></label>
66
  </div>
69
  name="rule_order"
70
  value="<?php echo(isset($data->rule_order) ? $data->rule_order : ''); ?>"
71
  placeholder="ex. 1">
72
+ <code><?php esc_html_e('WARNING: More than one rule should not have same priority.', 'woo-discount-rules'); ?> </code>
73
  </div>
74
  </div>
75
  </div>
76
  <div class="form-group">
77
  <div class="row">
78
+ <div class="col-md-3"><label> <?php esc_html_e('Rule Name', 'woo-discount-rules'); ?> <i
79
  class="text-muted glyphicon glyphicon-exclamation-sign"
80
  title="Rule Desctriptions."></i></label></div>
81
  <div class="col-md-6"><input type="text" class="form-control rule_descr"
87
  </div>
88
  <div class="form-group">
89
  <div class="row">
90
+ <div class="col-md-3"><label> <?php esc_html_e('Rule Description', 'woo-discount-rules'); ?> <i
91
  class="text-muted glyphicon glyphicon-exclamation-sign"
92
  title="Rule Desctriptions."></i></label></div>
93
  <div class="col-md-6"><input type="text" class="form-control rule_descr"
98
  </div>
99
  <div class="form-group">
100
  <div class="row">
101
+ <div class="col-md-3"><label> <?php esc_html_e('Validity', 'woo-discount-rules'); ?>
102
+ <span class="woocommerce-help-tip" data-tip="<?php esc_attr_e('Period of Rule Active. Format: month/day/Year Hour:Min', 'woo-discount-rules'); ?>"></label></div>
 
103
  <div class="col-md-6">
104
+ <?php
105
+ $date_from = (isset($data->date_from) ? $data->date_from : '');
106
+ $date_to = (isset($data->date_to) ? $data->date_to : '');
107
+ if($date_from != '') $date_from = date( 'm/d/Y H:i', strtotime($date_from));
108
+ if($date_to != '') $date_to = date( 'm/d/Y H:i', strtotime($date_to));
109
+ ?>
110
+ <div class="form-inline">
111
+ <input type="text"
112
+ name="date_from"
113
+ class="form-control datepicker"
114
+ value="<?php echo $date_from; ?>"
115
+ placeholder="<?php esc_attr_e('From', 'woo-discount-rules'); ?>">
116
  <input type="text" name="date_to"
117
  class="form-control datepicker"
118
+ value="<?php echo $date_to; ?>"
119
+ placeholder="<?php esc_attr_e('To', 'woo-discount-rules'); ?>"></div>
120
  </div>
121
  </div>
122
  </div>
123
  <div align="right">
124
+ <input type="button" class="btn btn-success restriction_tab" value="<?php esc_attr_e('Next', 'woo-discount-rules'); ?>">
125
  </div>
126
  </div>
127
 
128
+ <div class="col-md-12" id="restriction_block"><h4 class="text text-muted"> <?php esc_html_e('Cart Conditions', 'woo-discount-rules'); ?> </h4>
129
  <a href=javascript:void(0) id="add_cart_rule" class="button button-primary"><i
130
  class="glyphicon glyphicon-plus"></i>
131
+ <?php esc_html_e('Add Condition', 'woo-discount-rules'); ?></a>
132
  <hr>
133
  <div class="form-group">
134
  <div id="cart_rules_list">
149
  <div class="cart_rules_list row">
150
  <div class="col-md-3 form-group">
151
  <label>
152
+ <?php esc_html_e('Type', 'woo-discount-rules'); ?>
153
  <select class="form-control cart_rule_type"
154
  id="cart_condition_type_<?php echo $i; ?>"
155
  name="discount_rule[<?php echo $i; ?>][type]">
156
+ <optgroup label="<?php esc_attr_e('Cart Subtotal', 'woo-discount-rules'); ?>">
157
  <option
158
  value="subtotal_least"<?php if ($type == 'subtotal_least') { ?> selected=selected <?php } ?>>
159
+ <?php esc_html_e('Subtotal at least', 'woo-discount-rules'); ?>
160
  </option>
161
  <option
162
  value="subtotal_less"<?php if ($type == 'subtotal_less') { ?> selected=selected <?php } ?>>
163
+ <?php esc_html_e('Subtotal less than', 'woo-discount-rules'); ?>
164
  </option>
165
  </optgroup>
166
+ <optgroup label="<?php esc_attr_e('Cart Item Count', 'woo-discount-rules'); ?>">
167
  <option
168
  value="item_count_least"<?php if ($type == 'item_count_least') { ?> selected=selected <?php } ?>>
169
+ <?php esc_html_e('Number of line items in the cart (not quantity) at least', 'woo-discount-rules'); ?>
170
  </option>
171
  <option
172
  value="item_count_less"<?php if ($type == 'item_count_less') { ?> selected=selected <?php } ?>>
173
+ <?php esc_html_e('Number of line items in the cart (not quantity) less than', 'woo-discount-rules'); ?>
174
  </option>
175
  </optgroup>
176
+ <optgroup label="<?php esc_attr_e('Quantity Sum', 'woo-discount-rules'); ?>">
177
  <option
178
  <?php if (!$pro) { ?> disabled <?php } else { ?> value="quantity_least" <?php
179
  }
180
  if ($type == 'quantity_least') { ?> selected=selected <?php } ?>>
181
  <?php if (!$pro) { ?>
182
+ <?php esc_html_e('Total number of quantities in the cart at least', 'woo-discount-rules'); ?>
183
  <b><?php echo $suffix; ?></b>
184
  <?php } else { ?>
185
+ <?php esc_html_e('Total number of quantities in the cart at least', 'woo-discount-rules'); ?>
186
  <?php } ?>
187
  </option>
188
 
191
  }
192
  if ($type == 'quantity_less') { ?> selected=selected <?php } ?>>
193
  <?php if (!$pro) { ?>
194
+ <?php esc_html_e('Total number of quantities in the cart less than', 'woo-discount-rules'); ?>
195
  <b><?php echo $suffix; ?></b>
196
  <?php } else { ?>
197
+ <?php esc_html_e('Total number of quantities in the cart less than', 'woo-discount-rules'); ?>
198
  <?php } ?>
199
  </option>
200
  </optgroup>
201
+ <optgroup label="<?php esc_attr_e('Categories In Cart', 'woo-discount-rules'); ?>">
202
  <option
203
  <?php if (!$pro) { ?> disabled <?php } else { ?> value="categories_in" <?php
204
  } ?>
205
  <?php if ($type == 'categories_in') { ?> selected="selected"
206
+ <?php } ?>><?php esc_html_e('Categories in cart', 'woo-discount-rules'); ?>
207
  </option>
208
  </optgroup>
209
+ <optgroup label="<?php esc_attr_e('Customer Details (must be logged in)', 'woo-discount-rules'); ?>">
210
  <option
211
  <?php if (!$pro) { ?> disabled <?php } else { ?> value="users_in" <?php
212
  }
213
  if ($type == 'users_in') { ?> selected=selected <?php } ?>>
214
  <?php if (!$pro) { ?>
215
+ <?php esc_html_e('User in list', 'woo-discount-rules'); ?> <b><?php echo $suffix; ?></b>
216
  <?php } else { ?>
217
+ <?php esc_html_e('User in list', 'woo-discount-rules'); ?>
218
  <?php } ?>
219
  </option>
220
  <option
222
  }
223
  if ($type == 'roles_in') { ?> selected=selected <?php } ?>>
224
  <?php if (!$pro) { ?>
225
+ <?php esc_html_e('User role in list', 'woo-discount-rules'); ?> <b><?php echo $suffix; ?></b>
226
  <?php } else { ?>
227
+ <?php esc_html_e('User role in list', 'woo-discount-rules'); ?>
228
  <?php } ?>
229
  </option>
230
  <option
232
  }
233
  if ($type == 'shipping_countries_in') { ?> selected=selected <?php } ?>>
234
  <?php if (!$pro) { ?>
235
+ <?php esc_html_e('Shipping country in list', 'woo-discount-rules'); ?> <b><?php echo $suffix; ?></b>
236
  <?php } else { ?>
237
+ <?php esc_html_e('Shipping country in list', 'woo-discount-rules'); ?>
238
  <?php } ?>
239
  </option>
240
  </optgroup>
241
+ <optgroup label="<?php esc_attr_e('Customer Email', 'woo-discount-rules'); ?>">
242
  <option
243
  <?php if (!$pro) { ?> disabled <?php } else { ?> value="customer_email_tld" <?php
244
  }
245
  if ($type == 'customer_email_tld') { ?> selected=selected <?php } ?>>
246
  <?php if (!$pro) { ?>
247
+ <?php esc_html_e('Email with TLD (Eg: edu)', 'woo-discount-rules'); ?><b><?php echo $suffix; ?></b>
248
  <?php } else { ?>
249
+ <?php esc_html_e('Email with TLD (Eg: edu)', 'woo-discount-rules'); ?>
250
  <?php } ?>
251
  </option>
252
  <option
254
  }
255
  if ($type == 'customer_email_domain') { ?> selected=selected <?php } ?>>
256
  <?php if (!$pro) { ?>
257
+ <?php esc_html_e('Email with Domain (Eg: gmail.com)', 'woo-discount-rules'); ?><b><?php echo $suffix; ?></b>
258
  <?php } else { ?>
259
+ <?php esc_html_e('Email with Domain (Eg: gmail.com)', 'woo-discount-rules'); ?>
260
  <?php } ?>
261
  </option>
262
  </optgroup>
263
+ <optgroup label="<?php esc_attr_e('Customer Billing Details', 'woo-discount-rules'); ?>">
264
  <option
265
  <?php if (!$pro) { ?> disabled <?php } else { ?> value="customer_billing_city" <?php
266
  }
267
  if ($type == 'customer_billing_city') { ?> selected=selected <?php } ?>>
268
  <?php if (!$pro) { ?>
269
+ <?php esc_html_e('Billing city', 'woo-discount-rules'); ?> <b><?php echo $suffix; ?></b>
270
  <?php } else { ?>
271
+ <?php esc_html_e('Billing city', 'woo-discount-rules'); ?>
272
  <?php } ?>
273
  </option>
274
  </optgroup>
275
+ <optgroup label="<?php esc_attr_e('Customer Shipping Details', 'woo-discount-rules'); ?>">
276
  <option
277
  <?php if (!$pro) { ?> disabled <?php } else { ?> value="customer_shipping_state" <?php
278
  }
279
  if ($type == 'customer_shipping_state') { ?> selected=selected <?php } ?>>
280
  <?php if (!$pro) { ?>
281
+ <?php esc_html_e('Shipping state', 'woo-discount-rules'); ?> <b><?php echo $suffix; ?></b>
282
  <?php } else { ?>
283
+ <?php esc_html_e('Shipping state', 'woo-discount-rules'); ?>
284
  <?php } ?>
285
  </option>
286
  </optgroup>
287
+ <optgroup label="<?php esc_attr_e('Purchase History', 'woo-discount-rules'); ?>">
288
  <option
289
  <?php if (!$pro) { ?> disabled <?php } else { ?> value="customer_based_on_purchase_history" <?php
290
  }
291
  if ($type == 'customer_based_on_purchase_history') { ?> selected=selected <?php } ?>>
292
  <?php if (!$pro) { ?>
293
+ <?php esc_html_e('Based on Purchase history', 'woo-discount-rules'); ?> <b><?php echo $suffix; ?></b>
294
  <?php } else { ?>
295
+ <?php esc_html_e('Based on Purchase history', 'woo-discount-rules'); ?>
296
  <?php } ?>
297
  </option>
298
  </optgroup>
299
+ <optgroup label="<?php esc_attr_e('Coupon applied', 'woo-discount-rules'); ?>">
300
  <option
301
  <?php if (!$pro) { ?> disabled <?php } else { ?> value="coupon_applied_any_one" <?php
302
  }
303
  if ($type == 'coupon_applied_any_one') { ?> selected=selected <?php } ?>>
304
  <?php if (!$pro) { ?>
305
+ <?php esc_html_e('Atleast any one', 'woo-discount-rules'); ?> <b><?php echo $suffix; ?></b>
306
  <?php } else { ?>
307
+ <?php esc_html_e('Atleast any one', 'woo-discount-rules'); ?>
308
  <?php } ?>
309
  </option>
310
  <option
312
  }
313
  if ($type == 'coupon_applied_all_selected') { ?> selected=selected <?php } ?>>
314
  <?php if (!$pro) { ?>
315
+ <?php esc_html_e('All selected', 'woo-discount-rules'); ?> <b><?php echo $suffix; ?></b>
316
  <?php } else { ?>
317
+ <?php esc_html_e('All selected', 'woo-discount-rules'); ?>
318
  <?php } ?>
319
  </option>
320
  </optgroup>
322
  </label>
323
  </div>
324
  <div class="col-md-3 form-group">
325
+ <label> <?php esc_html_e('Value', 'woo-discount-rules'); ?>
326
  <?php
327
  $users_list = array();
328
  $class = 'style="display:none"';
413
  $hit = true;
414
  } ?>
415
  <div id="purchase_history_div_<?php echo $i; ?>" <?php echo $class; ?>>
416
+ <?php esc_html_e('Total purchased amount at least', 'woo-discount-rules'); ?>
417
+ <input name="discount_rule[<?php echo $i; ?>][purchased_history_amount]" value="<?php echo $purchased_history_amount; ?>" type="text"/> <?php esc_html_e('In Order status', 'woo-discount-rules'); ?>
418
  <select class="order_status_list selectpicker"
419
  data-live-search="true"
420
  id="order_status_list_<?php echo $i; ?>"
440
  </div>
441
  </label>
442
  </div>
443
+ <div class="col-md-1"><label> <?php esc_html_e('Action', 'woo-discount-rules'); ?> </label><br>
444
+ <a href=javascript:void(0) class="btn btn-danger remove_cart_rule"><?php esc_html_e('Remove', 'woo-discount-rules'); ?></a>
445
  </div>
446
  </div>
447
  <?php
451
  </div>
452
  </div>
453
  <div align="right">
454
+ <input type="button" class="btn btn-warning general_tab" value="<?php esc_attr_e('Previous', 'woo-discount-rules'); ?>">
455
+ <input type="button" class="btn btn-success discount_tab" value="<?php esc_attr_e('Next', 'woo-discount-rules'); ?>">
456
  </div>
457
  </div>
458
 
459
  <!-- TODO: Implement ForEach Concept -->
460
+ <div class="col-md-12" id="discount_block"><h4 class="text text-muted"> <?php esc_html_e('Discount', 'woo-discount-rules'); ?></h4>
461
  <?php
462
  $discount_type = 'percentage_discount';
463
  $to_discount = 0;
473
  <div class="row">
474
  <div class="col-md-2">
475
  <div class="form-group">
476
+ <label> <?php esc_html_e('Discount Type :', 'woo-discount-rules'); ?>
477
  <select class="form-control" id="cart_rule_discount_type" name="discount_type">
478
  <option
479
  value="percentage_discount" <?php if ($discount_type == 'percentage_discount') { ?> selected=selected <?php } ?>>
480
+ <?php esc_html_e('Percentage Discount', 'woo-discount-rules'); ?>
481
  </option>
482
  <option
483
  <?php if (!$pro) { ?> disabled <?php } else { ?> value="price_discount" <?php }
484
  if ($discount_type == 'price_discount') { ?> selected=selected <?php } ?>>
485
  <?php if (!$pro) { ?>
486
+ <?php esc_html_e('Price Discount', 'woo-discount-rules'); ?> <b><?php echo $suffix; ?></b>
487
  <?php } else { ?>
488
+ <?php esc_html_e('Price Discount', 'woo-discount-rules'); ?>
 
489
  <?php } ?>
490
  </option>
491
  <option
492
  <?php if (!$pro) { ?> disabled <?php } else { ?> value="shipping_price" <?php }
493
  if ($discount_type == 'shipping_price') { ?> selected=selected <?php } ?>>
494
  <?php if (!$pro) { ?>
495
+ <?php esc_html_e('Free shipping', 'woo-discount-rules'); ?> <b><?php echo $suffix; ?></b>
496
  <?php } else { ?>
497
+ <?php esc_html_e('Free shipping', 'woo-discount-rules'); ?>
498
  <?php } ?>
499
  </option>
500
  </select>
503
  </div>
504
  <div class="col-md-2" id="cart_rule_discount_value_con" >
505
  <div class="form-group">
506
+ <label> <?php esc_html_e('value :', 'woo-discount-rules'); ?>
507
  <input type="text" name="to_discount" class="form-control"
508
  value="<?php echo $to_discount; ?>">
509
  </label>
511
  </div>
512
  </div>
513
  <div align="right">
514
+ <input type="button" class="btn btn-warning restriction_tab" value="<?php esc_attr_e('Previous', 'woo-discount-rules'); ?>">
515
  </div>
516
  </div>
517
  </div>
view/view-pricing-rules.php CHANGED
@@ -32,19 +32,19 @@ if($isPro){
32
  <div class="<?php echo $isPro? 'col-md-12': 'col-md-8'; ?>">
33
  <div class="col-md-12 rule_buttons_con" align="right">
34
  <input type="submit" id="savePriceRule" value="Save Rule" class="btn btn-primary">
35
- <a href="?page=woo_discount_rules" class="btn btn-warning">Close</a>
36
  </div>
37
  <?php if ($rule_id == 0) { ?>
38
- <div class="col-md-12"><h2>New Price Rule</h2></div>
39
  <?php } else { ?>
40
- <div class="col-md-12"><h2>Edit Price Rule
41
  | <?php echo(isset($data->rule_name) ? $data->rule_name : ''); ?></h2></div>
42
  <?php } ?>
43
- <div class="col-md-12" id="general_block"><h4 class="text text-muted"> General</h4>
44
  <hr>
45
  <div class="form-group">
46
  <div class="row">
47
- <div class="col-md-3"><label> Order : <i
48
  class="text-muted glyphicon glyphicon-exclamation-sign"
49
  title="The Simple Ranking concept to said, which one is going to execute first and so on."></i></label>
50
  </div>
@@ -54,13 +54,13 @@ if($isPro){
54
  min=1
55
  value="<?php echo(isset($data->rule_order) ? $data->rule_order : '-'); ?>"
56
  placeholder="ex. 1">
57
- <code>WARNING: More than one rule should not have same priority. </code>
58
  </div>
59
  </div>
60
  </div>
61
  <div class="form-group">
62
  <div class="row">
63
- <div class="col-md-3"><label> Rule Name <i
64
  class="text-muted glyphicon glyphicon-exclamation-sign"
65
  title="Rule Desctriptions."></i></label></div>
66
  <div class="col-md-6"><input type="text" class="form-control rule_descr"
@@ -72,7 +72,7 @@ if($isPro){
72
  </div>
73
  <div class="form-group">
74
  <div class="row">
75
- <div class="col-md-3"><label> Rule Description <i
76
  class="text-muted glyphicon glyphicon-exclamation-sign"
77
  title="Rule Desctriptions."></i></label></div>
78
  <div class="col-md-6"><input type="text" class="form-control rule_descr"
@@ -83,7 +83,7 @@ if($isPro){
83
  </div>
84
  <div class="form-group">
85
  <div class="row">
86
- <div class="col-md-3"><label> Method <i
87
  class="text-muted glyphicon glyphicon-exclamation-sign"
88
  title="Method to Apply."></i></label></div>
89
  <?php $opt = (isset($data->rule_method) ? $data->rule_method : ''); ?>
@@ -91,16 +91,16 @@ if($isPro){
91
  name="rule_method" id="price_rule_method">
92
  <option
93
  value="qty_based" <?php if ($opt == 'qty_based') { ?> selected=selected <?php } ?>>
94
- Quantity based by product/category and BOGO deals
95
  </option>
96
  <option
97
  <?php if (!$pro) { ?> disabled <?php } else { ?> value="product_based" <?php
98
  }
99
  if ($opt == 'product_based') { ?> selected=selected <?php } ?>>
100
  <?php if (!$pro) { ?>
101
- Dependant product based discount <b><?php echo $suffix; ?></b>
102
  <?php } else { ?>
103
- Dependant product based discount
104
  <?php } ?>
105
  </option>
106
  </select></div>
@@ -108,61 +108,66 @@ if($isPro){
108
  </div>
109
  <div class="form-group">
110
  <div class="row">
111
- <div class="col-md-3"><label> Validity <i
112
- class="text-muted glyphicon glyphicon-exclamation-sign"
113
- title="Period of Rule Active."></i></label></div>
114
  <div class="col-md-6">
115
- <div class="form-inline"><input type="text"
116
- name="date_from"
117
- class="form-control datepicker"
118
- value="<?php echo(isset($data->date_from) ? $data->date_from : ''); ?>"
119
- placeholder="From">
 
 
 
 
 
 
 
120
  <input type="text" name="date_to"
121
  class="form-control datepicker"
122
- value="<?php echo(isset($data->date_to) ? $data->date_to : ''); ?>"
123
- placeholder="To - Leave Empty if No Expiry"></div>
124
  </div>
125
  </div>
126
  <div align="right">
127
- <input type="button" class="button button-primary restriction_tab" value="Next">
128
  </div>
129
  </div>
130
  </div>
131
 
132
- <div class="col-md-12" id="restriction_block"><h4 class="text text-muted"> Discount
133
- Conditions </h4>
134
  <hr>
135
  <div class="qty_based_condition_cont price_discount_condition_con">
136
  <div class="form-group">
137
  <div class="row">
138
- <div class="col-md-3"><label> Apply To </label></div>
139
  <?php $opt = (isset($data->apply_to) ? $data->apply_to : ''); ?>
140
  <div class="col-md-9"><select class="selectpicker"
141
  name="apply_to" id="apply_to">
142
  <option
143
  value="all_products" <?php if ($opt == 'all_products') { ?> selected=selected <?php } ?>>
144
- All products
145
  </option>
146
  <option
147
  value="specific_products" <?php if ($opt == 'specific_products') { ?> selected=selected <?php } ?>>
148
- Specific products
149
  </option>
150
  <option
151
  <?php if (!$pro) { ?> disabled <?php } else { ?> value="specific_category" <?php }
152
  if ($opt == 'specific_category') { ?> selected=selected <?php } ?>>
153
  <?php if (!$pro) { ?>
154
- Specific categories <b><?php echo $suffix; ?></b>
155
  <?php } else { ?>
156
- Specific categories
157
  <?php } ?>
158
  </option>
159
  <option
160
  <?php if (!$pro) { ?> disabled <?php } else { ?> value="specific_attribute" <?php }
161
  if ($opt == 'specific_attribute') { ?> selected=selected <?php } ?>>
162
  <?php if (!$pro) { ?>
163
- Specific attributes <b><?php echo $suffix; ?></b>
164
  <?php } else { ?>
165
- Specific attributes
166
  <?php } ?>
167
  </option>
168
  </select>
@@ -173,7 +178,7 @@ if($isPro){
173
  </div>
174
  <?php $is_cumulative_for_products = (isset($data->is_cumulative_for_products))? $data->is_cumulative_for_products : 0 ?>
175
  <div class="form-group" id="cumulative_for_products_cont">
176
- <input type="checkbox" name="is_cumulative_for_products" id="is_cumulative_for_products" value="1" <?php if($is_cumulative_for_products) { echo "checked"; } ?>> <label class="checkbox_label" for="is_cumulative_for_products">Check this box to count quantities cumulatively across products</label>
177
  </div>
178
  <div class="form-group" id="category_list">
179
  <?php $category_list = json_decode((isset($data->category_to_apply) ? $data->category_to_apply : '{}'), true); ?>
@@ -185,10 +190,10 @@ if($isPro){
185
  <?php } ?>
186
  </select>
187
  <?php $is_cumulative = (isset($data->is_cumulative))? $data->is_cumulative : 0 ?>
188
- <input type="checkbox" name="is_cumulative" id="is_cumulative" value="1" <?php if($is_cumulative) { echo "checked"; } ?>> <label class="checkbox_label" for="is_cumulative">Check this box to count quantities cumulatively across category(ies)</label>
189
  <div class="apply_child_categories">
190
  <?php $apply_child_categories = (isset($data->apply_child_categories))? $data->apply_child_categories : 0 ?>
191
- <input type="checkbox" name="apply_child_categories" id="apply_child_categories" value="1" <?php if($apply_child_categories) { echo "checked"; } ?>> <label class="checkbox_label" for="apply_child_categories">Check this box to apply child category(ies)</label>
192
  </div>
193
  </div>
194
  <div class="form-group" id="product_attributes_list">
@@ -227,21 +232,21 @@ if($isPro){
227
 
228
  <div class="form-group">
229
  <div class="row">
230
- <div class="col-md-3"><label> Customers </label></div>
231
  <?php $opt = (isset($data->customer) ? $data->customer : ''); ?>
232
  <div class="col-md-9"><select class="selectpicker"
233
  name="customer" id="apply_customer">
234
  <option value="all" <?php if ($opt == 'all') { ?> selected=selected <?php } ?>>
235
- All
236
  </option>
237
  <option
238
  <?php if (!$pro) { ?> disabled <?php } else { ?> value="only_given" <?php
239
  }
240
  if ($opt == 'only_given') { ?> selected=selected <?php } ?>>
241
  <?php if (!$pro) { ?>
242
- Only Given <b><?php echo $suffix; ?></b>
243
  <?php } else { ?>
244
- Only Given
245
  <?php } ?>
246
  </option>
247
  </select>
@@ -465,18 +470,18 @@ if($isPro){
465
  <div class="form-group">
466
  <div class="row">
467
  <div align="right">
468
- <input type="button" class="button button-secondary general_tab" value="Previous">
469
- <input type="button" class="button button-primary discount_tab" value="Next">
470
  </div>
471
  </div>
472
  </div>
473
  </div>
474
  <!-- TODO: Implement ForEach Concept -->
475
  <div class="col-md-12" id="discount_block">
476
- <h4 class="text text-muted"> Discount</h4>
477
  <div class="qty_based_discount_cont price_discounts_con">
478
  <a href=javascript:void(0) class="button button-primary" id="addNewDiscountRange"><i
479
- class="glyphicon glyphicon-plus"></i> Add New Range</a>
480
  <hr>
481
  <div id="discount_rule_list">
482
  <?php
@@ -496,26 +501,26 @@ if($isPro){
496
  ?>
497
  <div class="discount_rule_list">
498
  <div class="form-group">
499
- <label>Min Quantity
500
  <input type="text"
501
  name="discount_range[<?php echo $fieldIndex; ?>][min_qty]"
502
  class="form-control"
503
  value="<?php echo(isset($discount->min_qty) ? $discount->min_qty : ''); ?>"
504
  placeholder="ex. 1">
505
  </label>
506
- <label>Max Quantity
507
  <input type="text"
508
  name="discount_range[<?php echo $fieldIndex; ?>][max_qty]"
509
  class="form-control"
510
  value="<?php echo(isset($discount->max_qty) ? $discount->max_qty : ''); ?>"
511
  placeholder="ex. 50"> </label>
512
- <label>Adjustment Type
513
  <select class="form-control price_discount_type"
514
  name="discount_range[<?php echo $fieldIndex; ?>][discount_type]">
515
  <?php $opt = (isset($discount->discount_type) ? $discount->discount_type : ''); ?>
516
  <option
517
  value="percentage_discount" <?php if ($opt == 'percentage_discount') { ?> selected=selected <?php } ?> >
518
- Percentage Discount
519
  </option>
520
 
521
  <option
@@ -523,9 +528,9 @@ if($isPro){
523
  }
524
  if ($opt == 'price_discount') { ?> selected=selected <?php } ?>>
525
  <?php if (!$pro) { ?>
526
- Price Discount <b><?php echo $suffix; ?></b>
527
  <?php } else { ?>
528
- Price Discount
529
  <?php } ?>
530
  </option>
531
  <option
@@ -533,18 +538,18 @@ if($isPro){
533
  }
534
  if ($opt == 'product_discount') { ?> selected=selected <?php } ?>>
535
  <?php if (!$pro) { ?>
536
- Product Discount <b><?php echo $suffix; ?></b>
537
  <?php } else { ?>
538
- Product Discount
539
  <?php } ?>
540
  </option>
541
  </select></label>
542
- <label><span class="hide-for-product-discount">Value</span>
543
  <input type="text"
544
  name="discount_range[<?php echo $fieldIndex; ?>][to_discount]"
545
  class="form-control price_discount_amount"
546
  value="<?php echo(isset($discount->to_discount) ? $discount->to_discount : ''); ?>"
547
- placeholder="ex. 50">
548
  <?php
549
  $products_list = (isset($discount->discount_product) ? $discount->discount_product : array());
550
  $discount_product_option = (isset($discount->discount_product_option) ? $discount->discount_product_option : 'all');
@@ -560,12 +565,12 @@ if($isPro){
560
  <option value="more_than_one_cheapest_from_all"<?php echo ($discount_product_option == 'more_than_one_cheapest_from_all')? ' selected="selected"': '' ?>><?php esc_html_e('More than one cheapest from all', 'woo-discount-rules') ?></option>
561
  </select>
562
  <div class="discount_product_option_bogo_con hide">
563
- <label>Free quantity <span class="woocommerce-help-tip" data-tip="Number of quantity(ies) in each selected product(s)"></span>
564
  <input type="text"
565
  name="discount_range[<?php echo $fieldIndex; ?>][discount_bogo_qty]"
566
  class="form-control"
567
  value="<?php echo(isset($discount->discount_bogo_qty) ? $discount->discount_bogo_qty : 1); ?>"
568
- placeholder="ex. 1" />
569
  </label>
570
  </div>
571
  <div class="discount_product_option_more_cheapest_con hide">
@@ -577,14 +582,14 @@ if($isPro){
577
  <option value="dynamic"<?php echo ($discount_product_item_type == 'dynamic')? ' selected="selected"': '' ?>><?php esc_html_e('Dynamic item count', 'woo-discount-rules') ?></option>
578
  </select>
579
  <span class="woocommerce-help-tip" data-tip="Fixed item count - You need to provide item count manually<br>Dynamic item count - System will choose dynamically based on cart"></span>
580
- <label class="discount_product_items_count_field">Item count <span class="woocommerce-help-tip" data-tip="Discount for number of item(s) in cart"></span>
581
  <input type="text"
582
  name="discount_range[<?php echo $fieldIndex; ?>][discount_product_items]"
583
  class="form-control discount_product_items_count_field"
584
  value="<?php echo(isset($discount->discount_product_items) ? $discount->discount_product_items : ''); ?>"
585
  placeholder="ex. 1" />
586
  </label>
587
- <label>Item quantity <span class="woocommerce-help-tip" data-tip="Discount for number of quantity(ies) in each item"></span>
588
  <input type="text"
589
  name="discount_range[<?php echo $fieldIndex; ?>][discount_product_qty]"
590
  class="form-control"
@@ -611,7 +616,7 @@ if($isPro){
611
  <div class="discount_product_percent_con hide">
612
  <?php
613
  $discount_product_discount_type = (isset($discount->discount_product_discount_type) ? $discount->discount_product_discount_type : '');
614
- ?> and
615
  <select class="selectpicker discount_product_discount_type" name="discount_range[<?php echo $fieldIndex; ?>][discount_product_discount_type]">
616
  <option value=""<?php echo ($discount_product_discount_type == '')? ' selected="selected"': '' ?>><?php esc_html_e('100% percent', 'woo-discount-rules') ?></option>
617
  <option value="limited_percent"<?php echo ($discount_product_discount_type == 'limited_percent')? ' selected="selected"': '' ?>><?php esc_html_e('Limited percent', 'woo-discount-rules') ?></option>
@@ -623,12 +628,12 @@ if($isPro){
623
  value="<?php echo(isset($discount->discount_product_percent) ? $discount->discount_product_percent : ''); ?>"
624
  placeholder="ex. 10" /><span class="woocommerce-help-tip" data-tip="Percentage"></span>
625
  </span>
626
- as discount
627
  </div>
628
  </div>
629
  </label>
630
  <label><a href=javascript:void(0)
631
- class="btn btn-danger form-control remove_discount_range">Remove</a></label>
632
 
633
  </div>
634
  </div>
@@ -650,7 +655,7 @@ if($isPro){
650
  </div>
651
  </div>
652
  <div align="right">
653
- <input type="button" class="button button-secondary restriction_tab" value="Previous">
654
  </div>
655
  </div>
656
  </div>
32
  <div class="<?php echo $isPro? 'col-md-12': 'col-md-8'; ?>">
33
  <div class="col-md-12 rule_buttons_con" align="right">
34
  <input type="submit" id="savePriceRule" value="Save Rule" class="btn btn-primary">
35
+ <a href="?page=woo_discount_rules" class="btn btn-warning"><?php esc_html_e('Close', 'woo-discount-rules'); ?></a>
36
  </div>
37
  <?php if ($rule_id == 0) { ?>
38
+ <div class="col-md-12"><h2><?php esc_html_e('New Price Rule', 'woo-discount-rules'); ?></h2></div>
39
  <?php } else { ?>
40
+ <div class="col-md-12"><h2><?php esc_html_e('Edit Price Rule', 'woo-discount-rules'); ?>
41
  | <?php echo(isset($data->rule_name) ? $data->rule_name : ''); ?></h2></div>
42
  <?php } ?>
43
+ <div class="col-md-12" id="general_block"><h4 class="text text-muted"> <?php esc_html_e('General', 'woo-discount-rules'); ?></h4>
44
  <hr>
45
  <div class="form-group">
46
  <div class="row">
47
+ <div class="col-md-3"><label> <?php esc_html_e('Order :', 'woo-discount-rules'); ?> <i
48
  class="text-muted glyphicon glyphicon-exclamation-sign"
49
  title="The Simple Ranking concept to said, which one is going to execute first and so on."></i></label>
50
  </div>
54
  min=1
55
  value="<?php echo(isset($data->rule_order) ? $data->rule_order : '-'); ?>"
56
  placeholder="ex. 1">
57
+ <code><?php esc_html_e('WARNING: More than one rule should not have same priority.', 'woo-discount-rules'); ?> </code>
58
  </div>
59
  </div>
60
  </div>
61
  <div class="form-group">
62
  <div class="row">
63
+ <div class="col-md-3"><label> <?php esc_html_e('Rule Name', 'woo-discount-rules'); ?> <i
64
  class="text-muted glyphicon glyphicon-exclamation-sign"
65
  title="Rule Desctriptions."></i></label></div>
66
  <div class="col-md-6"><input type="text" class="form-control rule_descr"
72
  </div>
73
  <div class="form-group">
74
  <div class="row">
75
+ <div class="col-md-3"><label> <?php esc_html_e('Rule Description', 'woo-discount-rules'); ?> <i
76
  class="text-muted glyphicon glyphicon-exclamation-sign"
77
  title="Rule Desctriptions."></i></label></div>
78
  <div class="col-md-6"><input type="text" class="form-control rule_descr"
83
  </div>
84
  <div class="form-group">
85
  <div class="row">
86
+ <div class="col-md-3"><label> <?php esc_html_e('Method', 'woo-discount-rules'); ?> <i
87
  class="text-muted glyphicon glyphicon-exclamation-sign"
88
  title="Method to Apply."></i></label></div>
89
  <?php $opt = (isset($data->rule_method) ? $data->rule_method : ''); ?>
91
  name="rule_method" id="price_rule_method">
92
  <option
93
  value="qty_based" <?php if ($opt == 'qty_based') { ?> selected=selected <?php } ?>>
94
+ <?php esc_html_e('Quantity based by product/category and BOGO deals', 'woo-discount-rules'); ?>
95
  </option>
96
  <option
97
  <?php if (!$pro) { ?> disabled <?php } else { ?> value="product_based" <?php
98
  }
99
  if ($opt == 'product_based') { ?> selected=selected <?php } ?>>
100
  <?php if (!$pro) { ?>
101
+ <?php esc_html_e('Dependant product based discount', 'woo-discount-rules'); ?> <b><?php echo $suffix; ?></b>
102
  <?php } else { ?>
103
+ <?php esc_html_e('Dependant product based discount', 'woo-discount-rules'); ?>
104
  <?php } ?>
105
  </option>
106
  </select></div>
108
  </div>
109
  <div class="form-group">
110
  <div class="row">
111
+ <div class="col-md-3"><label> <?php esc_html_e('Validity', 'woo-discount-rules'); ?>
112
+ <span class="woocommerce-help-tip" data-tip="<?php esc_attr_e('Period of Rule Active. Format: month/day/Year Hour:Min', 'woo-discount-rules'); ?>"></span></label></div>
 
113
  <div class="col-md-6">
114
+ <?php
115
+ $date_from = (isset($data->date_from) ? $data->date_from : '');
116
+ $date_to = (isset($data->date_to) ? $data->date_to : '');
117
+ if($date_from != '') $date_from = date( 'm/d/Y H:i', strtotime($date_from));
118
+ if($date_to != '') $date_to = date( 'm/d/Y H:i', strtotime($date_to));
119
+ ?>
120
+ <div class="form-inline">
121
+ <input type="text"
122
+ name="date_from"
123
+ class="form-control datepicker"
124
+ value="<?php echo $date_from; ?>"
125
+ placeholder="<?php esc_attr_e('From', 'woo-discount-rules'); ?>">
126
  <input type="text" name="date_to"
127
  class="form-control datepicker"
128
+ value="<?php echo $date_to; ?>"
129
+ placeholder="<?php esc_attr_e('To - Leave Empty if No Expiry', 'woo-discount-rules'); ?>"></div>
130
  </div>
131
  </div>
132
  <div align="right">
133
+ <input type="button" class="btn btn-success restriction_tab" value="<?php esc_attr_e('Next', 'woo-discount-rules'); ?>">
134
  </div>
135
  </div>
136
  </div>
137
 
138
+ <div class="col-md-12" id="restriction_block"><h4 class="text text-muted"> <?php esc_html_e('Discount Conditions', 'woo-discount-rules'); ?></h4>
 
139
  <hr>
140
  <div class="qty_based_condition_cont price_discount_condition_con">
141
  <div class="form-group">
142
  <div class="row">
143
+ <div class="col-md-3"><label> <?php esc_html_e('Apply To', 'woo-discount-rules'); ?> </label></div>
144
  <?php $opt = (isset($data->apply_to) ? $data->apply_to : ''); ?>
145
  <div class="col-md-9"><select class="selectpicker"
146
  name="apply_to" id="apply_to">
147
  <option
148
  value="all_products" <?php if ($opt == 'all_products') { ?> selected=selected <?php } ?>>
149
+ <?php esc_html_e('All products', 'woo-discount-rules'); ?>
150
  </option>
151
  <option
152
  value="specific_products" <?php if ($opt == 'specific_products') { ?> selected=selected <?php } ?>>
153
+ <?php esc_html_e('Specific products', 'woo-discount-rules'); ?>
154
  </option>
155
  <option
156
  <?php if (!$pro) { ?> disabled <?php } else { ?> value="specific_category" <?php }
157
  if ($opt == 'specific_category') { ?> selected=selected <?php } ?>>
158
  <?php if (!$pro) { ?>
159
+ <?php esc_html_e('Specific categories', 'woo-discount-rules'); ?> <b><?php echo $suffix; ?></b>
160
  <?php } else { ?>
161
+ <?php esc_html_e('Specific categories', 'woo-discount-rules'); ?>
162
  <?php } ?>
163
  </option>
164
  <option
165
  <?php if (!$pro) { ?> disabled <?php } else { ?> value="specific_attribute" <?php }
166
  if ($opt == 'specific_attribute') { ?> selected=selected <?php } ?>>
167
  <?php if (!$pro) { ?>
168
+ <?php esc_html_e('Specific attributes', 'woo-discount-rules'); ?> <b><?php echo $suffix; ?></b>
169
  <?php } else { ?>
170
+ <?php esc_html_e('Specific attributes', 'woo-discount-rules'); ?>
171
  <?php } ?>
172
  </option>
173
  </select>
178
  </div>
179
  <?php $is_cumulative_for_products = (isset($data->is_cumulative_for_products))? $data->is_cumulative_for_products : 0 ?>
180
  <div class="form-group" id="cumulative_for_products_cont">
181
+ <input type="checkbox" name="is_cumulative_for_products" id="is_cumulative_for_products" value="1" <?php if($is_cumulative_for_products) { echo "checked"; } ?>> <label class="checkbox_label" for="is_cumulative_for_products"><?php esc_html_e('Check this box to count quantities cumulatively across products', 'woo-discount-rules'); ?></label>
182
  </div>
183
  <div class="form-group" id="category_list">
184
  <?php $category_list = json_decode((isset($data->category_to_apply) ? $data->category_to_apply : '{}'), true); ?>
190
  <?php } ?>
191
  </select>
192
  <?php $is_cumulative = (isset($data->is_cumulative))? $data->is_cumulative : 0 ?>
193
+ <input type="checkbox" name="is_cumulative" id="is_cumulative" value="1" <?php if($is_cumulative) { echo "checked"; } ?>> <label class="checkbox_label" for="is_cumulative"><?php esc_html_e('Check this box to count quantities cumulatively across category(ies)', 'woo-discount-rules'); ?></label>
194
  <div class="apply_child_categories">
195
  <?php $apply_child_categories = (isset($data->apply_child_categories))? $data->apply_child_categories : 0 ?>
196
+ <input type="checkbox" name="apply_child_categories" id="apply_child_categories" value="1" <?php if($apply_child_categories) { echo "checked"; } ?>> <label class="checkbox_label" for="apply_child_categories"><?php esc_html_e('Check this box to apply child category(ies)', 'woo-discount-rules'); ?></label>
197
  </div>
198
  </div>
199
  <div class="form-group" id="product_attributes_list">
232
 
233
  <div class="form-group">
234
  <div class="row">
235
+ <div class="col-md-3"><label> <?php esc_html_e('Customers', 'woo-discount-rules'); ?> </label></div>
236
  <?php $opt = (isset($data->customer) ? $data->customer : ''); ?>
237
  <div class="col-md-9"><select class="selectpicker"
238
  name="customer" id="apply_customer">
239
  <option value="all" <?php if ($opt == 'all') { ?> selected=selected <?php } ?>>
240
+ <?php esc_html_e('All', 'woo-discount-rules'); ?>
241
  </option>
242
  <option
243
  <?php if (!$pro) { ?> disabled <?php } else { ?> value="only_given" <?php
244
  }
245
  if ($opt == 'only_given') { ?> selected=selected <?php } ?>>
246
  <?php if (!$pro) { ?>
247
+ <?php esc_html_e('Only Given', 'woo-discount-rules'); ?> <b><?php echo $suffix; ?></b>
248
  <?php } else { ?>
249
+ <?php esc_html_e('Only Given', 'woo-discount-rules'); ?>
250
  <?php } ?>
251
  </option>
252
  </select>
470
  <div class="form-group">
471
  <div class="row">
472
  <div align="right">
473
+ <input type="button" class="btn btn-warning general_tab" value="<?php esc_attr_e('Previous', 'woo-discount-rules'); ?>">
474
+ <input type="button" class="btn btn-success discount_tab" value="<?php esc_attr_e('Next', 'woo-discount-rules'); ?>">
475
  </div>
476
  </div>
477
  </div>
478
  </div>
479
  <!-- TODO: Implement ForEach Concept -->
480
  <div class="col-md-12" id="discount_block">
481
+ <h4 class="text text-muted"> <?php esc_html_e('Discount', 'woo-discount-rules'); ?></h4>
482
  <div class="qty_based_discount_cont price_discounts_con">
483
  <a href=javascript:void(0) class="button button-primary" id="addNewDiscountRange"><i
484
+ class="glyphicon glyphicon-plus"></i> <?php esc_html_e('Add New Range', 'woo-discount-rules'); ?></a>
485
  <hr>
486
  <div id="discount_rule_list">
487
  <?php
501
  ?>
502
  <div class="discount_rule_list">
503
  <div class="form-group">
504
+ <label><?php esc_html_e('Min Quantity', 'woo-discount-rules'); ?>
505
  <input type="text"
506
  name="discount_range[<?php echo $fieldIndex; ?>][min_qty]"
507
  class="form-control"
508
  value="<?php echo(isset($discount->min_qty) ? $discount->min_qty : ''); ?>"
509
  placeholder="ex. 1">
510
  </label>
511
+ <label><?php esc_html_e('Max Quantity', 'woo-discount-rules'); ?>
512
  <input type="text"
513
  name="discount_range[<?php echo $fieldIndex; ?>][max_qty]"
514
  class="form-control"
515
  value="<?php echo(isset($discount->max_qty) ? $discount->max_qty : ''); ?>"
516
  placeholder="ex. 50"> </label>
517
+ <label><?php esc_html_e('Adjustment Type', 'woo-discount-rules'); ?>
518
  <select class="form-control price_discount_type"
519
  name="discount_range[<?php echo $fieldIndex; ?>][discount_type]">
520
  <?php $opt = (isset($discount->discount_type) ? $discount->discount_type : ''); ?>
521
  <option
522
  value="percentage_discount" <?php if ($opt == 'percentage_discount') { ?> selected=selected <?php } ?> >
523
+ <?php esc_html_e('Percentage Discount', 'woo-discount-rules'); ?>
524
  </option>
525
 
526
  <option
528
  }
529
  if ($opt == 'price_discount') { ?> selected=selected <?php } ?>>
530
  <?php if (!$pro) { ?>
531
+ <?php esc_html_e('Price Discount', 'woo-discount-rules'); ?> <b><?php echo $suffix; ?></b>
532
  <?php } else { ?>
533
+ <?php esc_html_e('Price Discount', 'woo-discount-rules'); ?>
534
  <?php } ?>
535
  </option>
536
  <option
538
  }
539
  if ($opt == 'product_discount') { ?> selected=selected <?php } ?>>
540
  <?php if (!$pro) { ?>
541
+ <?php esc_html_e('Product Discount', 'woo-discount-rules'); ?> <b><?php echo $suffix; ?></b>
542
  <?php } else { ?>
543
+ <?php esc_html_e('Product Discount', 'woo-discount-rules'); ?>
544
  <?php } ?>
545
  </option>
546
  </select></label>
547
+ <label><span class="hide-for-product-discount"><?php esc_html_e('Value', 'woo-discount-rules'); ?></span>
548
  <input type="text"
549
  name="discount_range[<?php echo $fieldIndex; ?>][to_discount]"
550
  class="form-control price_discount_amount"
551
  value="<?php echo(isset($discount->to_discount) ? $discount->to_discount : ''); ?>"
552
+ placeholder="<?php esc_attr_e('ex. 50', 'woo-discount-rules'); ?>">
553
  <?php
554
  $products_list = (isset($discount->discount_product) ? $discount->discount_product : array());
555
  $discount_product_option = (isset($discount->discount_product_option) ? $discount->discount_product_option : 'all');
565
  <option value="more_than_one_cheapest_from_all"<?php echo ($discount_product_option == 'more_than_one_cheapest_from_all')? ' selected="selected"': '' ?>><?php esc_html_e('More than one cheapest from all', 'woo-discount-rules') ?></option>
566
  </select>
567
  <div class="discount_product_option_bogo_con hide">
568
+ <label><?php esc_html_e('Free quantity', 'woo-discount-rules'); ?> <span class="woocommerce-help-tip" data-tip="Number of quantity(ies) in each selected product(s)"></span>
569
  <input type="text"
570
  name="discount_range[<?php echo $fieldIndex; ?>][discount_bogo_qty]"
571
  class="form-control"
572
  value="<?php echo(isset($discount->discount_bogo_qty) ? $discount->discount_bogo_qty : 1); ?>"
573
+ placeholder="<?php esc_attr_e('ex. 1', 'woo-discount-rules'); ?>" />
574
  </label>
575
  </div>
576
  <div class="discount_product_option_more_cheapest_con hide">
582
  <option value="dynamic"<?php echo ($discount_product_item_type == 'dynamic')? ' selected="selected"': '' ?>><?php esc_html_e('Dynamic item count', 'woo-discount-rules') ?></option>
583
  </select>
584
  <span class="woocommerce-help-tip" data-tip="Fixed item count - You need to provide item count manually<br>Dynamic item count - System will choose dynamically based on cart"></span>
585
+ <label class="discount_product_items_count_field"><?php esc_html_e('Item count', 'woo-discount-rules'); ?> <span class="woocommerce-help-tip" data-tip="Discount for number of item(s) in cart"></span>
586
  <input type="text"
587
  name="discount_range[<?php echo $fieldIndex; ?>][discount_product_items]"
588
  class="form-control discount_product_items_count_field"
589
  value="<?php echo(isset($discount->discount_product_items) ? $discount->discount_product_items : ''); ?>"
590
  placeholder="ex. 1" />
591
  </label>
592
+ <label><?php esc_html_e('Item quantity', 'woo-discount-rules'); ?> <span class="woocommerce-help-tip" data-tip="Discount for number of quantity(ies) in each item"></span>
593
  <input type="text"
594
  name="discount_range[<?php echo $fieldIndex; ?>][discount_product_qty]"
595
  class="form-control"
616
  <div class="discount_product_percent_con hide">
617
  <?php
618
  $discount_product_discount_type = (isset($discount->discount_product_discount_type) ? $discount->discount_product_discount_type : '');
619
+ ?> <?php esc_html_e('and', 'woo-discount-rules'); ?>
620
  <select class="selectpicker discount_product_discount_type" name="discount_range[<?php echo $fieldIndex; ?>][discount_product_discount_type]">
621
  <option value=""<?php echo ($discount_product_discount_type == '')? ' selected="selected"': '' ?>><?php esc_html_e('100% percent', 'woo-discount-rules') ?></option>
622
  <option value="limited_percent"<?php echo ($discount_product_discount_type == 'limited_percent')? ' selected="selected"': '' ?>><?php esc_html_e('Limited percent', 'woo-discount-rules') ?></option>
628
  value="<?php echo(isset($discount->discount_product_percent) ? $discount->discount_product_percent : ''); ?>"
629
  placeholder="ex. 10" /><span class="woocommerce-help-tip" data-tip="Percentage"></span>
630
  </span>
631
+ <?php esc_html_e('as discount', 'woo-discount-rules'); ?>
632
  </div>
633
  </div>
634
  </label>
635
  <label><a href=javascript:void(0)
636
+ class="btn btn-danger form-control remove_discount_range"><?php esc_html_e('Remove', 'woo-discount-rules'); ?></a></label>
637
 
638
  </div>
639
  </div>
655
  </div>
656
  </div>
657
  <div align="right">
658
+ <input type="button" class="btn btn-warning restriction_tab" value="<?php esc_attr_e('Previous', 'woo-discount-rules'); ?>">
659
  </div>
660
  </div>
661
  </div>
woo-discount-rules.php CHANGED
@@ -5,9 +5,10 @@
5
  * Description: Simple Discount Rules for WooCommerce.
6
  * Author: Flycart Technologies LLP
7
  * Author URI: https://www.flycart.org
8
- * Version: 1.6.0
9
  * Slug: woo-discount-rules
10
  * Text Domain: woo-discount-rules
 
11
  * Requires at least: 4.6.1
12
  * WC requires at least: 2.4
13
  * WC tested up to: 3.3
5
  * Description: Simple Discount Rules for WooCommerce.
6
  * Author: Flycart Technologies LLP
7
  * Author URI: https://www.flycart.org
8
+ * Version: 1.6.1
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: 2.4
14
  * WC tested up to: 3.3