How to create Product Attributes in Magento2
A Product attribute is a characteristic that defines a particular product and will affect a consumer’s purchase decision. Product attributes can be tangible (or physical in nature) or intangible (or not physical in nature).
Magento Developers have given us the liberty to create as many attributes as we want for a product in Magento2. Each of the attributes will permit only one assigned input from the setting.
The steps that you need to follow to create Product Attributes are
Step 1: Add New Attribute.
Step 2: Complete the Attribute Basic Properties.
Step 3: Complete the Advanced Properties.
Step 4: Insert the Field Label.
Step 5: Complete the Storefront Properties.
Step 1: Add New Attribute.
- Find the Admin Panel click on Product » Inventory » Catalog.
- Choose the product you want to add attribute.
- Click on Add Attribute button. You can edit the existing attribute or create a new one by clicking on New Attribute.
Step 2: Complete the Attribute Basic Properties.
- In Default Label write the name of the attribute which will define it.
- Catalog Input Type for Store Owner here you upload a input type.
- For Drop down and Multiple Select, you will need to configure other sections too.
- Click on Add Option to enter the values on the list.Enter one admin value for the single store view, it will be used for the storefront as well, for multi store views enter one value for the Admin and a translation of the value for each store view.
- Click Value Required » select “YES” if you want to give customers an option before purchasing the product.
Step 3: Complete the Advanced Properties.
This is an optional step to add the new product attribute.
- In Attribute Code field add a code without space which is less than 30 characters.
- The Scope has 3 options a) Store View, b) Website, and c) Global ,place your product attribute accordingly.
- Select “yes ” if you want to give your product a unique value or else “no”.
- For the Input Validation for Store Owner select as shown in the picture below:
Step 4: Insert the Field Label.
- Here you are needed to add a title that can be used as a label for product Attributes.
- Add translation for the title for each view if your store support multiple language.
Step 5: Complete the Storefront Properties.
- In Use in Search click Yes to search the attribute.
- In the Comparable on Storefront field click Yes if you want to allow comparing the product attributes in Product Compare.
- If the catalog input field is Drop down, Multiple Select or Price, you can do the following:
Select Yes if you allow filtering the attribute in Use in Layered Navigation
if you Click Yes for Use in Search Results Layered Navigation to show the attribute in layered navigation on the search result .
Set the Position of the attribute in the layered navigation. - In the Use for Promo Rule Conditions click Yes to apply price rules in product attribute.
- In Allow HTML Tags to the Store Front set Yes to enable HTML format for the text (WYSIWYG editor is ready to edit the text all time).
In the Visible on Catalog Pages on Storefront choose Yes to make the attribute visible in catalog page listing. - Used in Product Listing will pertain the new attribute in product listing.
- Used for Sorting in Product Listing:Use the attribute as the sort parameter for product listing.
- Save Attribute when finished.
Thanks for reading.