Watch this video or read the tutorial below to understand more about Magento 2 Product Attributes.
Introduce Magento 2 Product Attributes
In this tutorial, we will illustrate how you can setup your products’ attributes. Attributes are an important part of your product catalog because each of them can help potential customers with choosing a certain product that corresponds to their needs. Users will also be able to search and compare products based on their attributes.
Your Magento 2 store includes predefined attributes such as Name, Price, and Description, that can be used for any product. In addition to these, you can create new custom attributes to improve your product information and help your clients with their choice. These are 4 simple steps to set up your product’s attribute.
How to add a Product Attributes
Login to your website administrator back-end dashboard. On the left menu slide bar, navigate to Stores >> Products.
On the Product Attributes dashboard, press “Add New Attribute” button.
Fill the necessary information in blank spaces.
There are 3 main tabs for you to set up your Product Attribute information: Properties; Manage Labels; Storefront Properties.
+ Properties: The Properties section includes both basic and advanced attribute properties.
+ Manage Labels: The label identifies an attribute in the Admin and also in the storefront of each store view. If your store is available in multiple languages, you can enter a different translated label for each language.
+ Storefront Properties: The Storefront Properties determine how an attribute can be used in your store, its appearance, and behavior. You can specify if attributes are available for search, layered navigation, product comparisons, price rules, and sorting. For text attributes, you can enable the WYSIWYG editor, and determine if HTML tags can be used to format the values.
Guide for Properties Tab:
|Default Label||The label that identifies the attribute during data entry.|
|Catalog Input Type for Store Owner||Determines the data type and input control that is used to manage the product from the store Admin.
Options include: Text Field; Text Area; Date; Yes/No; Multiple select; Dropdown; Price;…
|Values Required||To require that a value to be entered in this field before the record can be saved, set Values Required to “Yes.”|
|ADVANCED ATTRIBUTE PROPERTIES|
|Attribute Code (Required)||A unique identifier for internal use. The Attribute Code must begin with a letter, but can include a combination of lowercase letters (a-z) and numbers (0-9).|
|Scope||Limits the use of an attribute to a specific store view or website. Options include: Store View; Website, Global.|
|Default Value||Assigns a starting value to the attribute to help during data entry. To assign a default value for Multiple Select or Dropdown input types, see: Creating Attributes.
(A default value cannot be set for Multiple Select, Dropdown, or Fixed Product Tax input types).
|Unique Value||Set this to Yes, if you want the data saved in this attribute to be unique for each product. If you have different products made of the same material or having the same feature, leave this to No.|
|Input Validation for Store Owner||Performs a validation check of the data entered in the field, based on the following options: “None; Decimal Number; Integer Number; Email, URL, Letter …”|
|Add to Column Options||Determines if the column appears in the product grid.|
|Use in Filter Options||Determines if the attribute is used as a filter control at the top of columns in the grid.|
Guide for Storefront Properties Tab:
|Use in Search||Select “Yes” if you want people to be able to search the catalog based on the value of this attribute. The following attributes appear when Search is enabled:|
|[Search Weight]||To weight the search results, set Search Weight to a number from 1 to 5.|
|[Visible in Advanced Search]||Gives shoppers the ability to enter search criteria through a form. Options include: Yes / No.|
|Comparable on Storefront||Select “Yes” to include this attribute as a row in the Compare Products report. Options include: Yes/No.|
|Use In Layered Navigation||Includes the attribute as a filter in the “Shop By” section of layered navigation. Options include:|
|[No]||The attribute is not available to be used as a filter in layered navigation.|
|[Filterable (with results)]||Layered navigation includes only those filters for which matching products can be found. Any attribute value that already applies to all products shown in the list does not appear as an available filter.|
|The filtered list of products includes only those that match the filter. The products list is updated only if the selected filter(s) change what is currently shown.|
|[Filterable (no results)]||Layered navigation includes filters for all available attribute values and their product counts, including those with zero (0) product matches. If the attribute value is a swatch, the value appears as a filter, but is crossed out.|
|Use In Search Results Layered Navigation||To include the attribute in the layered navigation for search results, select “Yes”.|
|Position||Determines the position of the attribute in layered navigation in relation to other filterable attributes.|
|Use for Promo Rule Conditions||To make the attribute available for use in price rules, select “Yes”.|
|Allow HTML Tags on Storefront||(Text Field and Text Area input types only) To be able to format the attribute value with HTML tags, select “Yes”.|
|Visible on Catalog Pages on Storefront||(Simple and virtual products only) To include the attribute on the Additional Information tab of the product page, select “Yes”.|
|Used in Product Listing||Depends on the theme. To include the attribute in product summaries that appear in catalog listings, select “Yes”.|
|Used for Sorting in Product Listing||Depending on theme, includes the attribute as a “Sort By” option for catalog listings.|
Hit “Save Attribute” button.
One of the first steps when creating a product is to choose the attribute set that is used as a template for the product record. The attribute set determines the fields that are available during data entry, and the values that appear to the customer.
The attributes are organized into groups that determine where they appear in the product record. Your store comes with an initial attribute set called “default” which includes a set of commonly-used attributes. If you would like to add only a small number of attributes, you can add them to the default attribute set. However, if you sell products that require specific types of information, such as cameras, it might be better to create a dedicated attribute set that includes the specific attributes that are needed to describe the product.
To Create An Attribute Set
On the Admin sidebar, tap Store > Attribute Set.
Click on “Add Attribute Set” then do the following:
Enter a Name for the attribute set.
Set Based On to an existing attribute set to be used as a template.
Tap Save. The next page displays the following:
- The left column shows the name of the attribute set. The name is for internal reference, and can be changed as needed.
- The center of the page lists the current selection of attribute groups.
- The right column lists the selection of attributes that are currently not assigned to the attribute set.
To add a new attribute to the set, drag the attribute from the Unassigned Attributes list to the appropriate folder in the Groups column.
When complete, tap Save.
To Create A New Attribute Group
In the Groups column the attribute set, tap Add New.
Enter a Name for the new group, and tap OK.
Do either of the following:
+ Drag Unassigned Attributes to the new group.
+ Drag attributes from any other group to the new group.
-> The new group becomes a section of attributes in any product that is based on the attribute set.
Ready to foster your knowledge
Is your site still a mess and Magento extensions are not enough to save your site? Save your site with Magento Web Development Services now