How to enable search by SKU code in WooCommerce ?

How to enable search by SKU code in WooCommerce ?

Would you like your customers to be able to search for WooCommerce products by SKU code?

Since SKU codes uniquely identify your products, searching for them will help users quickly find exactly what they are looking for. The challenge is that SKU search is not possible in WooCommerce by default.

In this article, we’ll show you how to enable search by SKU product in WooCommerce.

Why enable SKU product search in WooCommerce ?

To run a successful WooCommerce store, it is important for your customers to easily find the products they want to buy. To make this simple, most ecommerce platforms use inventory retention units or inventory keeping units to uniquely identify each product.

If the customer knows the SKU of the product he wants to buy, why not let him search for SKU to find the right product in your store right away

The problem is that WooCommerce SKU is stored in custom fields, and they are not indexed or included in search results by default. As a result, searching for SKU will not help.

Let’s take a look at how to solve this problem by enabling users to search by SKU in WooCommerce using a product search plugin.

How to enable search by SKU product in WooCommerce ?

The first thing you need to do is install and activate the SearchWP plugin . You will need at least a Pro plan to access WooCommerce integration. For more details, see our step-by-step guide on how to install WordPress plugins .

SearchWP is the best custom search plugin for WordPress and is used by more than 30,000 websites. It allows you to customize the search algorithm, add live Ajax search for real-time results and more.

Upon activation, you need to visit the SearchWP “settings” page and go to the “support” tab to enter your license key. You can find it in the downloads area of your account on the SearchWP website.

How to enable search by SKU code in WooCommerce ?

Next, you need to install and activate the WooCommerce Integration extension for SearchWP.

You will find this in the downloads area of your account on the SearchWP website as well. You should install it as you would any WordPress add-on.

Now you are ready to customize the SearchWP search engine for SKUs indexing of your product.

Just go to the SearchWP “settings page and make sure that you are on the” engines “tab. Once there, you need to click on the “sources and settings”button.

SKU code in WooCommerce

This will bring up a pop-up window where you should make sure that the checkbox next to “products”is checked. This will allow SearchWP to index your WooCommerce products.

Also, if you also want to include WooCommerce Product Reviews in the search results, be sure to check the “comments” box as well. That’s because product reviews are already stored as comments in WooCommerce.

Once this is done, click the “Done” button to close the pop-up window and get ready to add a SKU search.

Now you need to scroll down to the “products”section. Note that by default, only the product title, content (description), link and snippet (short description) will be displayed in the extension.

You can extend the reach of SearchWP to SKU modules by clicking the “Add / Remove attributes”button. This will bring up a pop-up window where you can include specific custom fields and labels in your searches.

You will need to type” SKU ” in the custom fields field and choose the _sku option from the drop-down menu. This will add SKU modules to WooCommerce search result pages.

Now you can click on the “Done” button.

Note that there is now a new section called “Custom Fields” with _sku and the field below it.

The relevance slider will be set all the way to the left, which means that SKU search results will be given the lowest priority in the search results.

Since SKUs is an important way to find your products, you should move the _sku slider to the right, as you can see above.

When you’re done, click the “save engines” button at the top of the screen to save your settings.

The stage of indexing products to enable searching by the SKU code ?

SearchWP will then start rebuilding the search index in the background. It may take a few minutes to complete, but after that, you will be able to search your WooCommerce store by product SKU code.

SearchWP will automatically use any search forms in your online store, so there is no need to take

any additional steps if you already have them on your site.

Now you can go to the WooCommerce store to try the search feature.

In our demo store, the long-sleeved T-shirt has a SKU “woo-long-sleeve-tee”. When we search for this SKU, the correct product is displayed.

We hope that this tutorial helped you learn how to enable product search by SKU code in WooCommerce.

 

 

Previous post
ElementsKit gives more flexibility to the Elementor
Next post
The 5 Best WordPress Slider plugins(performance + quality)