Product Attributes in Magento – A Beginners Guide




Product attributes in Magento are quite complex – with Magento using a fully realised EAV attribute system on the backend, there is a great amount of flexibility and customisation available to the website ownner when creating new products and product types.

Attributes are so core to Magento products that in fact, you cannot create a product without it having an attribute set. When you first encounter attribute sets, they may seem quite daunting, so we’re here to help you along the way.

Attribute Sets

Product-Attributes
Products are described by attributes. What attributes a product has are described by its attribute set.

 

When listing an item in an e-commerce environment, it helps to have some way of describing your product without having all the information in text form. This way, you can filter your products by their features, such as size, colour, manufacturer etc.

There are an infinite number of ways you can describe different products, so making your attributes intuitive and easy to use and understand is a keystone to improving customer conversion rates on your site.

If you’ve ever used Amazon, eBay or Gumtree, you’ll know just how important it is to be able to filter by attributes, such as choosing a laptop screen size or processor speed.

An attribute set contains a common set of attributes that can be used to describe a unique class of products.

So, the way Magento does things is to have a set of attributes to describe certain types of products. This is known, funnily enough, as an attribute set. An attribute set is a common set of attributes that can be used to describe a unique class of products.

What attribute sets you define is, at the end of the day, a matter of discretion on your part depending on the type and range of items you wish to sell. Examples of attribute sets for a store that sells a large range of electronic goods might be:

  • Music Players and Speakers
  • Televisions
  • DVD and Video Players
  • Freezers and Refrigerators
  • Ovens
  • Vacuum Cleaners
  • etc…

Whereas a store that specialised in audio electronics might have:

  • Home Theatre Speakers
  • Computer Speakers
  • Sound Bars
  • Bluetooth Speakers
  • Wired Headphones
  • Wireless Headphones
  • Cabinets
  • Record Players
  • CD Players
  • etc…

Can you see the difference in the two? One drills down much more specifically into the different classes of products, but because that’s they’re speciality, that probably makes sense, and will help their customers find the product they’re looking for. There are arguments for and against how far you should drill down into the product classification tree with your attribute sets, but I would always argue that, if you can, being more specific is better than being less specific, because it’s much harder to create more specific attribute sets later on than it is to do it the other way around.

At the end of the day, what attribute sets you create will be something you need to decide based on the needs of your business. Things to consider when creating your attribute sets:

  • How diverse is your product range?
  • Will the diversity of your product range be expanding in the near future?
  • How often will you be adding new products?
  • How many people will you have entering products?
  • Will product inputters be departmentalised?
  • What classifications do customers naturally group products into?
  • If you were a customer trying to find XYZ, how would you filter your search to find it?
  • Will you be bulk importing products, or entering them one by one?

Attributes

Attributes are fairly simple and intuitive to understand in Magento – an attribute is something that’s used to describe a feature or aspect of a product. Let’s take one of the attribute sets above and build a set of attributes for it:

Bluetooth Speakers Attribute Set

  • Attribute Name attribute type
    • Attribute Option (if applicable)
  • Bluetooth Version dropdown
    • 2.0
    • 2.1
    • 3.0
    • 3.1
    • 4.0
  • Power dropdown
    • 1-5W
    • 5-10W
    • 10-20W
    • 20W-50W
    • 50W+
  • Colour multiselect
    • Black
    • Blue
    • Green
    • etc…
  • Portability dropdown
    • Portable
    • Not Portable
  • Manufacturer dropdown
    • Bose
    • Sony
    • etc…

Hopefully you can see where this is going, the list goes on.

What attributes you choose to describe a product will rely heavily on a few things:

  • What are customers using to search for these products?
  • Are you working with existing product data, or entering them in yourself?
  • How much time have you got?
  • What are other sites doing? (i.e. what is expected)
  • What are the best practices?

All in all, I would argue to have as high quality product data as you can possibly afford – your products are the core of your site, and having high quality product data is immeasurable. If you don’t do it now, you’ll regret it later on.

Let’s take a closer look at what makes up an attribute. If we go into the Magento backend, and go to Catalog > Attributes > Manage Attributes and click on Add New Attribute we’re presented with the add attribute screen.

Add-Attribute
Add a new attribute

The Add Attribute screen can be quite daunting because there’s a lot of stuff in there you might not have seen before, so let’s tackle them one by one. Starting with the Properties Page:

Attribute Properties

Attribute Code Required
This is a unique identifier used internally to describe the attribute. What is set here will never appear to the user, but this is what the attribute is called in the database. Set this to something short but descriptive. I prefer to use lowercase letters with hyphens for spaces, e.g. bluetooth-version, as it simplifies imports and exports in some ways.
Scope
This determines under what scope or view the attribute can be set in. For example, you might have Magento set with store views for each country you ship to. Certain information won’t change per store view, and as such should only be set globally, e.g. dimensions, weight, colour, etc.
Catalog Input Type for Store Owner
Listed here are several different types of inputs that can be used for filling out an attribute. Think carefully before choosing, because they have different advantages and disadvantages and using the wrong one might cost you later on. Details of this setting are listed below.
Default Value
Fairly self explanatory – if nothing is entered for this attribute when creating the product, then this value will automatically be used. This is useful if, for example, the attribute is an exception to a rule, but needs to be filled out. E.g. for a company that sells umbrellas, you might have a ‘waterproof’ attribute, but you might also sell parasols, in which case the waterproof-ness needs to be explicitly set in a small amount of cases.
Unique Value
This determines whether the attribute value can be shared amongst multiple products.
Values Required
Whether the attribute absolutely needs to be set for every product this attribute applies to. For example, if you sold batteries, you wouldn’t want a battery listed without specifying the voltage.
Input Validation for Store Owner
An array of options that forces the input type to conform to a certain specification, e.g. numbers, urls, etc.
Apply To Required
Whether the attribute should apply to any product or just a subset of products. For example, a downloadable product probably can’t have a width.

Frontend Properties

Use in Quick Search
Should quick searches check against this attribute to return results? E.g. in a battery shop, if a person searches for ‘3.3v’, should it return products with the attribute ‘voltage’ set to ‘3.3v’. Conversely, you might not want searches for ’35mm’ to search for the width attribute as well as film size attribute in a camera store.
Use in Advanced Search
Same as above, except that the attribute will/won’t be available in the advanced search form filters.
Comparable on Front-end
When comparing two or more products, should this attribute show up in the list of comparison attributes.
Use In Layered Navigation
When navigating categories, should this attribute appear in the sidebar as a filterable attribute?
Use In Search Results Layered Navigation
Same as above, but for search results. This is useful, as search results return items from all categories, and if you have a lot of different attributes, it might confuse or scare customers if there are too many appearing on the sidebar.
Use for Promo Rule Conditions
Can this attribute be used for filtering promo rule conditions? For example, you might not want it to be possible to have a promo rule based on whether a product is self adhesive or not.
Position
This determines the relative position compared to other attributes when appearing in the sidebar for layered navigation and search.
Allow HTML Tags on Frontend
Can HTML tags be used for the attribute values? I would generally advise no, unless you really have to – but it’s hard to think of a case where this would be needed.
Visible on Product View Page on Front-end
Should this be visible in product listing pages? For example, you might not want the have certain attributes such as dimensions on product listing pages.
Used in Product Listing
To include the attribute in the product summaries that appear in catalog listings, select Yes
Used for Sorting in Product Listing
Is this attribute sortable? Does it make sense for the attribute to be sortable? Numerical things, in most cases, should be sortable, but also fields like ‘author’ you might want to sort against, so think about it before blindly selecting yes or no.

Catalog Input Type for Store Owner Explained

There are 9 different input types when creating attributes, and each one has it’s own set of properties, making it an important decision when creating an attribute, especially as this generally cannot be changed after the fact!

Text Field
A small, single line text field. Many people would think this would be your go-to attribute type, but think before blindly selecting this type.Text type attributes do not appear in layered navigation, meaning you cannot filter them when searching for products. This is a huge disadvantage for the front end of your store.

ONLY use text types for attributes whose values are different for each product, for example an ISBN number is different for every product, but manufacturer or author might not be.

An example of a text field
An example of a text field
Text Area
Similar to above, except that a larger text field is present with multiple lines that allows for larger amounts of text.
An example of a textarea
An example of a textarea
Date
The name says it all, really, a date type attribute. Using this, instead of a text attribute, will make sure Magento can give it the proper localisation treatment.
An example of a date field
An example of a date field
Yes/No
If the attribute can literally only be one thing or another, use this type. I’ve had many cases, however, when a dropdown attribute type serves the purpose better. An example of a (yes/no) attribute might be whether a cupcake is gluten free or not. It can only be one or the other (although there might be varying levels of gluten free! In which case, a dropdown might be more suitable).In general, even if a yes/no field would be suitable, I try to opt for dropdowns instead, because they’re just so much more flexible. For example, if you did have an ‘Includes Batteries’ attribute, it might be safer to have a drop down with ‘Does include batteries’ and ‘Doesn’t include batteries’, because maybe later on you might want to add the option ‘Doesn’t need batteries’ or ‘Built in rechargeable battery’. You never know.

Multiple Select
With multiple select attributes, more than one value can be specified for one product. An example might be colour – a product can generally be two or more colours, so make this a multiple select list (color is a default attribute in Magento with type dropdown – I would suggest deleting this and creating a multiple select color attribute instead).
An example of a multiselect field
An example of a multiselect field
Dropdown
Dropdowns allow only a certain range of values to be selected for a product, and only one value. Be very careful when thinking about this, because a lot of attributes you might think suit dropdown input types might be better off as multiple selects. If you can think of just one example where multiple select lists would be needed, use them instead.Using batteries as an example, you’d think that maybe a battery can only have one voltage (and you may or may not want to enforce this with the use of dropdowns) but there may be times when a product contains 2 or more batteries and as such needs a multiple select, or maybe the battery has a switch-able voltage.

An example of a dropdown field
An example of a dropdown field
Price
As the name suggests, this should be used for whenever a price is needed. This will make sure Magento can give the attribute the proper localisation.
An example of a price field
An example of a price field
Media Image
Aside from regular product images, this attribute type allows for an image to be used as an attribute value. An example of when this might be needed is if every product in your inventory has something that is most easily described by a photo of a part of it, e.g. if you were selling computers, you might want to take a photograph of the connectivity on the back of the computer and have that as an attribute. Done in this way, the connectivity photo can be displayed on the product page as a special box or tab, for easy customer viewing.
Fixed Product Tax
As the name says, this is used for cases where there might be some sort of fixed product tax associated with the product. Some countries have a fixed product tax that applies on a product per product basis, for example WEEE tax on specific types of electronic products that offsets the cost of recycling.

Attribute Options for multiselect and dropdown attributes

After entering the basic specifications of your product, the next tab on the left allows you to enter option values for your attributes. Great, more things to think about! Since dropdown and multiselect attribute types are probably the most used and most important types, it’s worth going into further detail about product attribute options.

Attribute options are what appear for dropdown and multiselect type attributes when entering them on the backend of the site, doing mass imports, and what appear in the layered navigation/advanced search/product pages on the frontend.

Layered Navigation
An example of Layered Navigation

Once you’ve chosen what attributes to create, it’s time to think about attribute options. On this page, depending on how your site is set up, you’ll see a few input boxed with different store codes above them, as well as an add option button and a default/admin value box.

You can use these different values to input different text labels for your attributes based on different store views. Each store view will inherit the default value if it’s own value is not set. This is mostly used for internationalisation and localisation for your attribute values. You might have a store view set up for British English, American English and French, in which case you’ll have: Colour, Color, Coleur and Red, Red, Rouge, and so on.

I would imagine, when starting out, you probably have just one store view in your native language, but just bear in mind that later on you may expand to other countries if your site proves successful, in which case you’ll need to go back and create these different values for different sites.

Summary

All in all, it’s a lot to think about when creating new attributes, and each one should be carefully thought about, in terms of:

  • How products will be inputted.
  • How people will find the products on the site.
  • How the product listing will look.

It helps to think critically about your products before just blindly creating attributes – the more thought you put into attributes and attribute sets, the higher the quality of your data will be, and the easier things will be later on, especially as you expand, add new products, new sales channels (eBay, Amazon, etc) and start learning things about how customers interact with your site.

One Reply to “Product Attributes in Magento – A Beginners Guide”

Leave a Reply