Advanced Woo Search - Version 1.76

Version Description

  • Update - Markup of search form
  • Dev - Add new parameters for ajax call
Download this release

Release Info

Developer Mihail Barinov
Plugin Icon 128x128 Advanced Woo Search
Version 1.76
Comparing to
See all releases

Code changes from version 1.75 to 1.76

advanced-woo-search.php CHANGED
@@ -3,7 +3,7 @@
3
  /*
4
  Plugin Name: Advanced Woo Search
5
  Description: Advance ajax WooCommerce product search.
6
- Version: 1.75
7
  Author: ILLID
8
  Author URI: https://advanced-woo-search.com/
9
  Text Domain: aws
@@ -16,7 +16,7 @@ if ( ! defined( 'ABSPATH' ) ) {
16
  exit;
17
  }
18
 
19
- define( 'AWS_VERSION', '1.75' );
20
 
21
 
22
  define( 'AWS_DIR', dirname( __FILE__ ) );
3
  /*
4
  Plugin Name: Advanced Woo Search
5
  Description: Advance ajax WooCommerce product search.
6
+ Version: 1.76
7
  Author: ILLID
8
  Author URI: https://advanced-woo-search.com/
9
  Text Domain: aws
16
  exit;
17
  }
18
 
19
+ define( 'AWS_VERSION', '1.76' );
20
 
21
 
22
  define( 'AWS_DIR', dirname( __FILE__ ) );
assets/js/common.js CHANGED
@@ -74,7 +74,8 @@
74
  var data = {
75
  action: 'aws_action',
76
  keyword : searchFor,
77
- page: 0,
 
78
  lang: d.lang,
79
  pageurl: window.location.href
80
  };
@@ -348,7 +349,7 @@
348
  instance++;
349
 
350
  self.data( pluginPfx, {
351
- minChars : ( self.data('min-chars') !== undefined ) ? self.data('min-chars') : 1,
352
  lang : ( self.data('lang') !== undefined ) ? self.data('lang') : false,
353
  showLoader: ( self.data('show-loader') !== undefined ) ? self.data('show-loader') : true,
354
  showMore: ( self.data('show-more') !== undefined ) ? self.data('show-more') : true,
@@ -356,7 +357,9 @@
356
  showClear: ( self.data('show-clear') !== undefined ) ? self.data('show-clear') : false,
357
  useAnalytics: ( self.data('use-analytics') !== undefined ) ? self.data('use-analytics') : false,
358
  instance: instance,
359
- resultBlock: '#aws-search-result-' + instance
 
 
360
  });
361
 
362
 
74
  var data = {
75
  action: 'aws_action',
76
  keyword : searchFor,
77
+ page: d.pageId,
78
+ tax: d.tax,
79
  lang: d.lang,
80
  pageurl: window.location.href
81
  };
349
  instance++;
350
 
351
  self.data( pluginPfx, {
352
+ minChars : ( self.data('min-chars') !== undefined ) ? self.data('min-chars') : 1,
353
  lang : ( self.data('lang') !== undefined ) ? self.data('lang') : false,
354
  showLoader: ( self.data('show-loader') !== undefined ) ? self.data('show-loader') : true,
355
  showMore: ( self.data('show-more') !== undefined ) ? self.data('show-more') : true,
357
  showClear: ( self.data('show-clear') !== undefined ) ? self.data('show-clear') : false,
358
  useAnalytics: ( self.data('use-analytics') !== undefined ) ? self.data('use-analytics') : false,
359
  instance: instance,
360
+ resultBlock: '#aws-search-result-' + instance,
361
+ pageId: ( self.data('page-id') !== undefined ) ? self.data('page-id') : 0,
362
+ tax: ( self.data('tax') !== undefined ) ? self.data('tax') : 0
363
  });
364
 
365
 
includes/class-aws-markup.php CHANGED
@@ -63,6 +63,8 @@ if ( ! class_exists( 'AWS_Markup' ) ) :
63
  'data-min-chars' => $min_chars,
64
  'data-buttons-order' => $buttons_order,
65
  'data-is-mobile' => wp_is_mobile() ? 'true' : 'false',
 
 
66
  );
67
 
68
 
@@ -84,7 +86,7 @@ if ( ! class_exists( 'AWS_Markup' ) ) :
84
 
85
  $markup .= '<div class="aws-wrapper">';
86
 
87
- $markup .= '<input type="text" name="s" value="' . get_search_query() . '" class="aws-search-field" placeholder="' . esc_attr( $placeholder ) . '" autocomplete="off" />';
88
  $markup .= '<input type="hidden" name="post_type" value="product">';
89
  $markup .= '<input type="hidden" name="type_aws" value="true">';
90
 
63
  'data-min-chars' => $min_chars,
64
  'data-buttons-order' => $buttons_order,
65
  'data-is-mobile' => wp_is_mobile() ? 'true' : 'false',
66
+ 'data-page-id' => get_queried_object_id(),
67
+ 'data-tax' => get_query_var('taxonomy')
68
  );
69
 
70
 
86
 
87
  $markup .= '<div class="aws-wrapper">';
88
 
89
+ $markup .= '<input type="search" name="s" value="' . get_search_query() . '" class="aws-search-field" placeholder="' . esc_attr( $placeholder ) . '" autocomplete="off" />';
90
  $markup .= '<input type="hidden" name="post_type" value="product">';
91
  $markup .= '<input type="hidden" name="type_aws" value="true">';
92
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
4
  Tags: widget, plugin, woocommerce, search, product search, woocommerce search, ajax search, live search, custom search, ajax, shortcode, better search, relevance search, relevant search, search by sku, search plugin, shop, store, wordpress search, wp ajax search, wp search, wp search plugin, sidebar, ecommerce, merketing, products, category search, instant-search, search highlight, woocommerce advanced search, woocommerce live search, WooCommerce Plugin, woocommerce product search
5
  Requires at least: 4.0
6
  Tested up to: 5.2
7
- Stable tag: 1.75
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -103,6 +103,10 @@ Yep. This plugin is always compatible with the latest version of Woocommerce?
103
 
104
  == Changelog ==
105
 
 
 
 
 
106
  = 1.75 =
107
  * Fix - Brands filter for search results page
108
  * Fix - Polylang plugin search results page URL
4
  Tags: widget, plugin, woocommerce, search, product search, woocommerce search, ajax search, live search, custom search, ajax, shortcode, better search, relevance search, relevant search, search by sku, search plugin, shop, store, wordpress search, wp ajax search, wp search, wp search plugin, sidebar, ecommerce, merketing, products, category search, instant-search, search highlight, woocommerce advanced search, woocommerce live search, WooCommerce Plugin, woocommerce product search
5
  Requires at least: 4.0
6
  Tested up to: 5.2
7
+ Stable tag: 1.76
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
103
 
104
  == Changelog ==
105
 
106
+ = 1.76 =
107
+ * Update - Markup of search form
108
+ * Dev - Add new parameters for ajax call
109
+
110
  = 1.75 =
111
  * Fix - Brands filter for search results page
112
  * Fix - Polylang plugin search results page URL