How to Add & Manage Products in Magento (Attributes) - Part 3
What is "Attributes"?
Attributes are the block of a product in a catalog which enable customers to point the existing characteristics of a product.
You are allowed to create as many attributes as you need for a product in Magento 2 configuration.
The data entry fields that you complete when adding a new product to your catalog are attributes. Attributes provide the customer with product information, and can also be used as search criteria and to present a selection of options.
The Magento store includes predefined attributes such as Name, Price, and Description, that can be used for any product. In addition to these, you can create custom attributes to describe other characteristics a product might have.
Here's how you can add or manage a product attributes:
Login to your Magento administrator dashboard and click on Catalog >> Products.
In the Product Detail page, you may click on the Edit link under the "Action" column. In our example, we shall add a new attribute for the cPanel Semi-Pro package by clicking on the edit link as shown below:
Click on Add Attribute button.
Click on Create New Attribute button.
You shall arrive at the page which shows the following details: Attribute Properties, Advanced Attribute Properties, Manage Titles (Size, Color, etc.) and Storefront Properties.
Here's what contained under Attribute Properties:
Attribute Label: Insert your own attribute label here e.g. Size
Catalog Input Type for Store Owner: Choose the type of the input from this list. We choose Text Field.
Required: Choose either Yes or No. We choose No.
You may play around with the settings inside each of these drop down boxes
For our e-commerce store, you may follow our settings as shown in this screenshot above. However, if you do not want to follow our settings, you may set your own configuration.
Next, we shall move on to Advanced Attribute Properties section. Here you may edit or leave the default settings as it is.
These are the things you need to know:
The Scope - This includes Store View, Website, and Global. You will choose one of three places in your store system where the appearance of attribute is approved.
Apply the Unique Value if you not want to share it with other products.
Choose the type of data that is filled into a text field from a list of the Input Validation for Store Owner. The following input types are valided:
Decimal Number
Integer Number
URL
Letters
Letters (a-z,A-Z) or Number (0-9)
Enter the title for Manage Titles (Size, Color, etc.). In our case, it's Size.
Next, you need to complete Storefront Properties. In our sample, we only switched on Visible on Catalog Pages on Storefront while leaving the rest in their default setting .
Press the Save Attribute button at the top right corner to save changes.
After saving the changes, remember to clear the Magento cache
This time going to to the product list, you shall see the "Size" appearing under Attributes section as seen below.
We shall type Large, Medium, Small, Tiny into the blank space and press the Save button at the top right corner.
Now you need to clear both Page Cache and Flush Magento Cache . Next, you open a new web browser and type in your full website URL and using the search bar to search for your product. In our case, we search "cPanel" as highlighted below.
Next, click on your product image.
Now scroll down to the bottom and you shall notice a new tab called More Information. Click it once and you shall see the new attribute called "Size: Large, Medium, Small, Tiny".
Congratulations! You have now created attributes for your products.
You may repeat the same steps to create other attributes such as Colour, Location, Weight etc.
To do this, you need to click on Stores >> Product (under Attributes).
Click on Add New Attribute button.
In our example, we are using "Colour" as the new attribute. Here's what we did for Properties, Manage Labels and Storefront properties. Press the Save Attribute button to save changes.
Once you're done, repeat Step 1 to Step 3 of this tutorial again.
Check the box for "Colour" which we have created in Step 16 before clicking Add Selected button.
NOTE: Select "Colour" attribute that have "Storefront view" enabled.
To see the latest attribute addition, you need to repeat step 10 and 11.
Here's how our Attributes look like in our Magento dashboard.
That's the end of this long tutorial regarding creation and adding new attributes for our products!
Updated on: 16/04/2019
Thank you!