How do I set product attributes in Woocommerce?
How to set product attributes in Woocommerce
In this how to we’re going to look at how to set up product attributes in woocommerce in order to easily manage product variations.
- How to set product attributes in Woocommerce
- What are product attributes?
- Two different ways to set up product attributes in woocommerce
- How to create woocommerce product attributes globally
- How to create custom woocommerce product attributes
What are product attributes?
If you have woocommerce products with variations you need to create “Product Attributes”.
I.e. if the same product is available in different colours, sizes, or other such options you need to define all the different possible options.
For example if you have a product available in different colours, the “Attribute” would be “Colour” and the variations the different options, e.g. Black, White, Red, etc.
Two different ways to set up product attributes in woocommerce
- Globally under the woocommerce products menu
- Within each individual product
When to set woocommerce product attributes globally?
Setting woocommerce product attributes globally is usually the best way as typically many products will share the same variations.
Perhaps, for example you sell clothes, including T-Shirts, Jeans, Jumpers and Hats.
Products are available in different sizes from XS to XXL. By creating the attributes globally you just have to do so once, then when you add the products to your woocommerce store, you just select the relevant attributes from the list.
Some may use all the variations – perhaps T-Shirts are available in XS, S, M, L, XL, XXL.
Others in less, say Hats just come in S, M, L (sorry big heads) – that’s fine, you can just select the relevant attributes.
In addition to making product creation quicker and easier, setting attributes globally also makes it possible to set up product filters, enabling shoppers to just display products available in their size or preferred colour etc.
When to configure Woocommerce product attributes locally
It’s important to know that you can also set custom product attributes within an product too. This is useful if you are adding one or more products that have unique variations – perhaps a screwdriver available in right or left-handed versions for example.
If this is the case, it’s quicker to simply create the variations as you go along during the product creation process.
How to create woocommerce product attributes globally
Step 1: Define the Attribute
The first step is to define the parent attribute, in this example “Colour”.
- Navigate to the “Attributes” section under the “Products” menu in woocommerce
- Type the name of the attribute in the box marked “Name” – e.g. “Colour”
- Type a “slug”. This is what it will say in the address bar. It should be all lowercase, no special characters. E.g. “colour”.
If the attribute has more than one word, they should be separated by a hyphen. E.g. “two-words”
- Click the “Add Attribute” button.
Step 2: Configure Terms
After creating the parent attribute, you now need to define all the different options.
- Once the page has refreshed and the attribute is live, navigate to “Configure Terms”.
- When the configure terms page opens, you can add one variation. In this example we are adding the colour “Blue”. The same rules apply for the “Slug” as before. Generally speaking, there’s no need to put anything in the description box.
- After clicking “Add new xxxxxx”, you will return to the same screen so you can add the next variation, following exactly the same steps. You will see the variations you’ve already added to the top right. Here you can edit or delete the variations you’ve already added if you realise you’ve made an error.
- That’s it basically! You can add more variations to an attribute at any time by navigating to Products>Attributes>Configure Terms and following these same steps. Useful if you have a lot of variations so don’t have time to add them all in one go, or if you add new variations in the futre as your business grows!
How to create custom woocommerce product attributes
Creating custom attributes for a specific product is just as easy.
Within the add product page:
- Set “Product Data” to “Variable product”
- Select “Attributes” from the left hand menu
- Leave “Custom Product Attributes” selected and click “Add”
- Type the attribute name (in this case “Fastener”)
- Define the variations, separated by | (Shift + the key next to it). E.g. Laces | Velcro | Buttons
- Leave the “Visible on product page” box checked.
- Check the box “Used for variations”
- Click “Save Attributes”
Now you’ve defined your product attributes and variations, it’s time to create your variable products.