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:
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:
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”.
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.
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
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:
For example, we selected “Enable Product Color” and our filter form turned out to be like below:
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:
We also added “Wool” and “Cotton” under “Material” attribute in the configure items as below:
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:
This is how our product table changed:
You can search product by title, attributes, taxonomies (like category and tags) and any custom taxonomies.
Yes, you can sort product by ID, title, SKU and many other fields ascending or descending.