how to add attributes for categories in magento

12
How To Add Attributes for Categories in Magento

Upload: digital-aptech-pvt-ltd

Post on 22-Jan-2017

202 views

Category:

Technology


3 download

TRANSCRIPT

Page 1: How To Add Attributes for Categories in Magento

How To Add Attributes for Categories in Magento

Page 2: How To Add Attributes for Categories in Magento

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

Step 1 -

Create new module

Page 4: How To Add Attributes for Categories in Magento

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

Step 2 -

Configure Module

Page 6: How To Add Attributes for Categories in Magento

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

Step 3 -

Create Attribute

Page 8: How To Add Attributes for Categories in Magento

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

Step 4 -

Check Results

Page 10: How To Add Attributes for Categories in Magento

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
Page 12: How To Add Attributes for Categories in Magento

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.