YITH WooCommerce Ajax Search - Version 1.2.4

Version Description

  • Fixed: Minor bugs
Download this release

Release Info

Developer yithemes
Plugin Icon 128x128 YITH WooCommerce Ajax Search
Version 1.2.4
Comparing to
See all releases

Code changes from version 1.2.3 to 1.2.4

README.txt CHANGED
@@ -4,7 +4,7 @@ Contributors: yithemes
4
  Tags: ajax, search, woocommerce, products, themes, yit, e-commerce, shop, yith, ajax search, instant search, premium, yithemes, autocomplete, autosuggest, better search, category search, custom search, highlight terms, Live Search, Predictive Search, product search, relevant search, search highlight, search product, suggest, typeahead, WooCommerce Plugin, woocommerce product search, woocommerce search, wordpress ecommerce
5
  Requires at least: 3.5.1
6
  Tested up to: 4.1.1
7
- Stable tag: 1.2.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -32,7 +32,7 @@ Full documentation is available [here](http://yithemes.com/docs-plugins/yith-woo
32
  Once you have installed the plugin, you just need to activate the plugin in order to enable it.
33
 
34
  = Configuration =
35
- YITH WooCommerce Ajax Search will add a new submenu called "Cart Messages" under "YIT Plugins" menu. Here you are able to configure all the plugin settings.
36
 
37
  = Developer =
38
 
@@ -67,6 +67,9 @@ In WooCommerce->Settings->Ajax Search page, you can choose the minumum size of t
67
 
68
  == Changelog ==
69
 
 
 
 
70
  = 1.2.3 =
71
  * Added: Support to Wordpress 4.1.1
72
  * Fixed: Minor bugs
@@ -108,7 +111,7 @@ In WooCommerce->Settings->Ajax Search page, you can choose the minumum size of t
108
 
109
  == Suggestions ==
110
 
111
- If you have suggestions about how to improve YITH WooCommerce Zoom Magnifier, you can [write us](mailto:plugins@yithemes.com "Your Inspiration Themes") so we can bundle them into YITH Zoom WooCommerce Magnifier.
112
 
113
  == Translators ==
114
 
@@ -117,7 +120,7 @@ If you have suggestions about how to improve YITH WooCommerce Zoom Magnifier, yo
117
  * Italiano
118
 
119
  If you have created your own language pack, or have an update for an existing one, you can send [gettext PO and MO file](http://codex.wordpress.org/Translating_WordPress "Translating WordPress")
120
- [use](http://yithemes.com/contact/ "Your Inspiration Themes") so we can bundle it into YITH WooCommerce Zoom Magnfier Languages.
121
 
122
  == Documentation ==
123
 
@@ -125,6 +128,9 @@ Full documentation is available [here](http://yithemes.com/docs-plugins/yith-woo
125
 
126
  == Upgrade notice ==
127
 
 
 
 
128
  = 1.2.3 =
129
  * Added: Support to Wordpress 4.1.1
130
  * Fixed: Minor bugs
4
  Tags: ajax, search, woocommerce, products, themes, yit, e-commerce, shop, yith, ajax search, instant search, premium, yithemes, autocomplete, autosuggest, better search, category search, custom search, highlight terms, Live Search, Predictive Search, product search, relevant search, search highlight, search product, suggest, typeahead, WooCommerce Plugin, woocommerce product search, woocommerce search, wordpress ecommerce
5
  Requires at least: 3.5.1
6
  Tested up to: 4.1.1
7
+ Stable tag: 1.2.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
32
  Once you have installed the plugin, you just need to activate the plugin in order to enable it.
33
 
34
  = Configuration =
35
+ YITH WooCommerce Ajax Search will add a new submenu called "Ajax Search" under "YIT Plugins" menu. Here you are able to configure all the plugin settings.
36
 
37
  = Developer =
38
 
67
 
68
  == Changelog ==
69
 
70
+ = 1.2.4 =
71
+ * Fixed: Minor bugs
72
+
73
  = 1.2.3 =
74
  * Added: Support to Wordpress 4.1.1
75
  * Fixed: Minor bugs
111
 
112
  == Suggestions ==
113
 
114
+ If you have suggestions about how to improve YITH WooCommerce Ajax Search, you can [write us](mailto:plugins@yithemes.com "Your Inspiration Themes") so we can bundle them into YITH WooCommerce Ajax Search.
115
 
116
  == Translators ==
117
 
120
  * Italiano
121
 
122
  If you have created your own language pack, or have an update for an existing one, you can send [gettext PO and MO file](http://codex.wordpress.org/Translating_WordPress "Translating WordPress")
123
+ [use](http://yithemes.com/contact/ "Your Inspiration Themes") so we can bundle it into YITH WooCommerce Ajax Search.
124
 
125
  == Documentation ==
126
 
128
 
129
  == Upgrade notice ==
130
 
131
+ = 1.2.4 =
132
+ * Fixed: Minor bugs
133
+
134
  = 1.2.3 =
135
  * Added: Support to Wordpress 4.1.1
136
  * Fixed: Minor bugs
assets/js/frontend.js CHANGED
@@ -13,6 +13,8 @@ jQuery(document).ready(function ($) {
13
  loader_icon = el.data('loader-icon') == '' ? def_loader : el.data('loader-icon'),
14
  min_chars = el.data('min-chars');
15
 
 
 
16
  el.each(function () {
17
  var $t = $(this),
18
  append_to = ( typeof $t.data('append-to') == 'undefined') ? $t.closest('.yith-ajaxsearchform-container') : $t.data('append-to');
13
  loader_icon = el.data('loader-icon') == '' ? def_loader : el.data('loader-icon'),
14
  min_chars = el.data('min-chars');
15
 
16
+ if( el.length == 0 ) el = $('#yith-s');
17
+
18
  el.each(function () {
19
  var $t = $(this),
20
  append_to = ( typeof $t.data('append-to') == 'undefined') ? $t.closest('.yith-ajaxsearchform-container') : $t.data('append-to');
assets/js/frontend.min.js CHANGED
@@ -1,36 +1,2 @@
1
- /**
2
- * frontend.js
3
- *
4
- * @author Your Inspiration Themes
5
- * @package YITH WooCommerce Ajax Search
6
- * @version 1.1.1
7
- */
8
- jQuery(document).ready(function ($) {
9
- "use strict";
10
-
11
- var el = $('.yith-s'),
12
- def_loader = ( typeof woocommerce_params != 'undefined' && typeof woocommerce_params.ajax_loader_url != 'undefined' ) ? woocommerce_params.ajax_loader_url : yith_wcas_params.loading,
13
- loader_icon = el.data('loader-icon') == '' ? def_loader : el.data('loader-icon'),
14
- min_chars = el.data('min-chars');
15
-
16
- el.each(function () {
17
- var $t = $(this),
18
- append_to = ( typeof $t.data('append-to') == 'undefined') ? $t.closest('.yith-ajaxsearchform-container') : $t.data('append-to');
19
-
20
- el.autocomplete({
21
- minChars : min_chars,
22
- appendTo : append_to,
23
- serviceUrl : woocommerce_params.ajax_url + '?action=yith_ajax_search_products',
24
- onSearchStart : function () {
25
- $(this).css('background', 'url(' + loader_icon + ') no-repeat right center');
26
- },
27
- onSelect : function (suggestion) {
28
- if (suggestion.id != -1) {
29
- window.location.href = suggestion.url;
30
- }
31
- }
32
- });
33
- });
34
- });
35
-
36
-
1
+ jQuery(document).ready(function(c){var a=c(".yith-s"),d="undefined"!=typeof woocommerce_params&&"undefined"!=typeof woocommerce_params.ajax_loader_url?woocommerce_params.ajax_loader_url:yith_wcas_params.loading,e=""==a.data("loader-icon")?d:a.data("loader-icon"),f=a.data("min-chars");0==a.length&&(a=c("#yith-s"));a.each(function(){var b=c(this),b="undefined"==typeof b.data("append-to")?b.closest(".yith-ajaxsearchform-container"):b.data("append-to");a.autocomplete({minChars:f,appendTo:b,serviceUrl:woocommerce_params.ajax_url+
2
+ "?action=yith_ajax_search_products",onSearchStart:function(){c(this).css("background","url("+e+") no-repeat right center")},onSelect:function(a){-1!=a.id&&(window.location.href=a.url)}})})});
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
class.yith-wcas-admin.php CHANGED
@@ -104,7 +104,7 @@ if( !class_exists( 'YITH_WCAS_Admin' ) ) {
104
  public function action_links( $links ) {
105
 
106
  $links[] = '<a href="' . admin_url( "admin.php?page={$this->_panel_page}" ) . '">' . __( 'Settings', 'yit' ) . '</a>';
107
- $links[] = '<a href="' . $this->_premium_landing . '" target="_blank">' . __( 'Premium Version', 'yit' ) . '</a>';
108
 
109
  return $links;
110
  }
@@ -221,7 +221,7 @@ YITH WooCommerce Ajax Search is available in an outstanding PREMIUM version with
221
  __( 'YITH WooCommerce Ajax Search Updated', 'yit' ),
222
  __( 'From now on, you can find all the options of YITH WooCommerce Ajax Search Updated under YIT Plugin -> Ajax Search instead of WooCommerce -> Settings -> Ajax Search, as in the previous version.
223
  When one of our plugins updates, a new voice will be added to this menu.
224
- YITH WooCommerce Ajax Search renovates with new available options, discover the <a href="'.$this->_premium_landing.'">PREMIUM version</a>.
225
  ', 'yit' )
226
  ),
227
  'position' => array( 'edge' => 'left', 'align' => 'center' ),
@@ -231,5 +231,17 @@ YITH WooCommerce Ajax Search renovates with new available options, discover the
231
  YIT_Pointers()->register( $args );
232
  }
233
 
 
 
 
 
 
 
 
 
 
 
 
 
234
  }
235
  }
104
  public function action_links( $links ) {
105
 
106
  $links[] = '<a href="' . admin_url( "admin.php?page={$this->_panel_page}" ) . '">' . __( 'Settings', 'yit' ) . '</a>';
107
+ $links[] = '<a href="' . $this->get_premium_landing_uri() . '" target="_blank">' . __( 'Premium Version', 'yit' ) . '</a>';
108
 
109
  return $links;
110
  }
221
  __( 'YITH WooCommerce Ajax Search Updated', 'yit' ),
222
  __( 'From now on, you can find all the options of YITH WooCommerce Ajax Search Updated under YIT Plugin -> Ajax Search instead of WooCommerce -> Settings -> Ajax Search, as in the previous version.
223
  When one of our plugins updates, a new voice will be added to this menu.
224
+ YITH WooCommerce Ajax Search renovates with new available options, discover the <a href="'.$this->get_premium_landing_uri().'">PREMIUM version</a>.
225
  ', 'yit' )
226
  ),
227
  'position' => array( 'edge' => 'left', 'align' => 'center' ),
231
  YIT_Pointers()->register( $args );
232
  }
233
 
234
+
235
+ /**
236
+ * Get the premium landing uri
237
+ *
238
+ * @since 1.0.0
239
+ * @author Andrea Grillo <andrea.grillo@yithemes.com>
240
+ * @return string The premium landing link
241
+ */
242
+ public function get_premium_landing_uri(){
243
+ return defined( 'YITH_REFER_ID' ) ? $this->_premium_landing . '?refer_id=' . YITH_REFER_ID : $this->_premium_landing;
244
+ }
245
+
246
  }
247
  }
class.yith-wcas.php CHANGED
@@ -55,7 +55,9 @@ if ( !class_exists( 'YITH_WCAS' ) ) {
55
  add_shortcode( 'yith_woocommerce_ajax_search', array( $this, 'add_woo_ajax_search_shortcode' ) );
56
 
57
  if ( is_admin() ) {
 
58
  $this->obj = new YITH_WCAS_Admin( $this->version );
 
59
  }
60
  else {
61
  $this->obj = new YITH_WCAS_Frontend( $this->version );
55
  add_shortcode( 'yith_woocommerce_ajax_search', array( $this, 'add_woo_ajax_search_shortcode' ) );
56
 
57
  if ( is_admin() ) {
58
+
59
  $this->obj = new YITH_WCAS_Admin( $this->version );
60
+
61
  }
62
  else {
63
  $this->obj = new YITH_WCAS_Frontend( $this->version );
init.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: YITH WooCommerce Ajax Search
4
  * Plugin URI: http://yithemes.com/
5
  * Description: YITH WooCommerce Ajax Search allows your users to search products in real time.
6
- * Version: 1.2.3
7
  * Author: Yithemes
8
  * Author URI: http://yithemes.com/
9
  * Text Domain: yit
@@ -11,7 +11,7 @@
11
  *
12
  * @author Yithemes
13
  * @package YITH WooCommerce Ajax Search
14
- * @version 1.2.3
15
  */
16
 
17
  /* Copyright 2013 Your Inspiration Themes (email : plugins@yithemes.com)
@@ -71,7 +71,7 @@ register_activation_hook( __FILE__, 'yith_plugin_registration_hook' );
71
  if ( defined( 'YITH_WCAS_VERSION' ) ){
72
  return;
73
  }else{
74
- define( 'YITH_WCAS_VERSION', '1.2.3' );
75
  }
76
 
77
  if ( ! defined( 'YITH_WCAS_FREE_INIT' ) ) {
3
  * Plugin Name: YITH WooCommerce Ajax Search
4
  * Plugin URI: http://yithemes.com/
5
  * Description: YITH WooCommerce Ajax Search allows your users to search products in real time.
6
+ * Version: 1.2.4
7
  * Author: Yithemes
8
  * Author URI: http://yithemes.com/
9
  * Text Domain: yit
11
  *
12
  * @author Yithemes
13
  * @package YITH WooCommerce Ajax Search
14
+ * @version 1.2.4
15
  */
16
 
17
  /* Copyright 2013 Your Inspiration Themes (email : plugins@yithemes.com)
71
  if ( defined( 'YITH_WCAS_VERSION' ) ){
72
  return;
73
  }else{
74
+ define( 'YITH_WCAS_VERSION', '1.2.4' );
75
  }
76
 
77
  if ( ! defined( 'YITH_WCAS_FREE_INIT' ) ) {
plugin-options/settings-options.php CHANGED
@@ -12,7 +12,7 @@ if ( ! defined( 'ABSPATH' ) ) {
12
  exit;
13
  } // Exit if accessed directly
14
 
15
-
16
  return array(
17
 
18
  'settings' => array(
@@ -35,7 +35,7 @@ of YITH WOOCOMMERCE AJAX SEARCH to benefit from all features!', 'yit'),
35
  'title_second_column' => __( 'Get Support and Pro Features', 'yit' ),
36
  'description_second_column' => __('By purchasing the premium version of the plugin, you will take advantage of the advanced features of the product and you will get one year of free updates and support through our platform available 24h/24.', 'yit'),
37
  'button' => array(
38
- 'href' => 'http://yithemes.com/themes/plugins/yith-woocommerce-ajax-search/',
39
  'title' => 'Get Support and Pro Features'
40
  )
41
  ),
12
  exit;
13
  } // Exit if accessed directly
14
 
15
+ global $yith_wcas;
16
  return array(
17
 
18
  'settings' => array(
35
  'title_second_column' => __( 'Get Support and Pro Features', 'yit' ),
36
  'description_second_column' => __('By purchasing the premium version of the plugin, you will take advantage of the advanced features of the product and you will get one year of free updates and support through our platform available 24h/24.', 'yit'),
37
  'button' => array(
38
+ 'href' => $yith_wcas->obj->get_premium_landing_uri(),
39
  'title' => 'Get Support and Pro Features'
40
  )
41
  ),
templates/admin/premium.php CHANGED
@@ -1,3 +1,4 @@
 
1
  <style>
2
  .section{
3
  margin-left: -20px;
@@ -251,7 +252,7 @@
251
  Upgrade to the <span class="highlight">premium version</span><br/>
252
  of <span class="highlight">YITH WooCommerce Ajax Search</span> to benefit from all features!
253
  </p>
254
- <a href="http://yithemes.com/themes/plugins/yith-woocommerce-ajax-search/" target="_blank" class="premium-cta-button button btn">
255
  <span class="highlight">UPGRADE</span>
256
  <span>to the premium version</span>
257
  </a>
@@ -303,7 +304,7 @@
303
  Upgrade to the <span class="highlight">premium version</span><br/>
304
  of <span class="highlight">YITH WooCommerce Ajax Search</span> to benefit from all features!
305
  </p>
306
- <a href="http://yithemes.com/themes/plugins/yith-woocommerce-ajax-search/" target="_blank" class="premium-cta-button button btn">
307
  <span class="highlight">UPGRADE</span>
308
  <span>to the premium version</span>
309
  </a>
1
+ <?php global $yith_wcas ?>
2
  <style>
3
  .section{
4
  margin-left: -20px;
252
  Upgrade to the <span class="highlight">premium version</span><br/>
253
  of <span class="highlight">YITH WooCommerce Ajax Search</span> to benefit from all features!
254
  </p>
255
+ <a href="<?php echo $yith_wcas->obj->get_premium_landing_uri() ?>" target="_blank" class="premium-cta-button button btn">
256
  <span class="highlight">UPGRADE</span>
257
  <span>to the premium version</span>
258
  </a>
304
  Upgrade to the <span class="highlight">premium version</span><br/>
305
  of <span class="highlight">YITH WooCommerce Ajax Search</span> to benefit from all features!
306
  </p>
307
+ <a href="<?php echo $yith_wcas->obj->get_premium_landing_uri() ?>" target="_blank" class="premium-cta-button button btn">
308
  <span class="highlight">UPGRADE</span>
309
  <span>to the premium version</span>
310
  </a>
templates/yith-woocommerce-ajax-search.php CHANGED
@@ -23,6 +23,7 @@ wp_enqueue_script('yith_wcas_frontend' );
23
  value="<?php echo get_search_query() ?>"
24
  name="s"
25
  id="yith-s"
 
26
  placeholder="<?php echo get_option('yith_wcas_search_input_label') ?>"
27
  data-loader-icon="<?php echo str_replace( '"', '', apply_filters('yith_wcas_ajax_search_icon', '') ) ?>"
28
  data-min-chars="<?php echo get_option('yith_wcas_min_chars'); ?>" />
23
  value="<?php echo get_search_query() ?>"
24
  name="s"
25
  id="yith-s"
26
+ class="yith-s"
27
  placeholder="<?php echo get_option('yith_wcas_search_input_label') ?>"
28
  data-loader-icon="<?php echo str_replace( '"', '', apply_filters('yith_wcas_ajax_search_icon', '') ) ?>"
29
  data-min-chars="<?php echo get_option('yith_wcas_min_chars'); ?>" />