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

New attribute to category
 
CBC
Member
 
Total Posts:  48
Joined:  2008-01-15
Spain
 

Hello,

I want create a new attribute (a new field image) for the categories, but i don’t find the way. I need help… please.

I did insert in eav_attribute that:
(454, 3, ‘small_image’, ‘’, ‘catalog_entity/category_attribute_backend_image’, ‘varchar’, ‘’, ‘catalog_entity/category_attribute_frontend_image’, ‘image’, ‘Small Image’, ‘’, ‘’, 1, 1, 0, 0, ‘’, 0, 0, 0, 0, 0, 0, 1, 0)

and i did write in app/code/core/mage/catalog/model/entity/setup.php that:
‘small_image’ => array(
‘type’ => ‘varchar’,
‘backend’ => ‘catalog_entity/category_attribute_backend_image’,
‘frontend’ => ‘catalog_entity/category_attribute_frontend_image’,
‘label’ => ‘Small Image’,
‘input’ => ‘image’,
‘class’ => ‘’,
‘source’ => ‘’,
‘global’ => true,
‘visible’ => true,
‘required’ => false,
‘user_defined’ => false,
‘default’ => ‘’,
‘searchable’=> false,
‘filterable’=> false,
‘comparable’=> false,
‘visible_on_front’ => false,
‘unique’ => false,
),

But, I don’t know that I has do more.

Thanks.

 
Magento Community Magento Community
Magento Community
Magento Community
 
CBC
Member
 
Total Posts:  48
Joined:  2008-01-15
Spain
 

I think that the problem is in:

$result = $this->getResource()
->loadAllAttributes($this)
->getAttributesByCode();

because when i display $result, the new field isn’t displayed.

Somebody know my error?

Thanks.

 
Magento Community Magento Community
Magento Community
Magento Community
 
CBC
Member
 
Total Posts:  48
Joined:  2008-01-15
Spain
 

Soluttioned:

I had than insert also in:
eav_entity_attribute

Thanks.

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