Product inventory – Page 2

How to Create Shared WooCommerce Attribute Stock

In this lesson, I would like to discuss how you can set up the WooCommerce attribute stock on your store. For example, you have multiple products with the color “blue” on your WooCommerce store. How to make all those products have the same stock?

Of course, there are multiple ways of achieving that.

For example, you can use the same SKU for these products with my Duplicate SKU Stock Sync plugin (don’t worry that by default, WooCommerce doesn’t allow duplicate SKUs, because my plugin allows you to use that). But in this particular tutorial, we will talk about using another way, specifically, the attribute stock.

How to Grey-Out Out of Stock Variations

In this tutorial, I will show you an easy way how you can grey-out out of stock variations in WooCommerce. It is actually much easier than you might think.

However, let me show an example of what we are going to achieve here:

WooCommerce grey-out out of stock variations
Two variations are out of stock here, as you can understand.

By the way, if you’re using my Simple Variation Swatches for WooCommerce plugin, then you don’t need to code anything, and this feature is already included by default for variations that are out of stock. For example, the same greyed-out radio button-type variations will look like:

grey-out radio button-type variations

Color swatches will look like this:

out of stock color variations in WooCommerce

How to Hide Out of Stock Products

In this step-by-step guide, I would like to show you how you can hide out of stock products and variations on your WooCommerce store (or show them, if they are hidden at this moment).

By default, when a product is out of stock it is still going to be displayed on your shop and archive pages. Instead of the “Add to cart” button, there is going to be displayed the “Read more” button.

Out of stock items are displayed in WooCommerce by default
The first two products on this screenshot are most likely out of stock.

Back in Stock Notifications for a WooCommerce Store

In this step-by-step tutorial I am going to show you how to add a “notify me when back in stock” kind of form to your WooCommerce product pages which will allow you to collect emails from customers and when a product is actually back in stock to automatically send notifications to everyone who was previously subscribed.

This feature is also called a waitlist. Below is an example how it works:

Example of a WooCommerce back in stock notifications form

Allow Duplicate SKU

By default it is not allowed to use duplicate SKU in WooCommerce, you might get an error like this if you try to save a product with a SKU which already exists:

Invalid or duplicate SKU error – how to allow duplicate SKU in WooCommerce

But there are cases where duplicate SKU is necessary! So what are the options?

Multiple Products from the Same Stock

In this tutorial I will show you how you make both Stock Quantity and Stock Status to be automatically shared between different products on your WooCommerce store. But if you come to this tutorial looking for a product inventory synchronisation tool between different WooCommerce stores, then please take a look at my plugin.

Also I am going to show you an example with variations of the same product.

The whole idea is pretty simple and can be breaked down into two steps:

  1. Creating a custom function connected either to the woocommerce_product_set_stock or to the woocommerce_variation_set_stock action hook if we talking about variations.
  2. Obtaining the connected products and to setting the same stock values for them.

Easy peasy.

Create a Custom Stock Status

In this tutorial I am going to show you how you can create a custom stock status for your WooCommerce products. There are a bunch of plugins over there, which allow you to implement similar functionality in one way or another, but why to use a plugin when can do exactly the same with a couple of lines of code in your theme. But of course, it depends.

As an example here we will create a “Contact us” custom product stock status, which will be kind of similar to “Out of stock” – customers won’t be able to add a product to a cart, but there is going to be a link to a contact page instead of an “Add to cart” button.

This custom product stock status will work with both standard WooCommerce features (like product filters) and third party plugins (my Duplicate SKU stock sync plugin for example).