How to Create a Variable Product in Woocommerce
If you’re selling products in Woocommerce, chances are you’ll want to give your customers options from which they can choose at some point. Imagine you’re selling blue jeans, for example. You may want your customer to choose between sizes, colors and whether or not they come with a bunch of rips in them or not.
These are called variations in Woocommerce. Variations are created using what’s called attributes. Here’s the best way to go about it.
Create Your Attributes in Woocommerce
On that page, you’ll see something like this:
You may recognize this form, it’s very similar to that which you’d use to create a tag or category in WordPress.
The big difference here is that Attributes are grouped a bit differently. In this form, all you really need to do is add a name. In the screenshot above we’re using Size, but you might use Color, Quantity, Width, whatever aspect of your product you need your users to choose from. Once you add your name, click Add Attribute.
Next, you’ll want to click Configure Terms to the bottom right of your newly created attribute.
You’ll see a similar form again. This is where you’ll enter in the options in your group. So since I chose Size, I would add sizes like Small, Medium, Large or 32, 34, 36, etc. Whatever is relevant to your particular products.
When you’re finished, you’ll end up with a table like this:
That’s it, you’re done!
It’s also worth noting that this step is optional. If you have products that don’t tend to share these types of “attributes”, you can skip this part of the process altogether, as these attribute terms can be created directly in a product as well, which we’ll cover in a moment.
If you sell blue jeans, chances are they’ll all have similar attributes like waist size, length and color. If you sell items that don’t share attributes like this, you may not be as concerned with keeping them all grouped in this area. It’s also worth noting that you don’t need to assign all attributes to all products. For example, if one brand of jeans you’re selling only comes in the color blue, but you have created red, white, stonewashed, black and blue color attribute terms, Woocommerce allows you to set which and how many attributes, and similarly which and how many attribute terms, any given product can have.
Create Your Product Variations
Next up, lets go in and edit a product. You’re looking for this table:
First, choose Variable product from the dropdown at the top:
This gives us additional options in the tabs on the left side of this area:
On the attributes tab, we can choose our predefined attributes from the dropdown, or Custom product attribute to create terms specific to this product.
If you’re using previously defined attribute terms, you’ll get an interface like this:
If you just want to create terms for this product:
In either case, make sure you check “Used for variations”.
Click Save Attributes.
Next, hop into the Variations tab:
By using this “Create variations from all attributes” dropdown, Woocommerce will make one product variation, i.e. set of options, for each product. So if you just have one set of variations, like Size, and you used small, medium and large, you’ll get 3 sets of options to edit.
If you had two or more sets of attributes, let’s say two (Size and Length) for our purposes here, and you entered in three lengths as well as three sizes, you’ll end up with 3 x 3 = 9 sets of options. Because this number can quickly get out of hand if you have a lot of attribute terms, Woocommerce warns you of this:
You’ll get a table like this:
Each group of options has the following.
The only required field is Price. Without it, this particular variation won’t show.
Fill in as many of the additional fields as you require. For example, some shipping plugins need you to enter in the dimensions and weight. You can choose to enter in a Stock Quantity by first checking Manage stock?, and so on.
Then click Save Changes at the bottom of this tab and you’re all set!
Up Next: How to Take Your Store International