I need to create New Label Icon for selected categories, How can I create labels like,
Hi @Jeeva Rathinam,
Maybe you can create a module with install scripts to add a new attribute for your category.
If you only need to show as new (or not) you can create a yes/no attribute for categories:
$installer = $this; $installer->startSetup(); $installer->addAttribute('catalog_category', 'test_yes_no', array( 'type' => 'int', 'backend' => '', 'frontend' => '', 'label' => 'Test Yes/No', 'input' => 'select', 'class' => '', 'source' => 'eav/entity_attribute_source_boolean', 'global' => 1, 'visible' => 1, 'required' => 0, 'user_defined' => 0, 'default' => '', 'searchable' => 0, 'filterable' => 0, 'comparable' => 0, 'visible_on_front' => 0, 'unique' => 0, 'position' => 1, )); $installer->endSetup();
If you need to add different images/icons, maybe you'll need another type of attribute:
$installer = $this; $installer->startSetup(); $installer->addAttribute('catalog_category', 'test_picture', array( 'type' => 'varchar', 'backend' => 'catalog/category_attribute_backend_image', 'frontend' => '', 'label' => 'Test Picture', 'input' => 'image', 'class' => '', 'source' => '', 'global' => 0, 'visible' => 1, 'required' => 0, 'user_defined' => 0, 'default' => '', 'searchable' => 0, 'filterable' => 0, 'comparable' => 0, 'visible_on_front' => 0, 'unique' => 0, 'position' => 1, )); $installer->endSetup();
Then you'll need to edit the html part of the menu to show your new value with the category name.
I am new for magento, could you pls guide me step by step.
If you don't know how to build a module from scratch maybe this post can help you. Is in spanish but you can use GTranslate: http://www.damianculotta.com.ar/2011/08/17/como-agregar-atributos-a-una-categoria-en-magento/
With that information you'll be able to add a custom attribute to your categories
I did completely what you told, but not working, cached and reindexed. magento ver : 1.9.2.3