0

I am extending magento 1 category edit page, adding tab and fields. What is the best approach for this? Using built in EAV system or save the values in a custom table?

1 Answer 1

1

You need to used built in EAV system to save category field value.

You can create fields like this.

$installer->addAttribute(Mage_Catalog_Model_Category::ENTITY, 'attribute_id', array(
    'group'         => 'General Information',
    'input'         => 'select',
    'source'        => 'eav/entity_attribute_source_boolean',
    'label'         => 'Attribute Label',
    'backend'       => '',
    'visible'       => true,
    'required'      => false,
    'visible_on_front' => true,
    'global'        => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
));

This is sample code for you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.