3.4 How to Use WooCommerce Product Attributes and Variable Products
In this lesson, I'll show you how to use WooCommerce product attributes in your store to create variable products that can be bought in more than one format.
1.Introduction2 lessons, 07:01
2.Installing and Configuring WooCommerce6 lessons, 39:42
3.Adding Products to Your Store4 lessons, 30:51
4.Adding Extensions to Your Store2 lessons, 10:46
5.Conclusion1 lesson, 02:25
3.4 How to Use WooCommerce Product Attributes and Variable Products
Hello, and welcome back to this Tuts+ course on getting started with WooCommerce. In this part of the course, I'm gonna show you how to use product attributes and variable products to make more than one version of a product available. Now, you can use product attributes without variable products, but I think they work best when you put the two together. So I'm gonna show you how it works. Now, the first thing we do is we set up attributes. Now, attributes are things that are different ways of getting the product, different ways of producing the product, or different things like colors, sizes, and that sort of thing. Now, in the case of books, it's format, you add an attribute in much the same way that you'd add a category or a tag. So you type it in here, the Name and the Slug. You can set the way they're sorted. And you can also Enable archives you can choose whether you want that attribute to have archives, and I've added format. So if I Edit that, I'm gonna add archives so we can have an archive of ebooks, and an archive of paperbacks, and so forth. So we'll go back to our attributes. And then having set up that attribute, we can then add terms to that attribute. So I've added two terms so far which is ebook and signed paperback. And then I'm just going to add paperback because people can either go to Amazon and buy the regular paperback or they can buy a signed paperback direct from me on my website. So I've now got three terms in my format attribute. So those are all different variations on how you might buy a book. So if you're selling clothes you might use sizes, for example. So now let's go back to our Products. I'm gonna open up one of my products, EYES OF A CHILD, which at the moment, I haven't set up as anything more than just a simple product and I haven't added a price yet, because I want to add a different price depending on which variation of the products you use. Now, if you're going to use variable products you selected as a Variable product. So, It's taxable and it's Zero rated. And then before we can add variations, we add attributes to it. So I'm gonna add the Format attribute. And then I'm gonna add all the terms. And I'm gonna select Used for variations. And I'll Save those attributes, I'm gonna update my post. Because until you update or publish your post, the attributes aren't saved. So now, I'm gonna set up variations. So I'm gonna select Create variations from all attributes and I'll click Go. Now checks that I want to do it and I'll click OK. And then I'll wait for that to happen doesn't take long because it's just three variations. So I can now, edit each of these. So I can create a price, I can select whether it's Downloadable or Virtual. And I can Manage stock for each of those so they effectively become individual products. And I can also upload separate images for them if I want to. The first one I'm going to look at is signed paperback. So I'm going to click on this and I can move them up and down. I'll Cancel that and I'll click there and you can see more. And this is Enabled, it's a regular physical product and the price of this is 4.99. Shipping class, it doesn't have a shipping class. It has the same Tax class as the parent I'll click Save changes. So that's my signed paperback version. Now let's have a look at the ebook. Now you can't actually, create these, I'm gonna Enable it. You can't create these as external or affiliate products. So what I'll have to do instead is I will. I will set it up as a regular product. I will make it Virtual. So it's not shipped, but not Downloadable because people aren't downloading it from this site. Now, I've tried doing that, and let's just do the paperback one as well. Get that price. I'm not gonna set that one up just yet. It's a virtual one. I'll Save those changes and I'll Update. I'll view my product and then I can choose a format so I choose ebook. So at the moment, I have a link to Amazon, which has worked because I added HTML, but I also have an Add to Cart button and I don't want that because I don't want people buying this on my website. So let's take a look at how we can change that. Variations, ebook and let's try un-enabling it. Update that and then update the product. We'll View the product No, it's not listed. Let's edit it again. I think another alternative might be to manage stock, Enabled, and then Manage stock. So we'll say, we Do not allow backorders and there's nothing in stock. Save those changes. And then we'll Update and now let's take a look if we can view the product. Buy on Amazon. Now, that's not ideal at the moment because it's saying that it's out of stock in the store. So let's go back and have a look at the settings for our stock management. I'll go into WooCommerce settings, Products, Inventory, we can't change the text that's displayed. Now, it might be possible to do that with a function. So we have two options here. The first, I'm not gonna do this here, but just so you know in case you want to do it, we have an option to change using a filter WooCommerce get availability. And we can replace this text here, out of stock to coming soon in this case, but we could change it to buy from Amazon on this store. Alternatively, that is a plugin that will change that message. However, it hasn't been tested with the latest releases of WordPress. So use it with caution. It might work, it might not. So if you're comfortable coding, you could write this function in a plugin of your own, which is a better place to add it then in your theme that would change that message. So that's how you create variable products using product attributes and product variations. So if we go back into the EYES OF A CHILD product, you'll see that we've got formats for it. So if I go into Signed paperback people can buy that on the site, so you can order that and add it to your cart. So that's how you set up variable products. In the next part of the course, I'll show you some WooCommerce extensions that you can get both from the WooCommerce store and from CodeCanyon. And give you some ideas as to how you could extend your WooCommerce store using those extensions and plugins. See you next time, and thanks for watching.