How to create Product Attributes in Magento 2?
In this section, we will discuss the product attribute in Magento 2 and how we can set up our products attributes. Attributes are an essential part of our product catalog because each product attribute helps the customers to choose certain products corresponding to their needs. The user will be able to search and compare the products with other products based on their attributes.
Magento 2 store already has some predefined attributes such as Name, Price, and Description. Apart from these, we can also create new custom attributes to enhance the product information, and help the customer with their choice. The additional attributes of any products are like color, size, etc.
The store owner can create the Attribute either during working on a product or from the Product Attribute page. The product attribute can also be created from the Store menu or from the Product Detail Page, where we work on a product. Below some set of instructions are given through which we will learn how to create product attributes in Magento 2.
How to add a product attribute?
Step 1: Login to the Magento 2 Admin Panel. On the left sidebar of the Magento 2 dashboard, click on Stores. Select Product inside the Attribute section, i.e., Stores >> Product.
Step 2: On the Product attribute dashboard, click on Add New Attribute.
Step 3: Fill the required information in the given fields.
There are three sections, in which we need to set up the Product Attribute information. These sections are Properties, Manage Labels, and Storefront Properties.
Properties: This section includes both basic and advanced properties of attributes.
Manage Labels: Label identifies an attribute in the admin as well as in the storefront of each store view. We can enter a different translated label for each language if our store is available in multiple languages.
Storefront Properties: The Storefront properties tab determines how an attribute can be used in our store, its behavior, and appearance. We can specify whether attributes are available for search, product comparisons, layered navigation, rules, price, and sorting. For text attribute, we can enable the WYSIWYG editor, and determine if the HTML tags can be used to format the values.
Now, we will discuss each section individually in detail.
Step 1: Complete the basic and advance properties information
In the Attribute Properties do the following:
Note: If you use Multiple Select or Drop-down, you need to configure another section so, do the following
Click on Add Option button under the Manage Options section, and add the different options to the customer to choose.
Mark the Is Default checkbox, if you want to use it as a default value.
If we have only one store view, then enter only Admin value, which will be used for the storefront as well.
Advanced Attribute Properties
Step 2: Manage Labels
Step 3: Complete the Storefront Properties
After completing all the required information, click on Save Attribute to save the details.