Today’s Ask Sell with WP question comes from Alisha:

Is there a way to create a set of variations that are shared among several products in WooCommerce? I’ve been creating attributes for each of my products, then linking them to make variations. I just want to know if there’s a way to speed this up so I can automatically pull in sizes, etc.


Yep, you can absolutely do this! This will make it really fast to add them to products, then you can just click “Link Variations” to create your variations from this.

Setting up Attributes

If you go to Products > Attributes, you’ll be able to add default attribute sets.

WooCommerce Add New Attribute

Enter a Name for your attribute, which will be displayed on the product page. I usually make my slug the same thing as my name, but with dashes instead of sentences. Then you’ll want to select the type – I usually choose “Select”. This will allow you to simply select which attributes apply when creating your products. If you select “Text”, this will just create a placeholder attribute and you’ll have to enter all of the values for your attribute on the product page. For example, I do use this occasionally for color. I use a “Text” type, then on the product page, I enter the applicable colors (like Blue | Red | Green, etc).

Finally, set your default ordering. I usually leave this as “Custom” so I can drag and drop attributes into the order that I choose, but you can also sort by name or term ID.

Once you’ve added the attribute, you may want to add some terms (if you’re using a “Select” type) so that these will be available on the product page. You can do so by clicking the cog icon for the term:

WooCommerce Add Terms for attibutes

When you click this, you’ll be able to add your terms for the attribute. For example, if your attribute is “Size”, your terms are “Small”, “Medium”, etc.

WooCommerce add attribute terms

When you’ve added your terms, drag-and-drop them if you’re using custom ordering, and you’re done! You can add more attributes if you’d like, but now these will be available on the product page.

Using your Attributes

Now that your attributes are set up, you’ll be able to access them when creating or editing products. They’re under “Product Data > Attributes”:

WooCommerce add attribute

You can now easily add these attribute sets to products. If you add a default attribute set, you’ll be able to enter all of the terms that apply to this product. If you’ve created a “Select” type, you can add all terms, or add them as needed:

WooCommerce add product attribute terms

If you’ve created a “Text” type, you’ll need to enter the applicable terms.

Select or add any attribute terms that apply and that they should be used for your variations. You can repeat this with any default attribute set, then when your attributes are added, link these to easily create your variations!


Have your own question? You can submit it here.

Articles you may also like:

Posted by Beka Rice

Beka Rice manages the direction of Sell with WP content and writes or edits most of our articles to share her interests in eCommerce. Or she just writes as an excuse to spend more time jamming out to anything from The Clash to Lady Gaga. Who knows.

14 Comments

  1. thanks you so much.
    Only clear detail I could find on the subject
    Woo docs are so limited

  2. Hi, thanks for the guide.
    I have an issue that is killing me:
    How do I choose the order of the attributes to be displayed?

    Like, I created the attributes: Size, Color and Material. In the product page, they appear in that order, but I need the Material to be displayed first.

    I know that each attribute has an attribute_id that I can change in the database, it would be good enough to be able to sort by that id.
    Do you have any ideas on this issue?

    1. Hey Thom, I do 🙂 . Go to the “Attributes” tab in the Product Data section, and you can drag and drop them into the desired order.

      1. Hey Beka,

        I wrote a tutorial on how to globally change the default sort order of product attributes. Handy if you already have hundreds of the same kinds of products and want to change the order globally instead of manually reordering each one.

        http://brianli.com/change-default-order-woocommerce-product-attributes/

        Great article by the way!

        Brian

  3. Hi Brian and Beka,

    Is there a way to show al my attributes for every new product? Now I need to choose and add them every time I make a new product. I like to have those in my ‘new product field’ by default.

    Thank you in advance!

    Nomi

    1. Hi Nomi, I’d recommend creating a product template draft with these filled in, as you can duplicate that as a starting point for all new products:

      1. Hi,

        This is an interesting approach. Unfortunately having a product template only helps with future products, but not with current ones. Let’s say I have a cloth store with 1000+ products and I want to add a new attribute “waterproof” to all of them or that I found out that my customers are more likely to buy the product if the size is listed prior to color. Being able to create attribute sets (or product types) would help, but seems like this feature is not currently available in WooCommerce. Magento, on the other hand, has it.

  4. Hi Beka Rice, Nice article.

    I have one problem.How to use text type attributes,I want to user enter data .I created text type attributes,But when I used these attributes on product page it shows select-box.I did not get text-field.

    1. Hi there, I think it sounds like you’ll want to use something like Product Add-ons — attributes won’t allow customers to enter anything from the frontend. If you want to enter a custom attribute yourself, you can add a custom attribute instead of selecting a default one.

  5. Hi. I have question about the size attribute. Lets say I have a clothing store that sells shoes, t-shirts and jeans. Shoe sizes range from 5 – 12, t-shirt sizes range from small to X-large while jean sizes range from 30 – 40. The problem I am having is that when I put a search by size filter say on Shoes category, the drop-down is showing all the other size values that are not applicable to shoes, for example small, medium, large, 30, 39, etc from the t-shirts and jeans categories. How do i solve this and make my shoe size filter just show shoes size values only?

    1. Hey Reuben, I’d recommend setting up each type of size as a different default attribute then — it’s sounds like you’ve got all sizes in one default attribute, which is why they’re all showing in the layered nav filter. So there would need to be a default “shirt size” attribute, “shoe size”, etc.

      1. Hi Beka. Thanks I implemented your suggestion and its working perfectly now.

  6. Fetching problem when i click on cog icon then it shows “You are not allowed to manage these items.” what can i do now. I am the administrator of that site

It's been over 2 years since this post was published, so comments have been closed. Thanks for reading!