Magento Forum

   
how do i create attributes for categories
 
NafeX
Member
 
Total Posts:  47
Joined:  2007-12-18
 

is it possible to create attributes for categories? i.g. more images or a second description…

how do i add 2 images to a category?

thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
bmartus
Sr. Member
 
Total Posts:  128
Joined:  2008-05-22
Greenville, TX
 

You can add whatever content you want to a category by assigning a static block to it.  Once you choose the static block in the category editor, that block will appear above the product listing (if you’ve chosen to show products).

Play with ‘Display Mode’ and ‘CMS Block’ in the category editor, to see what you can accomplish.

 
Magento Community Magento Community
Magento Community
Magento Community
 
BoostMyShop
Sr. Member
 
Avatar
Total Posts:  152
Joined:  2008-06-11
France
 

magento admin interface only allow to create attributes for product.
However, as category is an EAV ENTITY (take a look at the table eav_entity_type), u can add attributes to it through the database or maybe programmatically.

EDIT: i had a look on a setup script and i found this:

$installer->startSetup();
$installer->addAttribute('order','fianet_evaluation',array('type' => 'int','visible' => true));

 
Magento Community Magento Community
Magento Community
Magento Community
 
Brandlive_br
Guru
 
Avatar
Total Posts:  653
Joined:  2008-05-19
Buenos Aires, Argentina
 

I made a change to the categories attributes inserting my own records on eav_* tables.

The tables that I used was: eav_attribute and eav_entity_attribute.

I you add an attribute there, the backend it will show you dinamically the new attribute.
The problem that a got ws the frontend. In this case, We wrote some changes to read the new attrbitue for categories.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Brandlive_br
Guru
 
Avatar
Total Posts:  653
Joined:  2008-05-19
Buenos Aires, Argentina
 

I’m reading my post… I have to say… my keyboard has some AI. (LOL)
In the last line I try to say:

“The problem that We got was in the frontend. In that case, We wrote some changes to read the new attribute for categories”.

I hope that you can understand me.
Sorry, but I’m really out of practice with my enlgish.

 
Magento Community Magento Community
Magento Community
Magento Community
 
NafeX
Member
 
Total Posts:  47
Joined:  2007-12-18
 

thank you all grin

 
Magento Community Magento Community
Magento Community
Magento Community
 
Michal_s
Sr. Member
 
Total Posts:  111
Joined:  2008-05-15
The Netherlands
 

could this method maybe be explaind a bit more, i also want to add more attributes to my categorys but not trough the cms static blocks

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