• blog
  • Magento
  • Magento 2 Guide: Attributes & Atrribute Sets

October 7,2021

Magento 2 Guide: Attributes & Atrribute Sets

byAvatar Tim

Here we’re going to look at an important, but sometimes overlooked part of Magento – Attributes.

You are able to create custom attributes and use these improve the information you show for a product and offer more website navigation options, helping to improve user experience, but before we get into that….

What are attributes?

Attributes are the fields that make up a product, the name, price, SKU, description and so on. These attributes are arranged into attribute sets, which are then used to create the template for a product.

These are used to determine what data is stored about a product.

How can we use them

We’ve already mentioned that these are essential for the makeup of products. They can also be used to define additional qualities you want products to have, for example:

If you sell digital cameras and t-shirts, the common attributes such as name, a price, SKU, description and so on will be needed for both of them. They will also have attributes, that are unique to each product, t-shirts will have size and colour, digital cameras will have storage capacity and megapixels.

These attributes will not be needed across both products, so you create your own attribute sets for these products, one for t-shirts where colour and size can be defined, one for digital cameras where storage capacity and megapixels can be set.

These attributes can then be used in a number of ways, including:

  • Defining essential fields for a type of product.
  • Show more detailed information about a product.
  • Used for creating configurable products.
  • Category filtered navigation.
magento-2-filtered-navigation

Need help with Magento?

We are experts in Magento, with experienced designers, developers & marketers. If you need a hand, get in touch.

How to create attributes

So now we’re going to take a look at how you create a product attribute for a t-shirt that comes in different colours – red, black, green, white. Then we’ll see how to create a new attribute set and addour newly created attribute to it.

Product attribute

  1. Stores > Attribute > Product and click ‘Add new attribute’ button
  2. Assign the label colours for your attribute
  3. Choose the input type dropdown
  4. Define the options as – red, black, green, white
  5. Under advanced, change ‘Add to Column Options’ and ‘Use in Filter Options’ to yes.
  6. Go to storefront properties tab
  7. Change ‘Use in Layered Navigation’ to filterable with results.
  8. ‘Use in Search Results Layered Navigation’ to yes.
  9. Finish by clicking ‘Save attribute’ button

Head over to Stores > Attribute > Product.

magento-2-stores-product-attributes

Here, click the add new attribute button and you’ll be taken to this screen.

magento-2-creating-new-product-attribute

The Default label is the identifier for the product attribute, because we’re using this for colours, so we’ll be calling this – colour. Change the catalog input type to dropdown, and underneath, a place where you can define your options will appear.

defining-product-attribute-values

After creating all your options, expand the advanced options section below and ensure that ‘Add to Column Options’ and ‘Use in Filter Options’ are changed to yes.

column-and-filter-options-to-yes

Now head to the storefront properties tab (on the left) and change ‘Use in Layered Navigation’ to filterable with results, this will then let these options be used to filter down products in a category. Click save and we’re done, now to create our attribute set.

filterable

Need help with Magento?

We are experts in Magento, with experienced designers, developers & marketers. If you need a hand, get in touch.

Attribute set

  1. Stores > Attribute > Attribute sets and click ‘Add attribute set’ button
  2. Add the name t-shirts and click save
  3. In the column ‘Unassigned Attributes’ drag your colour attribute to the ‘Product details’
  4. Click save

Stores > Attribute > Attribute sets and click ‘Add attribute set’ button.

magento-2-stores-attribute-sets

Here we’ll be asked to name our attribute set, which we’ll name t-shirts, as that will be the basis for all our t-shirt products. We’ll leave the base it on the Default product attribute set.

attribute-set-name

Now you’ll end up with three columns – first one will be the name you’ve given to the attribute set, second one will be all the attributes your current set has, the third will be all the other attributes which aren’t in there.

attributes-in-attribute-set

What we want to do is find our ‘colour’ product attribute we created earlier and then drag it across into the product details tab. Once we’ve done this, click save and we’re done.

We are a experienced Magento Agency, working with brands both large and small. If you need any help with your Magento Store, get in touch with us today!

Continue Reading

What sets our website designs apart?

Website design goes beyond aesthetics; it's about crafting an experience that keeps your audience engaged and encourages them to return to your business.

Avatar
Leanne October 18th, 2024
Understanding Website Architecture: A Comprehensive Guide

Did you know that, on average, users spend only 54 seconds on a website? In that brief moment, it’s crucial to grab their attention, engage them, and make them want to stay on your website. So, if your site is difficult to navigate, visitors are more likely to leave and seek an easier experience elsewhere. … Continued

Isev Team
Isev Team October 7th, 2024
How to Get a High Quality Website

One of our favourite quotes is “If it’s done right, it’ll last forever”, a statement that is specifically true for how important a quality website company, with talented developers and designers is. Sure, you could get a website built for you, or even build one yourself both at a lower cost than professional website builders … Continued

Isev Team
Isev Team September 24th, 2024
The Customer Journey: Tips and best practices

This article looks in detail at both the customer journey and the conversion funnel, analysing how they function and how they work hand in hand.

Avatar
Leanne August 15th, 2024