GET FREE VERSION GET THE PRO VERSION

WC Vendors

Learn about advanced integration with WC Vendors – WooCommerce Multi Vendor Plugin.

In this article

Overview

Following article describes features available only with PRO plugin version.

The WC Vendors plugin allows you to create a multi-vendor marketplace and earn commissions from every sale. It includes many built-in features, as well as various addons to further extend the plugin's functionality.

We are excited to share that Advanced Woo Search PRO has built-in integration with the WC Vendors plugin. This integration comes with many great features, all of which we will describe in detail below.

Search for Vendors' Products

First of all, you can search for any product sold by shop vendors.

It's possible to display a vendor badge next to each product sold by a vendor. Additionally, you can create specific filters for search results based on various WC Vendors parameters.

Vendor products search results

Vendor products search results

Show Store Name Near Product Search Result

You can show a special badge for each product in the search results that is sold by a vendor. The badge will display vendor information such as the vendor's name, icon, and store link.

Vendor badge

Vendor badge

By default, the badge will show the icon, name, and link.

From the plugin settings page, you can control the appearance of this badge. For example, you can display a short version instead ( Sold by: {vendor name} ) or even hide it completely.

Vendor badge, short version

Vendor badge, short version

You can control this from the plugin settings page -> Search Results tab -> Show WC Vendors vendor info? option. Choose the value that best suits your needs.

'Show WC Vendors vendor info?' option

'Show WC Vendors vendor info?' option

Search for Products via Store Name

Another great feature is the ability to search for vendor products by the vendor's store name.

Simply enter the vendor's store name, and the search will display all the products sold by that vendor.

Search for products by vendor store name

Search for products by vendor store name

Search for Vendor Stores

Advanced Woo Search PRO includes an option to search for any shop user and display them in the search results with a link to the user’s archive page.

The WC Vendors integration extends this feature, allowing you to search for vendor stores by store name and display store information such as name, icon, rating, review count, and store link.

Search and display WC Vendors stores

Search and display WC Vendors stores

Additionally, you can set user search filters based on various parameters.

To enable vendor store search, follow these steps:

1. Open the Advanced Woo Search settings page -> Search Results tab.

2. Find the Archive pages option.

3. Enable the Users field for this option and click the gear icon.

'Archive pages' option

'Archive pages' option


4. On the next page, you'll find a list of all available user roles. Turn on the roles you want to be searchable. For WC Vendors, enable the Vendor user role.

Vendor user role field

Vendor user role field

5. You’re all set! Now, check your search form—you should be able to search for vendor stores by name, login, or store name.

Search Inside Vendor Stores

Each WC Vendors plugin vendor has their own store page, complete with vendor information and a list of available products.

WC Vendors plugin vendor store page

WC Vendors plugin vendor store page

One of the features of the integration with Advanced Woo Search PRO is the option to limit searches inside vendor stores to only that vendor's products.

This option is enabled by default, so if you have a search form inside a vendor's store, it will only search for that vendor's products.

If you want to disable this option, simply open the plugin settings page -> Search Results tab and find the Limit results inside the vendor's store? option. Turn it off to allow search forms to display all available products.

'Limit results inside the vendor's store?' option

'Limit results inside the vendor's store?' option

How to Add a Search Form Inside Vendor Store Page?

There are several ways to do this:

1. If the vendor store page already has a default search form, you can replace it with the plugin search form by enabling the Seamless Integration option from the plugin settings page.

Seamless Integration option

Seamless Integration option

2. If the vendor store page has a widget area, use the built-in search form widget and place it in the desired widget area.

Plugin widget to display search form.

Plugin widget to display search form.

3. If you’re using a page builder to customize the vendor store page, use the shortcode or built-in widget to add the plugin search form.

4. If none of the above methods work, try using the following code snippet to add the plugin search form below the store header on the WC Vendors store page:

add_action( 'wcvendors_after_vendor_store_header', 'aws_wcvendors_after_vendor_store_header' );
function aws_wcvendors_after_vendor_store_header() {
    aws_get_search_form();
}

Filters for Search Form

With Advanced Woo Search PRO, you can create special search form filters that allow users to filter search results by various parameters.

When used with WC Vendors, you can create even more powerful functionality. For example, you can add filters to show only products from a specific vendor.

The main tab will show all available products, while additional filter dropdowns allow users to narrow the results to products from a particular vendor.

[screen - Search form with filters]

Search form with filters

Search form with filters

There are numerous ways to configure these filtering buttons. Learn more about search result filters and filters specific to the WC Vendors plugin.

Product Search Results Filters

The integration with WC Vendors adds many additional search result filters specific to the plugin. These filters allow you to filter search results based on specific vendor parameters, such as store rating or sales number.

Below, we’ll cover all the additional filters:

Filter: Is Product Sold by Any Vendor

Hide/show products sold by any WC Vendors vendor.

To set such a filter open the plugin settings page -> Search Results tab and find Filter Results section. Click on Filter products search results button and then choose WC Vendors: Is product sold by any vendor rule. Set compare operator and value ( true or false ) depending on your needs.

'WC Vendors: Is product sold by any vendor' products results filter

'WC Vendors: Is product sold by any vendor' products results filter

Filter: Product Is Sold by X Vendor

Hide/show products sold by specific WC Vendors vendors.

To set such a filter open the plugin settings page -> Search Results tab and find Filter Results section. Click on Filter products search results button and then choose WC Vendors: Product sold by rule. Also set compare operator and choose WC Vendors vendors from the list of available vendors.

'WC Vendors: Product sold by' products results filter

'WC Vendors: Product sold by' products results filter

Filter: Sold by Verified Vendor

Hide/show products sold by verified WC Vendors vendors.

To set such a filter open the plugin settings page -> Search Results tab and find Filter Results section. Click on Filter products search results button and then choose WC Vendors: Sold by verified vendor rule. Set compare operator and value ( true or false ) depending on your needs.

'WC Vendors: Sold by verified vendor' products results filter

'WC Vendors: Sold by verified vendor' products results filter

Filter: Sold by Trusted Vendor

Hide/show products sold by trusted WC Vendors vendors.

To set such a filter open the plugin settings page -> Search Results tab and find Filter Results section. Click on Filter products search results button and then choose WC Vendors: Sold by trusted vendor rule. Set compare operator and value ( true or false ) depending on your needs.

'WC Vendors: Sold by trusted vendor' products results filter

'WC Vendors: Sold by trusted vendor' products results filter

Filter: Average Store Rating

Hide/show products based on the average WC Vendors store rating.

To set such a filter open the plugin settings page -> Search Results tab and find Filter Results section. Click on Filter products search results button and then choose WC Vendors: Store rating rule. Choose the needed compare operator ( equal to, not equal to, greater or equal to, less or equal to ) and value of average rating to compare with.

'WC Vendors: Store rating' products results filter

'WC Vendors: Store rating' products results filter

Filter: Store Reviews Count

Hide/show products based on the number of WC Vendors store reviews.

To set such a filter open the plugin settings page -> Search Results tab and find Filter Results section. Click on Filter products search results button and then choose WC Vendors: Store reviews count rule. Choose the needed compare operator ( equal to, not equal to, greater or equal to, less or equal to ) and the number of reviews to compare with.

'WC Vendors: Store reviews count' products results filter

'WC Vendors: Store reviews count' products results filter

User Search Results Filters

The WC Vendors integration also adds several additional user search result filters. These filters allow you to search for vendor stores and filter results based on various parameters, such as rating, reviews, or the number of products.

Below, we’ll go over them in detail:

Filter: User Is Vendor

Hide/show users that are WC Vendors vendors.

To set such a filter open the plugin settings page -> Search Results tab and find Filter Results section. Click on Filter users archive pages search results button and then choose WC Vendors: User is vendor rule. Set compare operator and value ( true or false ) depending on your needs.

'WC Vendors: User is vendor' search results filter

'WC Vendors: User is vendor' search results filter

Filter: Is Verified

Hide/show users who are verified WC Vendors vendors.

To set such a filter open the plugin settings page -> Search Results tab and find Filter Results section. Click on Filter users archive pages search results button and then choose WC Vendors: User is verified vendor rule. Set compare operator and value ( true or false ) depending on your needs.

'WC Vendors: User is verified vendor' search results filter

'WC Vendors: User is verified vendor' search results filter

Filter: Is Trusted

Hide/show users who are trusted WC Vendors vendors.

To set such a filter open the plugin settings page -> Search Results tab and find Filter Results section. Click on Filter users archive pages search results button and then choose WC Vendors: User is trusted vendor rule. Set compare operator and value ( true or false ) depending on your needs.

'WC Vendors: User is trusted vendor' search results filter

'WC Vendors: User is trusted vendor' search results filter

Filter: Store Rating

Hide/show users in search results based on their WC Vendors store rating.

To set such a filter open the plugin settings page -> Search Results tab and find Filter Results section. Click on Filter users archive pages search results button and then choose WC Vendors: Store rating rule. Choose the needed compare operator ( equal to, not equal to, greater or equal to, less or equal to ) and average rating to compare with.

'WC Vendors: Store rating' search results filter

'WC Vendors: Store rating' search results filter

Filter: Store Reviews Count

Hide/show users in search results based on the number of WC Vendors store reviews.

To set such a filter open the plugin settings page -> Search Results tab and find Filter Results section. Click on Filter users archive pages search results button and then choose WC Vendors: Store reviews count rule. Choose the needed compare operator ( equal to, not equal to, greater or equal to, less or equal to ) and average rating to compare with.

'WC Vendors: Store reviews count' search results filter

'WC Vendors: Store reviews count' search results filter

Filter: Store Products Number

Hide/show users based on the number of products in their WC Vendors store.

To set such a filter open the plugin settings page -> Search Results tab and find Filter Results section. Click on Filter users archive pages search results button and then choose WC Vendors: Store products number rule. Choose the needed compare operator ( equal to, not equal to, greater or equal to, less or equal to ) and average rating to compare with.

'WC Vendors: Store products number' search results filter

'WC Vendors: Store products number' search results filter

Filter: Store Sales

Hide/show users in search results based on the number of sales for their WC Vendors store.

To set such a filter open the plugin settings page -> Search Results tab and find Filter Results section. Click on Filter users archive pages search results button and then choose WC Vendors: Store total sales rule. Choose the needed compare operator ( equal to, not equal to, greater or equal to, less or equal to ) and average rating to compare with.

'WC Vendors: Store total sales' search results filter

'WC Vendors: Store total sales' search results filter

Universal Search Results Filters

Universal search result filters can be applied to all search result types (products, users, taxonomies).

These filters include rules based on the current shop user and current shop page.

Filter: Current User Is Vendor

Hide/show results if the current user is a WC Vendors vendor.

To set such a filter open the plugin settings page -> Search Results tab and find Filter Results section. Choose what search results type you want to create filter for ( products, users, taxonomies ) and then create new rule WC Vendors: Current user is vendor. Set compare operator and value ( true or false ) depending on your needs.

'WC Vendors: Current user is vendor' search results filter

'WC Vendors: Current user is vendor' search results filter

Filter: Current Page Is Vendor Store

Hide/show results if the current page is a WC Vendors store page.

To set such a filter open the plugin settings page -> Search Results tab and find Filter Results section. Choose what search results type you want to create filter for ( products, users, taxonomies ) and then create new rule WC Vendors: Current page is vendor store. Set compare operator and value ( true or false ) depending on your needs.

'WC Vendors: Current page is vendor store' search results filter

'WC Vendors: Current page is vendor store' search results filter

FAQ

Q: Can I show the vendor description along with the vendor name in vendor search results?

Yes, it is possible. You can do this by using the following code snippet:

add_filter( 'aws_search_users_results', 'my_aws_search_users_results', 10, 3 );
function my_aws_search_users_results( $result_array, $roles, $search_string ) {
    if ( array_search( 'vendor', $roles ) !== false ) {
        foreach( $result_array as $vendor_id => $user_params ) {
            $user_meta = get_userdata( $vendor_id );
            $user_roles = $user_meta->

roles;
            if ( in_array( 'vendor', $user_roles )  ) {
                $description = $vendor_id ? get_user_meta( $vendor_id, 'pv_shop_description', true ) : '';
                if ( $description ) {
                    $result_array[$vendor_id][0]['excerpt'] .= '<br>' . $description;
                }
            }
        }
    }
    return $result_array;
}

Q: Can I search for vendor stores using additional parameters, such as store description or seller info fields?

Yes, you can do this by using the following code snippet:

add_filter( 'aws_users_search_query', 'my_aws_users_search_query', 10, 3 );
function my_aws_users_search_query( $sql, $roles, $search_query ) {
    $sql = str_replace( "'last_name'", "'last_name', 'pv_shop_name', 'pv_shop_description', 'pv_seller_info'", $sql );
    return $sql;
}