A variable product in WooCommerce helps you manage different variations of a single product. You can use this product type to create multiple variations of a single product and save the time and effort of creating each variation from scratch. Let’s look into the process in more detail.
Product attributes are key factors in setting up variations
We have already covered the process of creating global product attributes on your store (you can revisit the article here.) You can use global attributes to create a variable product if that attribute is applied. Additionally, you can create custom attributes for each of the variable products that you create. First, let’s see how to add a variable product.
To create a variable product, you need to go to Products → Add Product
Add product name, description, categories, etc. as you would do for adding any other product.
Adding a variable product
The most important step in defining a variable product is in the Product Data metabox. Select ‘Variable product’ from the ‘Product Type’ drop-down.
When you select a variable product, you can see the Product Data metabox has more options. These are specific to this product type, such as ‘Attributes’ and ‘Variations’.
To start with, we will go to the Attributes section. Use the ‘Custom product attribute’ drop-down, where you can select the desired attribute for your new variable product. Simply select and click add to apply the attribute. For example, let’s add the global attribute ‘Size’ to this product.
Select ‘Size’ and click the Add button.
Once you add the attribute, the screen expands as seen in the below screenshot.
There are two checkboxes. The first is to make the attribute visible on the product page. The second makes the attribute available to be used for variations.
You can select the terms for the attribute from the ‘Value(s)’ field. There are multiple ways to do this. If you want to apply all the pre-defined global terms to this product attribute, click the Select all button. Click the ‘Select terms’ text box to get a drop-down with all the global terms, if you prefer to selectively apply. Use the Add new button to add an additional custom term.
Repeat the steps if you want to apply another attribute to this product. For example, let’s add the attribute ‘Color’.
Once all the applicable attributes are added to the variable product, click the Save attributes button.
Creating variations of the product manually
Next, we will create variations of the product.
When you go to the variations screen, two options are available. One to manually add variations based on the attributes we have created. If you wish to choose this, select ‘Add variations’ and click Go button.
This will take you to a screen where you can manually create variations using the available attributes. You can also set a default display term for any particular attribute.
In addition, now you can see a lot more options in the drop-down to bulk edit.
Creating all possible variations of the product
An easier way to approach this is to let WooCommerce create all the possible variations at one go.
Select ‘Create variations from all attributes’ and click Go button directly when you go to the Variations screen…
Or select from the drop-down that has the bulk-edit options.
In this example, we will create all the possible variations.
You can see all the possible variations (according to the pre-defined attributes) in the screenshot below.
Next, you need to add more information to each of the variations that you created.
Hover the cursor around one variation to display a few icons. Click the arrow icon to expand the screen. Here you can add all the required information for the product like price, SKU, shipping information, tax details, etc.
Editing the variation is pretty straightforward. The settings are just like how you edit a simple product.
You can repeat the process for all possible variations.
Use the ‘hamburger’ icon if you want to sort the display order of the variations. Click ‘Remove’ to delete that particular variation as well.
Do not forget to click the Save changes button after all the information is added.