Version Description
( 2021-01-18 ) = * Add - Support for WooCommerce Product Filter by WooBeWoo plugin * Add - Integration for Martfury theme * Add - Integration for ATUM Inventory Management for WooCommerce plugin ( Product level addon ). Hide not sellable products * Update - Dynamic strings translation. Load translation from .po file for default strings if no dynamic translation specified * Update - WCFM - Multivendor Marketplace plugin integration. Add vendors shop name and logo inside search results list * Fix - GA tracking code * Fix - Do not index and search for password protected products * Fix - Hide product with visibility
Download this release
Release Info
Developer | Mihail Barinov |
Plugin | Advanced Woo Search |
Version | 2.19 |
Comparing to | |
See all releases |
Code changes from version 2.18 to 2.19
- advanced-woo-search.php +2 -2
- assets/js/common.js +23 -4
- includes/class-aws-helpers.php +8 -2
- includes/class-aws-integrations.php +92 -0
- includes/class-aws-search-page.php +11 -2
- includes/class-aws-search.php +1 -1
- includes/class-aws-table.php +3 -0
- includes/class-aws-tax-search.php +4 -0
- includes/modules/class-aws-wcfm.php +45 -0
- readme.txt +74 -8
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: 2.
|
7 |
Author: ILLID
|
8 |
Author URI: https://advanced-woo-search.com/
|
9 |
Text Domain: advanced-woo-search
|
@@ -96,7 +96,7 @@ final class AWS_Main {
|
|
96 |
*/
|
97 |
private function define_constants() {
|
98 |
|
99 |
-
$this->define( 'AWS_VERSION', '2.
|
100 |
|
101 |
$this->define( 'AWS_DIR', plugin_dir_path( AWS_FILE ) );
|
102 |
$this->define( 'AWS_URL', plugin_dir_url( AWS_FILE ) );
|
3 |
/*
|
4 |
Plugin Name: Advanced Woo Search
|
5 |
Description: Advance ajax WooCommerce product search.
|
6 |
+
Version: 2.19
|
7 |
Author: ILLID
|
8 |
Author URI: https://advanced-woo-search.com/
|
9 |
Text Domain: advanced-woo-search
|
96 |
*/
|
97 |
private function define_constants() {
|
98 |
|
99 |
+
$this->define( 'AWS_VERSION', '2.19' );
|
100 |
|
101 |
$this->define( 'AWS_DIR', plugin_dir_path( AWS_FILE ) );
|
102 |
$this->define( 'AWS_URL', plugin_dir_url( AWS_FILE ) );
|
assets/js/common.js
CHANGED
@@ -418,15 +418,34 @@ AwsHooks.filters = AwsHooks.filters || {};
|
|
418 |
analytics: function( label ) {
|
419 |
if ( d.useAnalytics ) {
|
420 |
try {
|
421 |
-
|
|
|
422 |
gtag('event', 'AWS search', {
|
423 |
'event_label': label,
|
424 |
-
'event_category': 'AWS Search Term'
|
|
|
|
|
|
|
|
|
|
|
425 |
});
|
426 |
}
|
427 |
-
if ( typeof ga !== 'undefined' ) {
|
428 |
ga('send', 'event', 'AWS search', 'AWS Search Term', label);
|
429 |
-
ga( 'send', 'pageview',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
430 |
}
|
431 |
}
|
432 |
catch (error) {
|
418 |
analytics: function( label ) {
|
419 |
if ( d.useAnalytics ) {
|
420 |
try {
|
421 |
+
var sPage = '/?s=' + encodeURIComponent( 'ajax-search:' + label );
|
422 |
+
if ( typeof gtag !== 'undefined' && gtag !== null ) {
|
423 |
gtag('event', 'AWS search', {
|
424 |
'event_label': label,
|
425 |
+
'event_category': 'AWS Search Term',
|
426 |
+
'transport_type' : 'beacon'
|
427 |
+
});
|
428 |
+
gtag('event', 'page_view', {
|
429 |
+
'page_path': sPage,
|
430 |
+
'page_title' : 'AWS search'
|
431 |
});
|
432 |
}
|
433 |
+
if ( typeof ga !== 'undefined' && ga !== null ) {
|
434 |
ga('send', 'event', 'AWS search', 'AWS Search Term', label);
|
435 |
+
ga( 'send', 'pageview', sPage );
|
436 |
+
}
|
437 |
+
if ( typeof pageTracker !== "undefined" && pageTracker !== null ) {
|
438 |
+
pageTracker._trackPageview( sPage );
|
439 |
+
pageTracker._trackEvent( 'AWS search', 'AWS search', 'AWS Search Term', label )
|
440 |
+
}
|
441 |
+
if ( typeof _gaq !== 'undefined' && _gaq !== null ) {
|
442 |
+
_gaq.push(['_trackEvent', 'AWS search', 'AWS Search Term', label ]);
|
443 |
+
_gaq.push(['_trackPageview', sPage]);
|
444 |
+
}
|
445 |
+
// This uses Monster Insights method of tracking Google Analytics.
|
446 |
+
if ( typeof __gaTracker !== 'undefined' && __gaTracker !== null ) {
|
447 |
+
__gaTracker( 'send', 'event', 'AWS search', 'AWS Search Term', label );
|
448 |
+
__gaTracker( 'send', 'pageview', sPage );
|
449 |
}
|
450 |
}
|
451 |
catch (error) {
|
includes/class-aws-helpers.php
CHANGED
@@ -685,11 +685,17 @@ if ( ! class_exists( 'AWS_Helpers' ) ) :
|
|
685 |
*/
|
686 |
static public function translate( $name, $value ) {
|
687 |
|
|
|
|
|
688 |
if ( function_exists( 'icl_t' ) ) {
|
689 |
-
|
|
|
|
|
|
|
|
|
690 |
}
|
691 |
|
692 |
-
return $
|
693 |
|
694 |
}
|
695 |
|
685 |
*/
|
686 |
static public function translate( $name, $value ) {
|
687 |
|
688 |
+
$translated_value = $value;
|
689 |
+
|
690 |
if ( function_exists( 'icl_t' ) ) {
|
691 |
+
$translated_value = icl_t( 'aws', $name, $value );
|
692 |
+
}
|
693 |
+
|
694 |
+
if ( $translated_value === $value ) {
|
695 |
+
$translated_value = __( $translated_value, 'advanced-woo-search' );
|
696 |
}
|
697 |
|
698 |
+
return $translated_value;
|
699 |
|
700 |
}
|
701 |
|
includes/class-aws-integrations.php
CHANGED
@@ -211,6 +211,18 @@ if ( ! class_exists( 'AWS_Integrations' ) ) :
|
|
211 |
add_filter( 'aws_search_results_products', array( $this, 'pvbur_aws_search_results_products' ), 1 );
|
212 |
}
|
213 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
214 |
}
|
215 |
|
216 |
/**
|
@@ -1099,6 +1111,10 @@ if ( ! class_exists( 'AWS_Integrations' ) ) :
|
|
1099 |
$selectors[] = '.edgtf-page-header form, .edgtf-mobile-header form, .edgtf-fullscreen-search-form';
|
1100 |
}
|
1101 |
|
|
|
|
|
|
|
|
|
1102 |
// WCFM - WooCommerce Multivendor Marketplace
|
1103 |
if ( class_exists( 'WCFMmp' ) ) {
|
1104 |
$selectors[] = '#wcfmmp-store .woocommerce-product-search';
|
@@ -1509,6 +1525,82 @@ if ( ! class_exists( 'AWS_Integrations' ) ) :
|
|
1509 |
|
1510 |
}
|
1511 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1512 |
}
|
1513 |
|
1514 |
endif;
|
211 |
add_filter( 'aws_search_results_products', array( $this, 'pvbur_aws_search_results_products' ), 1 );
|
212 |
}
|
213 |
|
214 |
+
// WooCommerce Product Filter by WooBeWoo
|
215 |
+
if ( defined( 'WPF_PLUG_NAME' ) ) {
|
216 |
+
add_filter( 'wpf_addHtmlBeforeFilter', array( $this, 'wpf_add_html_before_filter' ) );
|
217 |
+
add_filter( 'aws_search_page_custom_data', array( $this, 'wpf_search_page_custom_data' ) );
|
218 |
+
add_filter( 'aws_search_page_filters', array( $this, 'wpf_search_page_filters' ) );
|
219 |
+
}
|
220 |
+
|
221 |
+
// ATUM Inventory Management for WooCommerce plugin ( Product level addon )
|
222 |
+
if ( class_exists( 'AtumProductLevelsAddon' ) ) {
|
223 |
+
add_filter( 'aws_indexed_data', array( $this, 'atum_index_data' ), 10, 2 );
|
224 |
+
}
|
225 |
+
|
226 |
}
|
227 |
|
228 |
/**
|
1111 |
$selectors[] = '.edgtf-page-header form, .edgtf-mobile-header form, .edgtf-fullscreen-search-form';
|
1112 |
}
|
1113 |
|
1114 |
+
if ( 'Martfury' === $this->current_theme ) {
|
1115 |
+
$selectors[] = '#site-header .products-search';
|
1116 |
+
}
|
1117 |
+
|
1118 |
// WCFM - WooCommerce Multivendor Marketplace
|
1119 |
if ( class_exists( 'WCFMmp' ) ) {
|
1120 |
$selectors[] = '#wcfmmp-store .woocommerce-product-search';
|
1525 |
|
1526 |
}
|
1527 |
|
1528 |
+
/*
|
1529 |
+
* WooCommerce Product Filter by WooBeWoo: check for active widget
|
1530 |
+
*/
|
1531 |
+
public function wpf_add_html_before_filter( $html ) {
|
1532 |
+
$this->data['wpf_filter'] = true;
|
1533 |
+
if ( isset( $_GET['type_aws'] ) ) {
|
1534 |
+
$html = str_replace( '"enable_ajax":"1"', '"enable_ajax":"0"', $html );
|
1535 |
+
$html = str_replace( '"enable_ajax":"1"', '"enable_ajax":"0"', $html );
|
1536 |
+
}
|
1537 |
+
return $html;
|
1538 |
+
}
|
1539 |
+
|
1540 |
+
/*
|
1541 |
+
* WooCommerce Product Filter by WooBeWoo: fix filters display
|
1542 |
+
*/
|
1543 |
+
public function wpf_search_page_custom_data( $data ) {
|
1544 |
+
if ( isset( $this->data['wpf_filter'] ) ) {
|
1545 |
+
$data['force_ids'] = true;
|
1546 |
+
}
|
1547 |
+
return $data;
|
1548 |
+
}
|
1549 |
+
|
1550 |
+
/*
|
1551 |
+
* WooCommerce Product Filter by WooBeWoo: filter products
|
1552 |
+
*/
|
1553 |
+
public function wpf_search_page_filters( $filters ) {
|
1554 |
+
|
1555 |
+
foreach ( $_GET as $key => $param ) {
|
1556 |
+
|
1557 |
+
$isNot = ( substr($param, 0, 1) === '!' );
|
1558 |
+
|
1559 |
+
if ( strpos($key, 'filter_cat') !== false ) {
|
1560 |
+
|
1561 |
+
$idsAnd = explode(',', $param);
|
1562 |
+
$idsOr = explode('|', $param);
|
1563 |
+
$isAnd = count($idsAnd) > count($idsOr);
|
1564 |
+
$operator = $isAnd ? 'AND' : 'OR';
|
1565 |
+
$filters['tax']['product_cat'] = array(
|
1566 |
+
'terms' => $isAnd ? $idsAnd : $idsOr,
|
1567 |
+
'operator' => $operator
|
1568 |
+
);
|
1569 |
+
}
|
1570 |
+
|
1571 |
+
if ( strpos($key, 'product_tag') !== false ) {
|
1572 |
+
|
1573 |
+
$idsAnd = explode(',', $param);
|
1574 |
+
$idsOr = explode('|', $param);
|
1575 |
+
$isAnd = count($idsAnd) > count($idsOr);
|
1576 |
+
$operator = $isAnd ? 'AND' : 'OR';
|
1577 |
+
$filters['tax']['product_tag'] = array(
|
1578 |
+
'terms' => $isAnd ? $idsAnd : $idsOr,
|
1579 |
+
'operator' => $operator
|
1580 |
+
);
|
1581 |
+
}
|
1582 |
+
|
1583 |
+
if ( strpos($key, 'pr_onsale') !== false ) {
|
1584 |
+
$filters['on_sale'] = true;
|
1585 |
+
}
|
1586 |
+
|
1587 |
+
}
|
1588 |
+
|
1589 |
+
return $filters;
|
1590 |
+
|
1591 |
+
}
|
1592 |
+
|
1593 |
+
/*
|
1594 |
+
* ATUM Inventory Management for WooCommerce plugin ( Product level addon )
|
1595 |
+
*/
|
1596 |
+
public function atum_index_data( $data, $id ) {
|
1597 |
+
$is_purchasable = AtumLevels\Inc\Helpers::is_purchase_allowed( $id );
|
1598 |
+
if ( ! $is_purchasable ) {
|
1599 |
+
$data = array();
|
1600 |
+
}
|
1601 |
+
return $data;
|
1602 |
+
}
|
1603 |
+
|
1604 |
}
|
1605 |
|
1606 |
endif;
|
includes/class-aws-search-page.php
CHANGED
@@ -187,10 +187,19 @@ if ( ! class_exists( 'AWS_Search_Page' ) ) :
|
|
187 |
*/
|
188 |
public function posts_pre_query( $posts, $query ) {
|
189 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
190 |
$post_type_product = ( $query->get( 'post_type' ) && is_string( $query->get( 'post_type' ) ) && $query->get( 'post_type' ) === 'product' ) ? true : false;
|
191 |
|
192 |
if ( $post_type_product && isset( $_GET['type_aws'] ) && isset( $query->query_vars['s'] ) && $query->query && isset( $query->query['fields'] ) && $query->query['fields'] == 'ids' &&
|
193 |
-
( ( isset( $this->data['is_elementor'] ) && $this->data['is_elementor'] ) || ( isset( $this->data['is_divi_s_page'] ) && $this->data['is_divi_s_page'] ) )
|
194 |
)
|
195 |
{
|
196 |
|
@@ -318,7 +327,7 @@ if ( ! class_exists( 'AWS_Search_Page' ) ) :
|
|
318 |
$post_type_product = ( $query->get( 'post_type' ) && is_string( $query->get( 'post_type' ) ) && $query->get( 'post_type' ) === 'product' ) ? true : false;
|
319 |
|
320 |
if ( $post_type_product && isset( $_GET['type_aws'] ) && isset( $this->data['all_products'] ) && $this->data['all_products'] && isset( $query->query_vars['nopaging'] ) && ! $query->query_vars['nopaging'] &&
|
321 |
-
( ( isset( $this->data['is_elementor'] ) && $this->data['is_elementor'] ) || ( isset( $this->data['is_divi_s_page'] ) && $this->data['is_divi_s_page'] ) )
|
322 |
) {
|
323 |
$found_posts = count( $this->data['all_products'] );
|
324 |
}
|
187 |
*/
|
188 |
public function posts_pre_query( $posts, $query ) {
|
189 |
|
190 |
+
/**
|
191 |
+
* Filter search results custom data array
|
192 |
+
* @since 2.19
|
193 |
+
* @param array $this->data Search results data array
|
194 |
+
* @param object $query Query
|
195 |
+
* @param array $posts Posts
|
196 |
+
*/
|
197 |
+
$this->data = apply_filters( 'aws_search_page_custom_data', $this->data, $query, $posts );
|
198 |
+
|
199 |
$post_type_product = ( $query->get( 'post_type' ) && is_string( $query->get( 'post_type' ) ) && $query->get( 'post_type' ) === 'product' ) ? true : false;
|
200 |
|
201 |
if ( $post_type_product && isset( $_GET['type_aws'] ) && isset( $query->query_vars['s'] ) && $query->query && isset( $query->query['fields'] ) && $query->query['fields'] == 'ids' &&
|
202 |
+
( ( isset( $this->data['force_ids'] ) && $this->data['force_ids'] ) || ( isset( $this->data['is_elementor'] ) && $this->data['is_elementor'] ) || ( isset( $this->data['is_divi_s_page'] ) && $this->data['is_divi_s_page'] ) )
|
203 |
)
|
204 |
{
|
205 |
|
327 |
$post_type_product = ( $query->get( 'post_type' ) && is_string( $query->get( 'post_type' ) ) && $query->get( 'post_type' ) === 'product' ) ? true : false;
|
328 |
|
329 |
if ( $post_type_product && isset( $_GET['type_aws'] ) && isset( $this->data['all_products'] ) && $this->data['all_products'] && isset( $query->query_vars['nopaging'] ) && ! $query->query_vars['nopaging'] &&
|
330 |
+
( ( isset( $this->data['force_ids'] ) && $this->data['force_ids'] ) || ( isset( $this->data['is_elementor'] ) && $this->data['is_elementor'] ) || ( isset( $this->data['is_divi_s_page'] ) && $this->data['is_divi_s_page'] ) )
|
331 |
) {
|
332 |
$found_posts = count( $this->data['all_products'] );
|
333 |
}
|
includes/class-aws-search.php
CHANGED
@@ -377,7 +377,7 @@ if ( ! class_exists( 'AWS_Search' ) ) :
|
|
377 |
$query['stock'] = " AND in_stock = 1";
|
378 |
}
|
379 |
|
380 |
-
$query['visibility'] = " AND NOT
|
381 |
|
382 |
}
|
383 |
|
377 |
$query['stock'] = " AND in_stock = 1";
|
378 |
}
|
379 |
|
380 |
+
$query['visibility'] = " AND visibility NOT IN ( 'hidden', 'catalog' )";
|
381 |
|
382 |
}
|
383 |
|
includes/class-aws-table.php
CHANGED
@@ -133,6 +133,7 @@ if ( ! class_exists( 'AWS_Table' ) ) :
|
|
133 |
'offset' => $index_meta['offset'],
|
134 |
'ignore_sticky_posts' => true,
|
135 |
'suppress_filters' => true,
|
|
|
136 |
'no_found_rows' => 1,
|
137 |
'orderby' => 'ID',
|
138 |
'order' => 'DESC',
|
@@ -265,6 +266,7 @@ if ( ! class_exists( 'AWS_Table' ) ) :
|
|
265 |
'post_status' => 'publish',
|
266 |
'ignore_sticky_posts' => true,
|
267 |
'suppress_filters' => true,
|
|
|
268 |
'no_found_rows' => 1,
|
269 |
'orderby' => 'ID',
|
270 |
'order' => 'DESC',
|
@@ -830,6 +832,7 @@ if ( ! class_exists( 'AWS_Table' ) ) :
|
|
830 |
'fields' => 'ids',
|
831 |
'post_type' => 'product',
|
832 |
'post_status' => 'publish',
|
|
|
833 |
'no_found_rows' => 1,
|
834 |
'include' => $product_id,
|
835 |
'lang' => ''
|
133 |
'offset' => $index_meta['offset'],
|
134 |
'ignore_sticky_posts' => true,
|
135 |
'suppress_filters' => true,
|
136 |
+
'has_password' => false,
|
137 |
'no_found_rows' => 1,
|
138 |
'orderby' => 'ID',
|
139 |
'order' => 'DESC',
|
266 |
'post_status' => 'publish',
|
267 |
'ignore_sticky_posts' => true,
|
268 |
'suppress_filters' => true,
|
269 |
+
'has_password' => false,
|
270 |
'no_found_rows' => 1,
|
271 |
'orderby' => 'ID',
|
272 |
'order' => 'DESC',
|
832 |
'fields' => 'ids',
|
833 |
'post_type' => 'product',
|
834 |
'post_status' => 'publish',
|
835 |
+
'has_password' => false,
|
836 |
'no_found_rows' => 1,
|
837 |
'include' => $product_id,
|
838 |
'lang' => ''
|
includes/class-aws-tax-search.php
CHANGED
@@ -172,6 +172,8 @@ if ( ! class_exists( 'AWS_Tax_Search' ) ) :
|
|
172 |
|
173 |
foreach ( $search_results as $result ) {
|
174 |
|
|
|
|
|
175 |
if ( function_exists( 'wpml_object_id_filter' ) ) {
|
176 |
$term = wpml_object_id_filter( $result->term_id, $result->taxonomy );
|
177 |
if ( $term != $result->term_id ) {
|
@@ -183,6 +185,7 @@ if ( ! class_exists( 'AWS_Tax_Search' ) ) :
|
|
183 |
|
184 |
if ( $term != null && !is_wp_error( $term ) ) {
|
185 |
$term_link = get_term_link( $term );
|
|
|
186 |
} else {
|
187 |
continue;
|
188 |
}
|
@@ -193,6 +196,7 @@ if ( ! class_exists( 'AWS_Tax_Search' ) ) :
|
|
193 |
'count' => ( $result->count > 0 ) ? $result->count : '',
|
194 |
'link' => $term_link,
|
195 |
'excerpt' => '',
|
|
|
196 |
);
|
197 |
|
198 |
$result_array[$result->taxonomy][] = $new_result;
|
172 |
|
173 |
foreach ( $search_results as $result ) {
|
174 |
|
175 |
+
$parent = '';
|
176 |
+
|
177 |
if ( function_exists( 'wpml_object_id_filter' ) ) {
|
178 |
$term = wpml_object_id_filter( $result->term_id, $result->taxonomy );
|
179 |
if ( $term != $result->term_id ) {
|
185 |
|
186 |
if ( $term != null && !is_wp_error( $term ) ) {
|
187 |
$term_link = get_term_link( $term );
|
188 |
+
$parent = is_object( $term ) && property_exists( $term, 'parent' ) ? $term->parent : '';
|
189 |
} else {
|
190 |
continue;
|
191 |
}
|
196 |
'count' => ( $result->count > 0 ) ? $result->count : '',
|
197 |
'link' => $term_link,
|
198 |
'excerpt' => '',
|
199 |
+
'parent' => $parent
|
200 |
);
|
201 |
|
202 |
$result_array[$result->taxonomy][] = $new_result;
|
includes/modules/class-aws-wcfm.php
CHANGED
@@ -43,11 +43,56 @@ if ( ! class_exists( 'AWS_WCFM' ) ) :
|
|
43 |
* Constructor
|
44 |
*/
|
45 |
public function __construct() {
|
|
|
46 |
add_filter( 'aws_searchbox_markup', array( $this, 'wcfm_searchbox_markup' ), 1, 2 );
|
47 |
add_filter( 'aws_front_data_parameters', array( $this, 'wcfm_front_data_parameters' ), 1 );
|
48 |
add_filter( 'aws_search_query_array', array( $this, 'wcfm_search_query_array' ), 1 );
|
49 |
}
|
50 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
/*
|
52 |
* WCFM - WooCommerce Multivendor Marketplace update search page url for vendors shops
|
53 |
*/
|
43 |
* Constructor
|
44 |
*/
|
45 |
public function __construct() {
|
46 |
+
add_filter( 'aws_excerpt_search_result', array( $this, 'wcfm_excerpt_search_result' ), 1, 3 );
|
47 |
add_filter( 'aws_searchbox_markup', array( $this, 'wcfm_searchbox_markup' ), 1, 2 );
|
48 |
add_filter( 'aws_front_data_parameters', array( $this, 'wcfm_front_data_parameters' ), 1 );
|
49 |
add_filter( 'aws_search_query_array', array( $this, 'wcfm_search_query_array' ), 1 );
|
50 |
}
|
51 |
|
52 |
+
/*
|
53 |
+
* Add store name and logo inside search results
|
54 |
+
*/
|
55 |
+
function wcfm_excerpt_search_result( $excerpt, $post_id, $product ) {
|
56 |
+
|
57 |
+
if ( function_exists( 'wcfm_get_vendor_id_by_post' ) ) {
|
58 |
+
|
59 |
+
$vendor_id = wcfm_get_vendor_id_by_post( $post_id );
|
60 |
+
|
61 |
+
if ( $vendor_id ) {
|
62 |
+
if ( apply_filters( 'wcfmmp_is_allow_sold_by', true, $vendor_id ) && wcfm_vendor_has_capability( $vendor_id, 'sold_by' ) ) {
|
63 |
+
|
64 |
+
global $WCFM, $WCFMmp;
|
65 |
+
|
66 |
+
$is_store_offline = get_user_meta( $vendor_id, '_wcfm_store_offline', true );
|
67 |
+
|
68 |
+
if ( ! $is_store_offline ) {
|
69 |
+
|
70 |
+
$store_name = wcfm_get_vendor_store_name( absint( $vendor_id ) );
|
71 |
+
$store_url = $WCFMmp->wcfmmp_store->get_shop_url();
|
72 |
+
|
73 |
+
$logo = '';
|
74 |
+
|
75 |
+
if ( apply_filters( 'wcfmmp_is_allow_sold_by_logo', true ) ) {
|
76 |
+
$store_logo = wcfm_get_vendor_store_logo_by_vendor( $vendor_id );
|
77 |
+
if ( ! $store_logo ) {
|
78 |
+
$store_logo = apply_filters( 'wcfmmp_store_default_logo', $WCFM->plugin_url . 'assets/images/wcfmmp-blue.png' );
|
79 |
+
}
|
80 |
+
$logo = '<img style="margin-right:4px;" width="24px" src="' . $store_logo . '" />';
|
81 |
+
}
|
82 |
+
|
83 |
+
$excerpt .= '<br><span style="margin-top:4px;display:block;" data-link="' . $store_url . '">' . $logo . $store_name . '</span>';
|
84 |
+
|
85 |
+
}
|
86 |
+
|
87 |
+
}
|
88 |
+
}
|
89 |
+
|
90 |
+
}
|
91 |
+
|
92 |
+
return $excerpt;
|
93 |
+
|
94 |
+
}
|
95 |
+
|
96 |
/*
|
97 |
* WCFM - WooCommerce Multivendor Marketplace update search page url for vendors shops
|
98 |
*/
|
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.6
|
7 |
-
Stable tag: 2.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -16,7 +16,7 @@ Advanced Woo Search - powerful search plugin for WooCommerce. Supports **AJAX**
|
|
16 |
|
17 |
[Plugin home page](https://advanced-woo-search.com/?utm_source=wp-repo&utm_medium=listing&utm_campaign=aws-repo) | [Features List](https://advanced-woo-search.com/features/?utm_source=wp-repo&utm_medium=listing&utm_campaign=aws-repo) | [Docs](https://advanced-woo-search.com/guide/?utm_source=wp-repo&utm_medium=listing&utm_campaign=aws-repo)
|
18 |
|
19 |
-
|
20 |
|
21 |
* **Products search** - Search across all your WooCommerce products
|
22 |
* **Search in** - Search in product **title**, **content**, **excerpt**, **categories**, **tags**, **ID** and **sku**. Or just in some of them
|
@@ -41,7 +41,7 @@ Advanced Woo Search - powerful search plugin for WooCommerce. Supports **AJAX**
|
|
41 |
* Custom Product Tabs for WooCommerce plugin support
|
42 |
* Search Exclude plugin support
|
43 |
|
44 |
-
|
45 |
|
46 |
Additional features available only in PRO plugin version.
|
47 |
|
@@ -68,11 +68,18 @@ Additional features available only in PRO plugin version.
|
|
68 |
|
69 |
[Features list](https://advanced-woo-search.com/features/?utm_source=wp-repo&utm_medium=listing&utm_campaign=aws-repo)
|
70 |
|
71 |
-
|
72 |
|
73 |
Here are some additional plugins that were made with love.
|
74 |
|
75 |
-
* [Advanced Woo Labels](https://wordpress.org/plugins/advanced-woo-labels/)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
|
77 |
== Installation ==
|
78 |
|
@@ -82,13 +89,36 @@ Here are some additional plugins that were made with love.
|
|
82 |
|
83 |
== Frequently Asked Questions ==
|
84 |
|
85 |
-
=
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
86 |
|
87 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
88 |
|
89 |
= How to insert search form? =
|
90 |
|
91 |
-
|
|
|
|
|
92 |
|
93 |
Or just use shortcode for displaying form inside your post/page:
|
94 |
|
@@ -98,6 +128,30 @@ Or insert this function inside php file ( often it used to insert form inside pa
|
|
98 |
|
99 |
`echo do_shortcode( '[aws_search_form]' );`
|
100 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
101 |
= Is this plugin compatible with latest version of Woocommerce? =
|
102 |
|
103 |
Yep. This plugin is always compatible with the latest version of Woocommerce?
|
@@ -112,6 +166,18 @@ Yep. This plugin is always compatible with the latest version of Woocommerce?
|
|
112 |
|
113 |
== Changelog ==
|
114 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
115 |
= 2.18 ( 2021-01-04 ) =
|
116 |
* Add - Support for Walker WordPress theme
|
117 |
* Update - Elementor plugin support. Add integration with Elementskit plugin header search
|
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.6
|
7 |
+
Stable tag: 2.19
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
16 |
|
17 |
[Plugin home page](https://advanced-woo-search.com/?utm_source=wp-repo&utm_medium=listing&utm_campaign=aws-repo) | [Features List](https://advanced-woo-search.com/features/?utm_source=wp-repo&utm_medium=listing&utm_campaign=aws-repo) | [Docs](https://advanced-woo-search.com/guide/?utm_source=wp-repo&utm_medium=listing&utm_campaign=aws-repo)
|
18 |
|
19 |
+
## Main Features
|
20 |
|
21 |
* **Products search** - Search across all your WooCommerce products
|
22 |
* **Search in** - Search in product **title**, **content**, **excerpt**, **categories**, **tags**, **ID** and **sku**. Or just in some of them
|
41 |
* Custom Product Tabs for WooCommerce plugin support
|
42 |
* Search Exclude plugin support
|
43 |
|
44 |
+
## Premium Features
|
45 |
|
46 |
Additional features available only in PRO plugin version.
|
47 |
|
68 |
|
69 |
[Features list](https://advanced-woo-search.com/features/?utm_source=wp-repo&utm_medium=listing&utm_campaign=aws-repo)
|
70 |
|
71 |
+
### More Plugins From Us
|
72 |
|
73 |
Here are some additional plugins that were made with love.
|
74 |
|
75 |
+
* [Advanced Woo Labels](https://wordpress.org/plugins/advanced-woo-labels/) - advanced labels for WooCommerce products
|
76 |
+
* [Share This Image](https://wordpress.org/plugins/share-this-image/) - image sharing blugin
|
77 |
+
|
78 |
+
### More usefull links
|
79 |
+
|
80 |
+
* Plugin [homepage](https://advanced-woo-search.com/?utm_source=wp-repo&utm_medium=listing&utm_campaign=aws-repo).
|
81 |
+
* Plugin [documentation](https://advanced-woo-search.com/guide/?utm_source=wp-repo&utm_medium=listing&utm_campaign=aws-repo).
|
82 |
+
* Follow Advanced Woo Search on [Twitter](https://twitter.com/WooSearch)
|
83 |
|
84 |
== Installation ==
|
85 |
|
89 |
|
90 |
== Frequently Asked Questions ==
|
91 |
|
92 |
+
Please visit our [Advanced Woo Search guide](https://advanced-woo-search.com/guide/?utm_source=wp-repo&utm_medium=listing&utm_campaign=aws-repo) before requesting any support.
|
93 |
+
|
94 |
+
= What is Advanced Woo Search? =
|
95 |
+
|
96 |
+
Advanced Woo Search as is advanced search plugin for WooCommerce shops. Its packed with many usefull features like:
|
97 |
+
|
98 |
+
* Search by product title, content, short description, SKU, tags, categories, ID, custom fields, attributes, taxonomies.
|
99 |
+
* Support for variable product and its variations.
|
100 |
+
* Multilingual plugins support.
|
101 |
+
* Search and display product tags, categories, custom taxonomies.
|
102 |
+
* and many more...
|
103 |
|
104 |
+
Please visit [features page](https://advanced-woo-search.com/features/?utm_source=wp-repo&utm_medium=listing&utm_campaign=aws-repo) for full list of available features.
|
105 |
+
|
106 |
+
= What are the requirements to use Advanced Woo Search? =
|
107 |
+
|
108 |
+
Advanced Woo Search is a plugin for self-hosted WordPress sites, or wordpress.com hosted sites that allow installation of third party plugins.
|
109 |
+
Plugin requires the following at minimum to work properly:
|
110 |
+
|
111 |
+
* WordPress 4.0 or greater
|
112 |
+
* WooCommerce 3.0.0 or greater
|
113 |
+
* PHP 5.5 or greater
|
114 |
+
* MySQL 5.6 or MariaDB 10.0 or greater
|
115 |
+
* Apache or Nginx server (recommended, but other options may work as well)
|
116 |
|
117 |
= How to insert search form? =
|
118 |
|
119 |
+
There are several ways you can add plugins search form on your site. The simplest way - is by turning on the **Seamless integration** option from the plugins settings page.
|
120 |
+
|
121 |
+
You can also use build-in widget to place plugins search form to your sidebar or any other available widget area.
|
122 |
|
123 |
Or just use shortcode for displaying form inside your post/page:
|
124 |
|
128 |
|
129 |
`echo do_shortcode( '[aws_search_form]' );`
|
130 |
|
131 |
+
Also please read the guide article about search form placement: [Adding Search Form.](https://advanced-woo-search.com/guide/search-form/?utm_source=wp-repo&utm_medium=listing&utm_campaign=aws-repo)
|
132 |
+
|
133 |
+
= What is the steps to make this plugin works on my site? =
|
134 |
+
|
135 |
+
In order to start using the plugin search form you need to take following steps:
|
136 |
+
|
137 |
+
* **Installation**. Install and activate the plugin. You can follow [these steps](https://advanced-woo-search.com/guide/installation/?utm_source=wp-repo&utm_medium=listing&utm_campaign=aws-repo) if you face any problems.
|
138 |
+
* **Index plugin table**. Click on the **Reindex table** button inside the plugin settings page and wait till the index process is finished.
|
139 |
+
* **Set plugin settings**. Leave it to default values or customize some of them.
|
140 |
+
* **Add search form**. There are several ways you can add a search form to your site. Use the **Seamless integration** option, shortcode, widget or custom php function. Read more in the guide article: [Adding Search Form](https://advanced-woo-search.com/guide/search-form/?utm_source=wp-repo&utm_medium=listing&utm_campaign=aws-repo).
|
141 |
+
* **Finish!** Now all is set and you can check your search form on the pages where you add it.
|
142 |
+
|
143 |
+
= Will this plugin work with my theme? =
|
144 |
+
|
145 |
+
Plugin search will works with most of the available WordPress themes. If you faced any problems using the plugin with your theme please [contact support](https://advanced-woo-search.com/contact/?utm_source=wp-repo&utm_medium=listing&utm_campaign=aws-repo).
|
146 |
+
|
147 |
+
= Is it integrated with my plugin? =
|
148 |
+
|
149 |
+
Advanced Woo Search works with many plugins out-of-the-box. For some of the most popular plugins we manually check proper work of integration features. It is the plugins like **Advanced Custom Fields**, **WPML**, **Polylang**, **Elementor**, **Divi Builder**, **BeRocket AJAX Product Filters**, **FacetWP** and many more.
|
150 |
+
|
151 |
+
Please read some guide integrations articles: [Integrations](https://advanced-woo-search.com/guide-category/integrations/?utm_source=wp-repo&utm_medium=listing&utm_campaign=aws-repo).
|
152 |
+
|
153 |
+
Note that if some of the plugin is not presented in the list it doesn't mean that it will not work with Advanced Woo Search. Many plugins will just work without any extra effort. But if you find any problem with your plugin and Advanced Woo Search please [contact support team](https://advanced-woo-search.com/contact/?utm_source=wp-repo&utm_medium=listing&utm_campaign=aws-repo).
|
154 |
+
|
155 |
= Is this plugin compatible with latest version of Woocommerce? =
|
156 |
|
157 |
Yep. This plugin is always compatible with the latest version of Woocommerce?
|
166 |
|
167 |
== Changelog ==
|
168 |
|
169 |
+
= 2.19 ( 2021-01-18 ) =
|
170 |
+
* Add - Support for WooCommerce Product Filter by WooBeWoo plugin
|
171 |
+
* Add - Integration for Martfury theme
|
172 |
+
* Add - Integration for ATUM Inventory Management for WooCommerce plugin ( Product level addon ). Hide not sellable products
|
173 |
+
* Update - Dynamic strings translation. Load translation from .po file for default strings if no dynamic translation specified
|
174 |
+
* Update - WCFM - Multivendor Marketplace plugin integration. Add vendors shop name and logo inside search results list
|
175 |
+
* Fix - GA tracking code
|
176 |
+
* Fix - Do not index and search for password protected products
|
177 |
+
* Fix - Hide product with visibility = catalog from the AJAX search results
|
178 |
+
* Dev - Update taxonomies search results response. Add parent term value.
|
179 |
+
* Dev - Add aws_search_page_custom_data filter
|
180 |
+
|
181 |
= 2.18 ( 2021-01-04 ) =
|
182 |
* Add - Support for Walker WordPress theme
|
183 |
* Update - Elementor plugin support. Add integration with Elementskit plugin header search
|