0
votes

I want to add a custom column in “Attribute option” in “Manage Attribute Options” menu in admin. Like “value” column beside the position column in admin.

What I have done ...

  1. created a new filed in ”eav_attribute_option” table named “value” beside “sort_order” filed in database.

  2. changed ”magento\app\design\adminhtml\default\default\template\catalog\product\attribute\options.phtml” this file to show the “Value” column beside the “Position” column.

  3. changed ”getOptionValues()” method in this file ”magento\app\code\core\Mage\Eav\Block\Adminhtml\Attribute\Edit\Options\Abstract.php” to get data for my custom “value” column from database and show in admin side. It shows the default value of db in admin form.

* But when I want to save from admin panel the data doesn't save in db. Can anybody help which file I have to change to save the data of “Value” field into db? Can anybody please give any solution, which file or where have to change ?

1

1 Answers

0
votes

Try this one, go to:

  • magento\app\code\core\Mage\Eav\Model\Resource\Entity\Attribute.php

  • copy to local of course

  • find "protected function _saveOption"

  • copy how "sort_order" was being saved or inserted, so look on "$data" array.

i'm actually trying to figure this functionality for a while and you've gave the hints by giving which files needs to be modified, so thank you :)