How to Create Product Attribute in Magento 2

magento-2-tutorial
how-to
create
product
attribute

Store owner 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 the easy way to create product attribute in Magento 2. Make sure you complete all three following steps to pass task.

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

Create Product Attribute

  • 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 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 indentify 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, let enter only the Admin value and it will be used for the storefront as well
  • If you have multi store view, let 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 customer 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.

Ref: Magento 2 User Guide



It comes to the end of tutorial: How to Create Product Attribute in Magento 2.

Please leave comments if you have any questions, feedbacks.

Comments for How to Create Product Attribute in Magento 2

You also may like these Magento 2 Extensions

One Step Checkout

$199
17 reviews

Layered Navigation

$149
7 reviews

Affiliate

$149
7 reviews

FAQ

$149
10 reviews

Zoho CRM

$249
no review

Store Locator

$199
no review

Shop By Brand

$99
no review

Better Blog

FREE
7 reviews