Understanding Attributes in Magento – the Ultimate Guide
What are Attributes in Magento?
In Magento, attributes are a way to classify product and customer information. They can be used to represent details such as material, size or colour and used in a variety of ways, For example:
- To enable product comparisons
- To create custom product pages
- To filter and clasify products
Some attributes are default parts of Magento and cannot be changed, as they are crucial to the way that Magento functions, while others can be added and manipulated to help organise and present products effectively throughout the Magento store.
Each attribute will have a name, a type, an input type, and various other settings that can have huge uses across your Magento eCommerce store.
Attributes are the foundations of your products and product catalogue, making up everything from the tile to the stock quantity and price.
What are Attribute Sets in Magento?
An attribute set in Magento is a group of attributes that define, or represent a specific type of product. Some attributes will not apply to certain products. For example, you do not need max cooking temperature on a fridge/freezer. Attribute sets allow you to set out what a type of product should have, so you can ensure important information is filled in and not overlooked.
For this reason, one of the first steps in the product creation screen is to choose the product’s attribute set.
There are of course some attributes that every product will have, including the core product, attributes that belong to Magento itself. These go in the default product attribute set. When you come to make a new attribute set, you base it on the default to prevent the need for adding the basic attributes.
What’s the Difference Between System Attributes and Other Attributes in Magento?
System attributes are “core” attributes of Magento. They cannot be removed and are essential information that the system needs to work. In the attributes section, they will be marked as “yes” under the system heading. These are attributes such as price, description, gallery, image, category_ids, price, SKU, tier_price, and weight.
Custom attributes are created to represent specific information unique to your products or business.
What’s the Difference Between a Product Attribute and a Customer Attribute in Magento?
As we’ve already covered, a product attribute is used to describe and classify products, representing any kind of information used for sorting.
They were the main attributes that could be managed in the admin panel of Magento until the recent update, which ported the feature to create customer and customer address attributes as well within the open-source version.
Customer attributes are pieces of information that can be stored about your customers. Only available since the 2.4.5 Magento 2 update, this is a feature that previously would have required custom Magento development. Now you can add new fields to the address section, without the need for a developer.
What should I use product attributes in Magento for?
The list is endless, and some can have multiple uses. For example, an attribute you may create could be a product attribute called “compatible with”. You could use this attribute to add what certain products are compatible with, and then use this to allow customers to filter your products on compatibility. You could also use this for your internal staff to look for a specific product within the back end. And going even further, if you use a module such as Aheadworks automatic related products, recommend products that are compatible with the products they’re viewing.
Another example is the colour attribute. Not only can you use this for displaying information to the customer and sorting, but you can use this attribute when you create a configurable product, and the customer can select the configuration based on the colour attribute. For example, you could have a configurable product that is a t-shirt, and use the colour attribute to set the children for the product.
The main uses for product attributes are:
- Providing information for the customer
- Sorting products
- Layered navigation filtering
- Search optimisation
- Configurable products options
- Internal searching and filtering
- For custom modules to perform functions unique to the module
- Product comparisons
- Price rules
The important question is what do you want to achieve within your store? Is there something that might help sales if the customer knows it, or can search by it? Is there something hindering your sales team that if they could view it on each product would help? Are you trying to improve your advertising across the site or create specific vouchers? All of the above can be achieved with attributes.
What can I use customer attributes for?
Customer attributes are more limited than product attributes but still useful. For example, you may wish to store a customer’s company against them. All of the uses are more administrative and unless used by a specific module to perform a custom task, are aimed at assisting the administrator of the site.
The main uses of customer attributes are:
- Sales information
- Order information
- Fulfilment information
Why would I need Customer address attributes if I have customer attributes?
The address section, although attached to the customer, has a whole host of functions based on it and has its own set of rules. The key difference is that the address attributes can be incorporated into the address template within the site, allowing you to add fields with no additional development work! You can make this new field a required field, so the customer must fill it out, and answer a question about their delivery needs. One impressive use we’ve witnessed is adding a file attachment field and requesting proof of ID if the customer is buying age-restricted products.
How to create an attribute in Magento
To create an attribute you need to navigate to the admin panel, then go to stores, attributes, and pick the type of attribute you’d like to create. If we select a product attribute we can start to see all the uses that an attribute can have.
When creating an attribute, you’ll be met with the following screen and have 3 sections to consider:
Attribute Properties
Properties define how the attribute acts within the system for the back-end user/ store admins.
Setting | Meaning |
---|---|
Values required | If this is set to yes you cannot save the product without giving this attribute a value. |
Default label | The name shown for the attribute on the back end, internally. |
Catalog input for store owner | How the admin can give the attribute a value, this can be text, price, a date, a yes or no, an image etc. *Important to note, for layered navigation, you cannot filter text attributes |
Advanced Attribute Properties
Setting | Meaning |
---|---|
Attribute code | Used for sorting internally. |
Default label | The name shown for the attribute on the back end, internally. |
Scope | Where in the system you’d like it to be available. |
Default value | This will be the value for new products unless changed. |
Unique value | Does this attribute need to be different on every product? |
Input validation for store owner | Does the value have to meet certain criteria e.g be a decimal number? |
Add to column options | Adds it to the column in the product grid. |
Use in filter options | Let users filter by this attribute. |
Manage Labels
This manages how it displays to a customer. If your store is multilingual, you can add translations here:
Storefront Properties
These properties manage how attributes interact with the storefront and what the customer sees.
Setting | Meaning |
---|---|
Use in search | The user can get results for the value of this attribute on products in the search, e.g colour red, users will get results on the search term red on products with that attribute. |
Comparable on storefront | Can the users compare these attributes in products using comparison? |
Use in layered navigation | Can the user filter by it in the layered navigation, can only be used on these types of attributes: Yes/No, Dropdown, Multiple Select and Price. |
Position | Where it appears in the layered navigation options. The higher the number, the higher up it will be in the list. |
Use for promo rule conditions | Can you select this as a condition for promo rules? (see rules and conditions article for more on this) |
Allow HTML tags on storefront | Lets you use the WYSIWYG editor for the attribute. |
Visible on catalogue pages storefront | Will show on the catalogue page. |
Used in product listing | Will show the product on the product page. This depends on your design theme, and what attributes it allows you to show. |
Used for sorting in products | Can be used in the sort by section of the product page(depending on the design theme). |
Once you have created an attribute by filling out all of the fields, you can then add them to groups and attribute sets. You can then apply the attribute sets to products and will be able to fill these in on the admin to create a product page.
The Benefits of Using Attributes in Magento for Your eCommerce Store
In summary, attributes are a powerful tool in Magento, allowing you to perform many useful functions, without costly development time.
Product attributes enable you to make it easier for your customers to find what they are looking for and ultimatley boost sales, while customer attributes can help you to better understand and segment your customer base.
Magento attributes are an invaluable method to improve the shopping experience, enhance your marketing efforts and upgrade your customer support, helping you to serve your customers better and increase revenue. We highly recommend you give them a try!
Need help & support setting up attributes for your Magento store? Get in touch.