Table of Content

HomeBlogPlugin UsageHow to create a WooCommerce se...

How to create a WooCommerce search box form by category and attributes in WooCommerce product table plugin?

Search form is an essential part of an Ecommerce website. It can help customers to find their preferred products quickly and easily by filtering their requirements. In this plugin you can create WooCommerce search product form to search products by category, tags, attribute and other filtrable fields.

As you can see in the below picture, there is no search box in this product table by default:

product table without search form enable

So, in this Tutorial we want to show you how to create a search form by category and attributes of your products. This can help to improve your customer experience when purchasing things from your online store.

Create a WooCommerce Search form

To create a WooCommerce custom search form you have to go to the “Search box and Pagination” in the Woocommerce product table plugin. Then mark the checkbox next to “Enable” under “Search Enable/disable” Field:

Enable search form in woocommerce product table plugin

Now by scrolling down, you can see many different options which are available for managing the items for filtering the products in the table.

Enable WooCommerce search by category in the search form

Enabling customers to search the WooCommerce products by category is possible by marking the check box next to “Enable Product Categories”.

Enable search by category in woocomemrce product table plugin

Now, let’s go and see how these settings changes the appearance of our product table by clicking on “Update” and opening the table page:

That’s really amazing. The Search Form has been displayed at the top of the table. Now, customers can filter the products by their categories after clicking on next to the search box.

Search form after enable it in Woocommerce product table plugin

But this is not the end of story, your customers can also 

  • See the list of your categories and select one of them
  • Select how to order for display product in the table: Ascending or Descending
Sort products by title in woocommerce product table plugin

Enable WooCommerce search by attributes in the search form

As you may notice to the fields under “Category / Taxonomy” in the “Searchbox and Pagination” tab, all of the attributes related to your products have been listed there and you can choose any of them to be displayed in the search form:

Enable filter by custom taxonomy in product table plugin

For example, we selected “Enable Product Color” and our filter form turned out to be like below:

Filter products by product color in product table plugin

As it is shown in the above, a search box named product color has been added to the search form. This field enable customers to filter their products by selecting their favorite color.

Add attributes to the search forms

There is no need to be worried about adding attributes of products to the search fields. As soon as you add one attribute to the products, an extra field will be added to the “Search Box and pagination” tab, automatically.

For example, we decided to add “Material” as an attribute to our products.

We added it to the Attributes of products as you can see in the below picture:

add new attribute in woocommerce

We also added “Wool” and “Cotton” under “Material” attribute in the configure items as below:

add new item to attribute in woocommerce

When we came back to the “Search Box and Pagination” tab, we observed that the magic had happened and the “Material” had been added as a field. So, we enabled by clicking on the check mark to see how the search form in the table would be:

enable filter by material in woocommerce product table plugin

This is how our product table changed:

filter by material in woo product table plugin

Which fields could be search in product search form?

You can search product by title, attributes, taxonomies (like category and tags) and any custom taxonomies.

Can I sort filtered products using product search form?

Yes, you can sort product by ID, title, SKU and many other fields ascending or descending.

Like this tutorial?

Do you still have a problem?

If you still have unanswered questions or need custom work for your plugin, contact iThemeland Support.

Comments

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments