Summer Sale! Save 15%
on any Shared Hosting Plan & Location.
 View More

How to Create Product Attributes in Magento 2

Overview on Creating different product Attributes in your Magento 2 Store

In this tutorial we will illustrate how you can setup your products’ attributes. Attributes are an important part of your product catalog as each of them can help potential customers with choosing a certain product that corresponds to their needs. Users will also be able to search and compare products based on their attributes.

 

Your Magento 2 store includes predefined attributes such as Name, Price, and Description, that can be used for any product. In addition to these, you can create new custom attributes to help your clients with their choice.

 

To create a new attribute login to your website’s admin dashboard and navigate to the Stores>Attributes>Product section of Store

 

Accessing the Products Attributes menu in Magento 2

 

This will open the list of all attributes currently available on store. To create a new one click on the big orange Add New Attribute button.

 

Preparing to Add a New Attributes

 

Now you will be able to configure the attribute.

 

Configuring the Attribute's properties

 

For the purpose of this tutorial we will configure a “Size” attribute which will require multiple selections from the different sizes.

 

Managing the Option Values of your Attribute

 

In the Advanced Attribute Properties you can setup:

 

  • Attribute Code The name of the attribute that will be used by the system
  • Scope – allows you to declare the attribute value saving scope like
  • Website - the value of this attribute for a product can be different in different Websites but have to stay the same between Store Views contained under the same Website.

Store View - the value of this attribute for a product can be different in all Websites and all Store Views

Website - the value of this attribute for a product can be different in different Websites but have to stay the same between Store Views contained under the same Website

Global - the value of this attribute for a product must be the same for all websites and stores

 

Configuring the Advanced Attribute Properties

 

  • Unique Value – Set this to Yes, if you want the data saved in this attribute to be unique for each product. If you have different products made of the same material or having the same feature, leave this to No
  • Input Validation for Store Owner – If you want to validate the data before applying changes to the attribute, select Yes
  • Add to Column Options – To add this attribute to the list of column options please select Yes
  • Use in Filter Options – If you set this to Yes the attribute will be added to the list of filter options

 

From the menu on the left, click on the Storefront Properties tab to configure the frontend behavior of the attribute.

 

Configuring the Storefront Properties of your Attribute

 

 To save your new attribute click on the Save Attribute button on the top right corner of your screen. This will bring you back to the attributes list page on which you should see your new attribute.