Rating: 5 stars
Its Cool…
]]>Rating: 5 stars
Great plugin !
Very easy to configure and use.
Allows searching on hidden attributes of products. Exactly what i was looking for.
Long life to this plugin.
]]>Rating: 5 stars
Very good, does the job.
]]>Rating: 4 stars
I use PolyLang for translation. With this plugin, search result shows product with all different languages.
]]>Rating: 5 stars
Great and straightforward plugin.
It does what I needed mostly so I just modified it a bit to exclude products where variation of the searched attribute is out of stock.
e.g. If I search for Medium in a shirt, the product must NOT show if medium of that product is out of stock.
function wsatt_brands_where( $where = '' ) {
global $wpdb;
$product_ids = get_in_stock_IDS();
if($product_ids != "")
$where .= " OR $wpdb->posts.ID IN (".get_in_stock_IDS().")";
return $where;
}
function get_in_stock_IDS() {
global $wpdb;
$parent_ids = array();
$wsatt_attributes = @get_option('wsatt_attributes');
if(is_array($wsatt_attributes) && count($wsatt_attributes)>0){
foreach($wsatt_attributes as $attribute){
$parent_id_objects = $wpdb->get_results("SELECT $wpdb->posts.ID
FROM $wpdb->posts
LEFT JOIN $wpdb->term_relationships ON($wpdb->posts.ID = $wpdb->term_relationships.object_id)
LEFT JOIN $wpdb->term_taxonomy ON($wpdb->term_relationships.term_taxonomy_id = $wpdb->term_taxonomy.term_taxonomy_id)
LEFT JOIN $wpdb->terms ON($wpdb->term_taxonomy.term_id = $wpdb->terms.term_id)
WHERE $wpdb->posts.post_type = 'product'
AND $wpdb->posts.post_status = 'publish'
AND $wpdb->term_taxonomy.taxonomy = '$attribute'
AND $wpdb->terms.name LIKE '%".esc_attr( $_GET['s'] )."%'");
if(count($parent_id_objects) == 0) continue;
foreach($parent_id_objects as $parent_id_object) {
$children = get_option("_transient_wc_product_children_".$parent_id_object->ID);
if(is_array($children) && count($children['all']) > 0) {
$instock = $wpdb->get_var("SELECT s.meta_value as stock from $wpdb->postmeta LEFT JOIN $wpdb->postmeta as s ON s.post_id = $wpdb->postmeta.post_id AND s.meta_key = '_stock' WHERE $wpdb->postmeta.post_id IN (".implode(",", $children['all']).") AND $wpdb->postmeta.meta_key like '%".$attribute."' AND $wpdb->postmeta.meta_value LIKE '%".esc_attr( $_GET['s'] )."%' AND s.meta_value > 0");
if($instock != NULL) {
//Child is matched based on query string and stock is NOT zero so we add that parent id to be displayed
$parent_ids[] = $parent_id_object->ID;
}
}else {
$parent_ids[] = $parent_id_object->ID;
}
}
}
return implode(",", $parent_ids);
}
}
]]>
Rating: 5 stars
Just what I needed, search by attribute (artist) since products have albums names.
]]>Rating: 5 stars
This plugin simply adds attributes to the WordPress search (or WooCommerce product search). It’s the only plugin to do this for free which I’ve found.
After activating, do not forget to adjust and enable searching by attributes in settings. (It would be even better if it redirected you to the settings when activated, as many plugins do.)
]]>Rating: 5 stars
I can’t say how much time I’ve spent looking for a plugin with similar functionality. It does exactly what it needs to do, I just press which attributes I want to include in the search engine and it works.
Good job!