![Page 1: How To Add Attributes for Categories in Magento](https://reader030.vdocuments.us/reader030/viewer/2022021502/5884726e1a28ab5e248b4cd3/html5/thumbnails/1.jpg)
How To Add Attributes for Categories in Magento
![Page 2: How To Add Attributes for Categories in Magento](https://reader030.vdocuments.us/reader030/viewer/2022021502/5884726e1a28ab5e248b4cd3/html5/thumbnails/2.jpg)
The Magento admin panel lets you add attributes only for products. If you want to add attributes to a category, here’s what you have to do . . .
![Page 3: How To Add Attributes for Categories in Magento](https://reader030.vdocuments.us/reader030/viewer/2022021502/5884726e1a28ab5e248b4cd3/html5/thumbnails/3.jpg)
Step 1 -
Create new module
![Page 4: How To Add Attributes for Categories in Magento](https://reader030.vdocuments.us/reader030/viewer/2022021502/5884726e1a28ab5e248b4cd3/html5/thumbnails/4.jpg)
Initial configuration file is located in - ‘app/etc/modules/Dat_CustomCategoryAttribute’.Dat_CustomCategoryAttribute
It means that the module is active and it is located in the local code pool.
![Page 5: How To Add Attributes for Categories in Magento](https://reader030.vdocuments.us/reader030/viewer/2022021502/5884726e1a28ab5e248b4cd3/html5/thumbnails/5.jpg)
Step 2 -
Configure Module
![Page 6: How To Add Attributes for Categories in Magento](https://reader030.vdocuments.us/reader030/viewer/2022021502/5884726e1a28ab5e248b4cd3/html5/thumbnails/6.jpg)
The configuration file is not large at all, there are only 2 nodes.
The installed script helps us to create a new attribute.
In the node we defined the class for our install script which will be used for the extension.
Working with methods of this class helps us create, update, remove attribute (etc). And the node says that the script must be located in the folder with the same name
![Page 7: How To Add Attributes for Categories in Magento](https://reader030.vdocuments.us/reader030/viewer/2022021502/5884726e1a28ab5e248b4cd3/html5/thumbnails/7.jpg)
Step 3 -
Create Attribute
![Page 8: How To Add Attributes for Categories in Magento](https://reader030.vdocuments.us/reader030/viewer/2022021502/5884726e1a28ab5e248b4cd3/html5/thumbnails/8.jpg)
We create a new attribute in the category with label ‘Custom attribute ‘. This attribute is a text and it must be visible on the frontend.
![Page 9: How To Add Attributes for Categories in Magento](https://reader030.vdocuments.us/reader030/viewer/2022021502/5884726e1a28ab5e248b4cd3/html5/thumbnails/9.jpg)
Step 4 -
Check Results
![Page 10: How To Add Attributes for Categories in Magento](https://reader030.vdocuments.us/reader030/viewer/2022021502/5884726e1a28ab5e248b4cd3/html5/thumbnails/10.jpg)
Let’s clear cache and after this.
Go to Admin Panel –> Catalog –> Manage Categories –> General Information tab you will see a new attribute: ‘Custom attribute’
![Page 11: How To Add Attributes for Categories in Magento](https://reader030.vdocuments.us/reader030/viewer/2022021502/5884726e1a28ab5e248b4cd3/html5/thumbnails/11.jpg)
![Page 12: How To Add Attributes for Categories in Magento](https://reader030.vdocuments.us/reader030/viewer/2022021502/5884726e1a28ab5e248b4cd3/html5/thumbnails/12.jpg)
We create a new attribute in the category with label ‘Custom attribute ‘. This attribute is a text and it must be visible on the frontend.