What is a WooCommerce variable product? This article will provide you everything you need to know about variable products, variations, attributes, and extra product options. We’ll even look at extending them with a WooCommerce variable product plugin. Enjoy!
The complete guide to WooCommerce variable products
Here’s an overview of what we’re covering in this article. Just click on the heading to jump straight to the section.
Let’s begin at the beginning:
What is a WooCommerce variable product?
WooCommerce has several product ‘types’. These include:
- Simple: this is the basic product type and, for many people, it’s all they will ever need. Simple products are usually physical objects, i.e. you’ll need to ship them, and they don’t have any options. A typical example would be a book.
- Grouped: this is a more complex product type, which combines related products into a single ‘grouped’ product.
- Virtual: a virtual product doesn’t need shipping. It could be something abstract, like a service.
- Downloadable: again, not a physical product. A typical example would be a plugin.
- Variable: this is the one we’re interested in. A variable product has different variations or versions that a customer can choose from. A typical example would be a shirt which is available in different sizes and different colours. The customer doesn’t just choose ‘Shirt’; they choose the medium shirt in red.
So a variable product is a product type in WooCommerce that allows the product to be divided up into different variations.
What is the difference between a variable product and a variation?
So having cleared up what a variable product is, we now need to understand what a variation is. And to understand what a variation is, we need to know what an attribute is.
What is a WooCommerce attribute?
In order to fully understand what a WooCommerce variable product is, we need to understand what an attribute is.
Attributes are ways of grouping products. You can create an attribute like ‘Size’ then configure terms under the attribute, like ‘Small’, ‘Medium’, ‘Large’.
In the example of the shirt above, we might have our product, the Shirt, which is available in the following sizes: Small, Medium, Large. In this case, the attribute is ‘Size’.
Continuing with our shirt example, we have variations according to the Size attribute. We create our product, Shirt, then assign it the Size attribute. Finally, we create variations for the product according to the attribute terms. These are our variations: Small, Medium, Large.
It starts to get more complex if we have more than one attribute assigned to a product. Continuing the shirt example, we could assign two attributes – Size and Colour. If our shirt is available in all sizes and all colours, we could end up with a lot of combinations, e.g.:
- Small, Red
- Small, Blue
- Small, Green
- Medium, Red
- Medium, Blue
- Medium, Green
- Large, Red
- Large, Blue
- Large, Green
All these combinations are separate variations of the product. Yikes.
What’s so special about variations?
Although it can potentially feel confusing to have so many combinations of your product, it’s really useful to be able to manage these as variations. With a simple product that doesn’t have any variations, you can manage stock, price, SKU, etc at the product level.
With variations, you can manage all this data for each individual variation. So you can track inventory for your small, red shirts separately from your large, green shirts. You can set product prices, set different shipping classes, manage sale prices – all independently. You can even set different product images for each variation.
In total, you can manage the following data for each variation of your product:
- Product image
- Manage stock – toggle this on or off to manage stock for the individual variation
- Regular price
- Sale price
- Stock status
- Stock quantity
- Allow backorders
- Shipping class
- Tax class
What is the difference between variations and attributes?
Hopefully, I’ve answered this question above. But just to clarify: an attribute is a way of defining information about a product – like Size; variations are the specific instances of an attribute – like Small, Medium, Large.
You can think about it another way. Take a look at the screenshot of a product page below.
The attribute is the label for the dropdown field: i.e. ‘Size’; the variations are the options inside the dropdown field: i.e. ‘Small’, ‘Medium’, ‘Large’.
How to set up a WooCommerce variable product
Now, armed with all this knowledge, we can look at how to create a WooCommerce variable product.
Step 1: Create your attribute and its terms
We saw above that for each variable product, we must have at least one attribute. So before creating your product, you need to create your attributes.
Create the attribute
- Go to WooCommerce > Attributes
- In the ‘Add new attribute’ form on the left, just enter the name of your attribute in the ‘Name’ field (e.g. ‘Size’)
- Click ‘Add attribute’
Your attribute has been created and you can see it listed in the table on the right.
Add the attribute terms
- Click ‘Configure terms’ in the ‘Terms’ column of your attribute
- In the ‘Add new…’ form on the left, enter the name of your first term (e.g. ‘Small’)
- Click ‘Add new…’
- Repeat for each term
When you’ve finished, your table of terms will look something like this:
Step 2: Create a WooCommerce variable product
With your attributes ready, you can create your variable product.
Create a new product
- Go to Products > Add New
- Enter your product title and any other information you like
- Now you can set the ‘Product Type’ field in the ‘Product Data’ tab to ‘Variable product’
For more detail on adding products in WooCommerce, check out this tutorial.
Step 3: Add your attributes to your variable product
Now it’s time to define which attribute(s) you want to use in your variable product.
Add an attribute
- Click the ‘Attributes’ tab in the ‘Product Data’ section
- In the ‘Custom product attribute’ dropdown, select the name of your attribute
- Click ‘Add’
Define the attribute terms to use
- Assuming you want to use all the terms you’ve defined for your attribute, click the ‘Select all’ button
- Select the ‘Use for variations’ option
- Click ‘Save attributes’
Step 4: Add your variations
Now your attributes have been added to your product, you can define your variations. In this example, we’ll add variations for all our attributes.
- Click the ‘Variations’ tab in the ‘Product Data’ section
- Select ‘Create variations from all attributes’
- Click ‘Go’
WooCommerce will add a product variation for each attribute.
You can see each variation listed.
Step 5: Editing your variations
You can edit variations individually or in bulk.
Edit individual variations
To edit an individual variation:
- Click on the variation to expand its panel
- Edit the required parameters
- Click ‘Save changes’
You can see from the screenshot above all the parameters that you can edit for each variation.
Bulk editing variations
It’s highly likely that you’ll want to edit certain, if not all, parameters for your variations in one hit. For example, the price for each variation might not vary so you want to be able to set the price for all variations in one action.
To edit all variations in one go:
- Click the ‘Add variation’ select field
- You’ll see a long list of possible actions – select the one you want
- Click ‘Go’
Depending on the action you’ve chosen, you’ll get an additional pop-up box to enter a value.
Product variation images
You can upload an image for each variation. When the user selects that variation, the main product image will switch to the variation image.
To upload a product variation image:
- Click the blue image icon
- Select the image
It’s pretty simple.
(By the way, if you want to display swatches for variations, you can check this guide from RexTheme).
Step 6: Set default variation
Finally, you might like to set a default variation for the customer when they arrive on the product page.
- In the ‘Default Form Values’, set a default variation for each attribute
- Click ‘Save changes’
A WooCommerce variable product on the front end
Let’s take a look at the example we’ve used throughout this article: the shirt with colour and size attributes.
Once we’ve created all our variations, we can view the product on the front end. Note that there are two dropdown fields, one for each attribute.
You can see some other information too:
- Price range: in this example, I’ve set some shirts to be more expensive than others. WooCommerce therefore displays a price range under the title showing the customer the minimum and maximum they can expect to pay for the product
- Stock information: under the product attribute fields you can see information about how many items for the selected variation are in stock
- Add to cart button: the add to cart button will be disabled until a variation is selected
How to extend WooCommerce with a variable product plugin
Now, we’ve covered the standard WooCommerce settings for variable products in depth. But you might find that these still don’t meet your exact requirements.
Let’s look at two ways to make your variable product even more powerful and feature rich by using a WooCommerce variable product plugin.
Adding extra fields to WooCommerce variable products
A popular requirement is to be able to customise products in WooCommerce. This is a step further than having product variations in that it allows customers to create their own personalised versions of products.
This is often achieved by adding input fields to product pages – e.g. you can let a customer define text to be engraved on your product by letting them fill in a text field. The text is captured as part of the product and you, as store owner, receive it as part of the order. You can find out more about the ins and outs of customising products in WooCommerce here.
You can add customisable elements to product variations using the WooCommerce Product Add Ons Ultimate plugin.
WooCommerce Product Add Ons Ultimate – a WooCommerce product add ons plugin
WooCommerce Product Add Ons Ultimate allows you to add extra options to your products. You can also choose to add different options to different variations. So, in the shirt example, we’ve used throughout this article, we could add the option for users to have some custom text stitching done, or even to upload a monogram.
However, we might want to limit the customisation options to certain variations. Perhaps the stitching will only work with certain colour shirts. Using WooCommerce Product Add Ons Ultimate, it’s possible to add custom options to different variations.
Providing more information about variations
WooCommerce already does a great job of allowing you to create variation-specific information. As well as all the product data, like price, stock, etc, you can also write separate descriptions for each variation.
One drawback is over variation stock control, however. Many users want the ability to disable or grey out variations that are not in stock. WooCommerce Better Variations gives you this ability.
Better Variations – a WooCommerce variable product plugin
Imagine that in our shirt example, the Medium Green variation was sold out. With WooCommerce Better Variations, we can show that to the customer more clearly than standard WooCommerce does.
Better Variations also gives you the chance to set a ‘back in stock’ date that you can display to the customer, just so they know exactly when their item will be available to purchase again.
So, those are two examples of a WooCommerce variable product plugin that you can use to extend your shop’s capabilities.
Hopefully, this article has given you plenty of pointers about what a variable product is. In addition, it should also have helped give you ideas about how to use variations.
Variable products shouldn’t be too difficult to use, once you get the hang of them. If you need to extend them with some extra functionality, consider the WooCommerce Product Add Ons Ultimate and/or Better Variations plugins.
So, any questions, just leave a comment below.
Above all, have fun.