We use cookies to make your experience better. To comply with the new e-Privacy directive, we need to ask for your consent to set the cookies. Learn more.
How to add an custom attribute in Magento 2
The products attribute in Magento 2 is basically the properties of the products which help the customers to choose the different sizes, colors, and weights, etc.
Magento 2 allowed us to create the attribute as many as we want. We have can choose any type for our attribute like dropdown, visual swatch, etc. In this blog, we are making an attribute that has the dropdown type.
In order to make this attribute for your product follow the following steps.
- First of all, open the Magento 2 admin or dashboard and click on the store at the bottom of the left sidebar.
- Then new menu shows now click on the product under the attribute.
- Then click on the new attribute at the top right of the page and a new page will open which is look like this.
- Now give a name to your attribute in the input label. I give a name Example to the attribute and then select the type of attribute. I select the dropdown type for this attribute you can choose any type you want.
- Now configure the Advanced properties give the Attribute Code to your attribute. If you don't give an Attribute Code Magento 2 will automatically generate the attribute code as the default label name.
Choose the scope value for your attribute. Magento 2 is a multi-language platform. If you don’t want the attribute value to depend on a website or any language. It is better to choose the Globe option. - If you want to use your attribute in rule conditions for cart prices. Choose Yes in the Use for Promo Rule Conditions.
Choose Yes in the Visible on Catalog Pages on storefront if you want to display your attribute on the product page in additional options.
If you want to add an attribute value in a PHP product object Choose Yes in the Use in the Product listing.
For sorting orders choose Yes in Used for Sorting in the Product listing. - Now configure the storefront properties for this according to your need. By default, the use in search option is No.
- Now Click on the Save Attribute button
- After click on the save attribute, you will see the popup message that your attribute is saved. If you don’t find your attribute here you can simply search your attribute by your attribute code as I did you can see in the image below.
If you need a Magento Developer, visit Magento Development Agency.
Recent post
new admin user
magent 2.4
add new admin user using front-end
add new admin user using command line
admin user role
user role in magneto 2.4
magento 2.4
custom attribute
related products
product page
category
sub-category
how to add simple products
simple products
products in magento2
how to add simple products in magento2
Magento
store url
Full Page Cache
Translate CMS Pages
configurable product
how to add configurable product in magento2
magento2
magento2 products
eCommerce
Product Attribute Set
favicon
Import Products
Rss Feeds
how to configure rss feeds in magento 2
configuration of rss feeds
magento 2 structure
magento directory structure
module structure
magento design structure
theme structure of magento 2
e-commerce
magento2 agency
product
security
magento 2
attribute
CMS
block
admin-user
admin-role
product-attribute
page-cache
customize url
store
base url
CMS pages
basic structure
theme structure
design structure
root folder
migration
upgraded
speed up
improvements
seperate database
magento 1
shopify
new admin
create admin
elasticsearch
catalog search
simpleproduct
css
javascript
merge css
merge javascript
enable css
enable javascript
newsletter
php 8
compatibility
Multiple Stores
remarketing
boost sales
upsell-products
cross-sell products
payment method
check method
money order method
stock
product stock
configuration
Secure your Admin
VAT
tax classes
email logo
shipping policy
create new API
configure free shipping method
delete order in magento 2
features
magento store scope
cdn
cms-page
ux
uxdesign
magento-ux
ui-vs-ux
uidesign
user experience
product-list
uxscope
promote
marketing
SEO
Configure Email
Order Confirmation
redirect buyer
header
footer
layered-navigation
magento 2 store in multiple languages
inbox
message
Cancel order
edit order
magento and microsoft dynamics
integration
magento-theme
magento-layout
layout
magento-commerce
remove order
magento-store
magento-website
switch to Magento
Welcome message
Influence of Marketing
stock message
contact us form
contact email
admin login captcha
single store mode
single store
store view
magento installation
flat rate
shipping method
contact form
recaptcha
marketing plan
CSP
XSS
adding store view
magneto 2
B2B
B2C
D2C
Magento Commerce
Magento Commerce Cloud
guidepost
Small Business
Country Options
Magento Open Source
Product Search
magento-2-tutorial
rewrites
ecommerce agency
schedule design
customer account
magento hosting
hosting
magento configuration
Insert Images
magento developer
sales email
email configuration
Advanced Inventory
Warehouse
copyright
magneto copyright
copyright notice
update copyright
magento email store
store email address
update email address
Locale Option
programmatically
module
magento module
CMS Static Block
controller in magento2
magento controller
Override php file
plugin
plugin in magento2
helper function
magenot 2
call helper in phtml file
Backup Store
Magento Admin Panel
admin menu
model in magento
invoice in magento2
create invoice
Dependency Injection
di.xml
cronjob
cronjob in magento2
Api
events
event in magento2
Change
Default Icon
Menu Items
Backend
widget in magento 2
widget
custom widget
Add Store Demo
Api in magento 2
Run Compile Commad
custom tab
Mass Actions in magento 2
override classes
preference
helper in magento2
featured products
custom helper
checkout in magento 2
checkout page
customer collection
product collection
wishlist products collection
order collection
review in magento 2
rating in magento 2
review collection
rating collection
recent product collection
ui form
form in magento 2
magento 2 configuration
magento 2 fields
delete action in magento 2
edit action in magento 2
disable payment method
custom discount
virtual type
log
custom log
log file
eav attribute
installschema
database
product schema
production mode
indexer
reindexer
reindex magento 2
indexer magento 2
magento2 installation
email customization
custom email
email in magento 2
indexing
cart rules
catalog price rule
magento 2 catalog
currency in magento 2
command
console command
command in magento 2
store information in magento 2
extend layout
homepage
url in magento 2
error
google shopping feed
feed
magento2 feed
reindex magento 2 programatically
custom indexer
custom indexer for magneto 2
Magento 2 UX
Benefits of Magento 2 UX
magento 2 edit order
cancle order in magento 2
remove order in magento 2
update order in magento 2
magento 2 free shipping rule