5 Reasons Why You Should Add SKUs to Your Online Store

If you have a WooCommerce store, then you’ve almost certainly come across SKUs. They’re that number/letter combination you stick in the product data section of your product page.

Edit SKU in WooCommerce

You’ve probably also heard about the wide variety of reasons for why you should or shouldn’t use them in your store. All of this can get pretty confusing, so in this article, we’ve broken it down for you. Let’s start with the basics.

What is a Product SKU?

SKU stands for stock-keeping unit. Simply put, it’s a combination of letters and numbers that reflect the characteristics of that product.

The SKU of a product will either be created by the manufacturer (if you’re re-selling) or by you (if you’ve created the product). A product may change its name over time, but it’s SKU should remain constant.

Here’s an example: ICWP-PL-WSSV

This SKU describes the IconicWP plugin WooCommerce Show Single Variations.

5 Reasons To Use Product SKUs

An SKU is often used for inventory tracking, but the little-known advantages of using SKUs in your store are vast and varied. So, we’ve narrowed it down to our favourite five. Plus, if you stick with us, we have a little bonus just for you in the latter part of this article.

Reason 1: They increase your visibility in Google

We all know that getting your products to show up in Google search results is critical to increasing sales. You can increase the likelihood of your product appearing in more search results by adding SKUs to your online store.

Getting your products to show up in Google search results is critical to increasing sales...Click To Tweet

When potential customers search for a specific product on Google (especially if you’re a reseller), all of these same products will be lumped together according to certain metadata. Within this, is the SKU code. If your product SKU matches up with the other products in the list, it’s more likely to appear in the result.

Product SKU in Google search results

Our top tip: Work on acquiring good product reviews to push your product listing up above the other stores selling the same product.

Reason 2: It’s quicker for repeat customers

If you have a lot of products in your store then it may well be pretty difficult for a customer to find a product they purchased previously, and want to buy again.

They could type in the search bar, the name or a vague description of the product. This may take time though and be frustrating to get to the end result. By providing an SKU number in their order email, they can simply copy and paste it into the search bar and find the product with ease.

This is also useful if you change the name or description of your product in the future. Your SKU will always remain the same, so the product can be easily found.

Reason 3: It speeds up support

If you’ve ever dealt with returns, enquiries, or disputes over your products then you’ll know how long these discussions can take if you don’t have the right information.

By requesting the SKU of a product (which should be found on the product page or order email), you can easily find all the information you need on that specific product.

Our top tip: To make the most out of SKUs, include custom SKUs for each product variation (size, colour, weight etc) so that you can find the exact product every time.

Reason 4: You’ll need them for reselling

If you’re planning on selling your products wholesale, or on other stores, then you’ll need SKUs to make your life easier.

Many larger stores use SKUs to tell apart their huge stocklist. If your products are amongst them, then you will need to provide detailed, unique SKUs so they don’t get lost in a sea of other white t-shirts, or blue pillowcases.

As a bonus, say a vendor needs to look up some extra information on your product for their site. They can simply paste the SKU into your search bar and find the information they need. This will save you from answering endless emails full of vendor queries.

Our top tip: Even if you aren’t planning on reselling your products yet, it’s a good idea to put good SKUs in place now. You’ll save yourself a lot of time later.

Reason 5: Keep your inventory organised

Because SKUs are used to track product traits and variations, they can be used to keep an accurate account of your inventory overall.

By using SKUs in this way, you can keep an eye on products with similar names and variations. Making sure that each product never goes out of stock – especially if it’s popular.

The added bonus of tracking your SKUs instead of product names is that it saves you time. By ordering, searching and tracking through SKUs, you can make light work of stock management.

How to Add SKUs to WooCommerce Search

We’ve mentioned searching for SKUs a few times throughout this article. However, the default product search is quite basic in WooCommerce. Unless you’re using a plugin like SearchWP to enhance the product search, your customers may not be finding the products they want.

One simple tweak you can make is to add the product SKU as a field that’s included when customers use your search bar.

One simple tweak lets you search WooCommerce products by SKUClick To Tweet

I’ve prepared a sample plugin for you to enable this. Once downloaded, simply install the zip as you would a normal plugin.

Your Free Plugin Download

Simply enter your name and email to receive a simple plugin to enable searching products by SKU.

You will receive occasional emails from Iconic, but you're more than welcome to unsubscribe at any time. I won't spam or share your details with anyone, ever.

The Cons of Adding SKUs to WooCommerce Search

Although there are clear benefits to adding SKUs to WooCommerce search, there is also a pitfall.

If your site has a lot of product metadata (product data, custom fields you’ve created, etc), then your product search could become slow.

Products are primarily stored in two database tables in your WooCommerce site; ‘posts’ and ‘postmeta’. This is also where Posts, Pages, and any other post types are stored. As you can imagine, these tables can contain a lot of data. So adding more to it can slow it down.

To combat this, a system such as ElasticPress could be the solution.

ElasticPress will create its own optimised tables for searching and indexing, which avoid the unnecessary rows of the ‘posts’ and ‘postmeta’ tables. Problem solved.

Search For Individual Variations by SKU

If your store offers variable products with many variations, then you might want to take a look at our WooCommerce Show Single Variations plugin.

This is a very versatile plugin which will allow you to reveal individual product variations in the shop, filtered, and search result pages of your WooCommerce store.

Start your 14-day free trial

There's nothing to lose. You can start your free trial right now and instantly put your product variations in front of your customers.

Get Free Trial

Once installed, you can choose specific variations to appear in your search results. Now when customers search for full or partial SKUs on their store, they are presented with all product options which can then be filtered further. This is a much better experience for them than seeing one parent variable product with a generic image.

The customer can then add these products to their cart right from the search results page.

29 Comments

  1. stacy says:

    Hi James,

    Thank you for the informative posted. I want to be able to search for the product without having to add the dash (-) or the spacing. For example, my product sku 25-467 GCA and i want to be able to just type in the search box: 25467GCA and the product appears. Any help would be appreciated.

    Stacy

  2. Wesley van Wijngaarden says:

    Hi,
    Great script. But in backend when searching for a product gives one SKU code way too much results. 1 unique code give at least 19 results with all the same code.

    • James Kemp says:

      Hey Wesley, can you try changing the first if statement in each function to: if( is_admin() || ! is_search() || ! is_woocommerce() ) {

      It shouldn’t really run on the backend at all!

      • Wesley van Wijngaarden says:

        Hi James,
        Thx for your quick reply. And most important thx for the solution. Works well now.

  3. Humberto Albarrán says:

    My friend, your post is the solution I was looking for. But, I dont get where this code is going to be written.
    Do I have to edit woocommerce-core-functions.php? Thanks in advance.

  4. Punkie says:

    Thanks for your great code snippet! I will include it in all my woo projects now. You rock!

  5. Dave Schroeder says:

    This seems to break the Recently Viewed Products widget on search pages. It only shows the last product shown for all of them. Anyone have a fix for this?

  6. Mansoor Firoozeh says:

    Hi Dear James, tnx for sharing , How we can use it in the back-end? for example we want to search a meta_value (on the meta_key) of a product in the “Woocommerce Orders page” at the back-end.
    Please help me to search through a meta_key to check the meta_vaule.
    woocommerce function to search is : “woocommerce_shop_order_search_fields”

    please help me to do this.
    so much appreciated.
    Mansoor

  7. Abhishek Agrawal says:

    Hey James! nice piece of code.

    Can you pls suggest how to resolve the Recently Viewed section wherein last product is repeating several times after adding the snippet. Thanks much 🙂

  8. Fei says:

    Hi,
    I copied the code you provided in a code snippet but after activated it, it doesn’t produce the wanted results..
    Can you check my website?
    https://amavisse-wholesale….

    PS: I’m using wordpress 4.9 and woocommerce 3.2.5

  9. Sarah says:

    Hi James!

    I’ve tried adding the code but it doesn’t seem to be working. Could you check our sites to see if it’s working for you??

    http://www.allthingsa2z.com or http://www.vikingwholesalex.com

  10. Björn says:

    James, you really made my day. Big thank you for sharing your code.
    After searching for hours and being guided to the wrong directions all the time (SEO or use of plugin) I was about to give up. Then I had the idea to lookup SKU search and found your blog. Originally I wanted to improve my Woocommerce search to be able to lookup meta tags, but wasn’t able to find anything working.
    After testing your code I can confirm it is working and doing its job just excellent!
    If I want to add meta tag search now, am I right I need to add a hook to line 44? Would you mind guiding me on that one, because neither I do know the exact hook, nor am I sure how to edit your snippet the correct way.
    Highly appreciated, best regards,

    -Björn

  11. Damir says:

    Hi James,

    Code works great, thank you.
    I have 3 questions:

    1. how to add another meta key to the query, to search another meta besides SKU
    2. Then is it possible to add that functionality to backend, SKU search already works out of box but need other meta
    3. When I use woocommerce search widget it takes me directly to product page not the search results page

    Thank you very much.

    • James Kemp says:

      Hey,

      1. Just add another one of these OR (iconic_post_meta.meta_key = '_sku' AND iconic_post_meta.meta_value LIKE $1) after the first one.
      2. Yep, although it’s out of scope for this tutorial!
      3. It does this when only one product is found for the search.

      Hope this helps!

      • Björn says:

        Hey James,

        I tried this before with ‘tagged_as / .tagged_as / _tagged_as / tag / _tag’, but none of them seem to work.
        Am looking forward to add this search to shop search only, not admin frontend.
        Would be great if you could help.

        Thank you very much and best regards,

        -Björn

        • James Kemp says:

          Hey, very late reply, but wanted to follow up. Tags are not meta, they are saved slightly differently (taxonomy) so this code won’t work for tags (or categories).

  12. dummy says:

    Hi Sir,

    I want to product search by multiple sku in frontend please help me to solve this ASAP.

  13. Jan says:

    Hey James,
    many thanks for posting this.
    Just a short question: I understand this works with the standard product search widget. As I’m trying to get this working for the standard general wordpress search I had to remove the ! is_woocommerce statement to show me the results. Then it works for SKUs (1 result). Just a normal text search gives me way too many results again. Any idea?
    Have a nice day and keep it up!

  14. Hanzla says:

    hey man, you rocks! it’s working in my woocomerce search bar but in my WordPress search query? how can I make it search through WordPress search press query also?

    • James Kemp says:

      Hey, make sure your search pages are using the right query parameters. It should have both s=something and post_type=product in the search URL.

Leave a Reply

Your email address will not be published. Required fields are marked *