How to Create Product Attribute in Magento 2

The Most Popular Extension Builder for Magento 2

With a big catalog of 234+ extensions for your online store

Product Attributes are items’ characteristics to set the products apart. Customers therefore can find the option they want based on looking at factors like color, size, material, or weight, etc. of the product. Once you create product attributes in Magento 2, you can upgrade customers’ experience and speed up their product search process. You can also use these attributes for further configuration relating to categories or CMS blocks.

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, or if you want to build a product recommendation system like Amazon, see how.

Following the easy guide given below to create product attribute in Magento 2

3 Steps to Create Product Attribute in Magento 2

Step 1: Complete Basic and Advanced Properties information

  • On the Admin panel, click Stores. In the Attributes section, select Product
  • Click Add New Attribute button
  • In the Attribute Properties section, do the following

How to Create Product Attribute

  • In the Default Label, enter a default label to identify the attribute
  • In the Catalog Input Type for Store Owner field, 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

How to Create Product Attribute

  • Under Manage Options section, click Add Option button

How to Create Product Attribute

  • Select Default if you use the option as the default value
  • If you have only one store view, enter only the Admin value and it will be used for the storefront as well
  • If you have multi store views, enter one value for the Admin and a translation of the value for each store view.
  • Click on Add Option to create multi options that you want to include in the list
  • In the Values Required field, select Yes if you want to require the customers to choose an option before they can purchase products
  • In the Advanced Attribute Properties section, complete the following (If needed)
    • In the Attribut Code field, enter a unique Attribute Code in lowercase characters, and without spaces.
    • In the Scope field, select one of the following to indicate where in your store hierarchy the attribute can be used
      • Website
      • Store view
      • Global
    • In the Unique Value field, set to Yes if you want to prevent duplicate values from being entered
    • In the Add to Column Options field, set to Yes to add this attribute to the list of column options in the product grid.
    • In the Use in Filter Options field, set to “Yes” to add this attribute to the list of filter options in the product grid.

Step 2: Manage Labels

  • Open the Manage Labels section, do the following

How to Create Product Attribute

  • 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 Properties

  • Open the Storefront Properties section, do the following

How to Create Product Attribute

  • In the Use in Search field, set to Yes if the attribute is to be available for search
  • In the Comparable on Storefront field, set to Yes to include the attribute in Product Compare
  • In the Use in Layered navigation field, set to Yes if you want to use the attribute as a filter in layered navigation
  • In the Use in Search Results Layered Navigation field, set to Yes if you want to use the attribute in layered navigation on search results pages
  • In the Position field, enter a number to indicate the relative position of the attribute in the layered navigation block
  • In the Use for Promo Rule Conditions field, set to Yes to use the attribute in price rules
  • In the Allow HTML Tags on Frontend field, set to Yes to allow the text to be formatted with HTML
  • In the Visible on Catalog Pages on Storefront field, set to Yes to include the attribute in catalog page listings
  • In the Used in Product Listing field, set to Yes to include the attribute in product listings
  • In the Used for Sorting in Product Listing field, set to Yes to use attribute as a sort parameter for product listings
  • When complete, click Save Attribute button.

The bottom line

Based on Product Attributes in Magento 2, customers can easily identify the suitable product, and therefore have a quicker decision-making process. In addition, stores can use it for configuration such as CMS Block or Category. This tutorial hopefully gives you enough details to conduct the task. If you need more help, please chat with us.

Looking for
Customization & Development Services?

8+ years of experiences in e-commerce & Magento has prepared us for any challenges, so that we can lead you to your success.

Get free consultant
development service

Explore Our Products:

People also searched for

Subscribe

Stay in the know

Get special offers on the latest news from Mageplaza.

Earn $10 in reward now!

Earn $10 in reward now!

comment
iphone
go up