How to Create Product Attribute in Magento 2
Store owners can choose the way to create Attribute either during working on a product or from the Product Attributes page. In this topic I will introduce an easy way to create product attribute in Magento 2. Make sure you complete all three following steps to get the task done. You can add a new product attribute set here. Build a product recommendation system like Amazon, see how.
Following the easy guide given below to create product attribute in Magento 2
To Create Product Attribute in Magento 2
- Step 1: Complete Basic and Advanced Properties information
- Step 2: Manage Labels Enter the Field Label
- Step 3: Describe the Storefront Properties
Step 1: Complete Basic and Advanced Properties information
- On the Admin panel, click
Stores. In theAttributessection, selectProduct - Click
Add New Attributebutton - In the
Attribute Propertiessection, do the following

- In the
Default Label, enter a default label to indentify the attribute - In the
Catalog Input Type for Store Ownerfield, select the type in input control to be used for data entry- Text Field
- Text Area
- Date
- Yes/No
- Multiple Select
- Dropdown
- Price
- Media Image
- Fix Product Tax
- Visual Swatch
- Text Swatch
Note: If you use Dropdown and Multiple Select input types, do the following

- Under
Manage Optionssection, clickAdd Optionbutton

- Select Default if you use the option as the default value
- If you have only one store view, let enter only the Admin value and it will be used for the storefront as well
- If you have multi store views, let enter one value for the Admin and a translation of the value for each store view.
- Click on
Add Optionto create multi options that you want to include in the list - In the
Values Requiredfield, selectYesif you want to require the customers to choose an option before they can purchase products - In the
Advanced Attribute Propertiessection, complete the following (If needed)- In the
Attribut Codefield, enter a unique Attribute Code in lowercase characters, and without spaces. - In the
Scopefield, select one of the following to indicate where in your store hierarchy the attribute can be used- Website
- Store view
- Global
- In the
Unique Valuefield, set toYesif you want to prevent duplicate values from being entered - In the
Add to Column Optionsfield, set toYesto add this attribute to the list of column options in the product grid. - In the
Use in Filter Optionsfield, set to “Yes” to add this attribute to the list of filter options in the product grid.
- In the
Step 2: Manage Labels
- Open the
Manage Labelssection, do the following

- Enter a title to be used as a label for the field. If your store is available in different languages, you can enter a translated title for each view.
Step 3: Describe the Storefront Propertiesm
- Open the
Storefront Propertiessection, do the following

- In the
Use in Searchfield, set toYesif the attribute is to be available for search - In the
Comparable on Storefrontfield, set toYesto include the attribute in Product Compare - In the Use in Layered navigation field, set to
Yesif you want to use the attribute as a filter in layered navigation - In the
Use in Search Results Layered Navigationfield, set toYesif you want to use the attribute in layered navigation on search results pages - In the
Positionfield, enter a number to indicate the relative position of the attribute in the layered navigation block - In the
Use for Promo Rule Conditionsfield, set toYesto use the attribute in price rules - In the
Allow HTML Tags on Frontendfield, set toYesto allow the text to be formatted with HTML - In the
Visible on Catalog Pages on Storefrontfield, set toYesto include the attribute in catalog page listings - In the
Used in Product Listingfield, set toYesto include the attribute in product listings - In the
Used for Sorting in Product Listingfield, set toYesto use attribute as a sort parameter for product listings - When complete, click
Save Attributebutton.
Related Topics
Recent Tutorials
October 28, 2019
Magento 2 get customer address custom attribute value
June 05, 2019
How to Install Magento Extension via Composer
Comments for Create Product Attribute
People also searched for
- how to create attribute in magento 2
- magento 2 custom attributes
- magento 2 add attribute
- magento 2 manage attributes
- magento 2 product attributes
- how to create product attribute in magento 2
- how to add product attribute in magento 2
- magento 2 add attribute to product
- how to add attribute in magento 2
- magento 2 add product attribute
- magento 2 create product attribute
- create attribute in magento 2
- add new product attribute magento 2
- product attributes magento 2
- magento 2 product attribute
- product attributes in magento 2
- magento product attributes
- magento 2 edit attributes
- product attributes in magento
- magento product attribute
- add product attribute magento 2
- magento 2 create multi select product attribute programmatically
- create custom attribute in magento 2
- magento 2 custom product attribute
- magento 2 add attribute to product page
- 2.2.x, 2.3.x
Subscribe
Stay in the know
Get special offers on the latest news from Mageplaza.
Earn $10 in reward now!
Earn $10 in reward now!