Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Add Custom field in Magento Admin Category Management page
 
azizrattani
Jr. Member
 
Total Posts:  1
Joined:  2012-10-16
 

Hello,

Below you can find step by steInitial Steps:
• First run a select queries

o RUN: SELECT * FROM `eav_attribute_group` WHERE `attribute_group_name` = ‘[section name] ‘

[section name] will be replace with tab name you like to add that field .
• Write down `attribute_group_id` and `attribute_set_id` for future use

o RUN: SELECT * FROM `eav_attribute_set` where `attribute_set_id` = ‘[attribute set id]’

 [attribute set id] will be replace with one you get after first query.
• Write down `entity_type_id` for future use

• Execute Inster queries:

o INSERT INTO `eav_attribute`
(`entity_type_id`, `attribute_code`, `attribute_model`, `backend_model`, `backend_type`, `backend_table`, `frontend_model`, `frontend_input`, `frontend_label`, `frontend_class`, `source_model`, `is_required`, `is_user_defined`, `default_value`, `is_unique`, `note`)
VALUES
([Entity Type ID], ‘[Attribute Code]’, NULL, NULL, ‘varchar’, NULL, NULL, ‘text’, ‘[Attribute Label]’, NULL, ‘’, 0, 0, ‘0’, 0, ‘’);

 [Entity Type ID] will be replacing with one we get from second select sql query.
 [Attribute Code] will be your attribute filed name(without space; use _ if you want to add space in name)
 [Attribute Label] will be label you like to show on category page.

o RUN: SELECT * FROM ` eav_attribute ` WHERE ` attribute_code ` = ‘[Attribute code] ‘

 [Attribute code] will be replaced with name you set in above insert sql query.
• Write down ` attribute_id ` for future use

o INSERT INTO `mage_eav_entity_attribute`
(`entity_type_id`, `attribute_set_id`, `attribute_group_id`, `attribute_id`, `sort_order`)
VALUES
([Entity Type ID], [Attribute Set ID], [Attribute Group ID], 984, 4);

 [Entity Type ID] will be replacing with one we get from second select sql query.
 [Attribute Set ID] will be replacing with one you get after first select SQL query.
 [Attribute Group ID] will be replacing with one you get after first select SQL query.
 [Attribute ID] will be replacing with one you get after third select SQL query.

o INSERT INTO `mage_catalog_eav_attribute`
(`attribute_id`, `frontend_input_renderer`, `is_global`, `is_visible`, `is_searchable`, `is_filterable`, `is_comparable`, `is_visible_on_front`, `is_html_allowed_on_front`, `is_used_for_price_rules`, `is_filterable_in_search`, `used_in_product_listing`, `used_for_sort_by`, `is_configurable`, `apply_to`, `is_visible_in_advanced_search`, `position`, `is_wysiwyg_enabled`)
VALUES
([Attribute ID], NULL, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, ‘’, 0, 0, 0);

 [Attribute ID] will be replacing with one you get after third select SQL query.

p guidence for how to add custom field in Magento admin category page.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top