Programmatically: How to create custom Magento attribute options
To create custom Magento attribute options programmatically, you can use the Mage_Eav_Model_Entity_Attribute_Api class. Here's an example code snippet that demonstrates how to create a custom attribute option:
Create a custom attribute option
require_once Mage::getModuleDir('models', 'Mage_Eav').DS.'Model'.DS.'Entity'.DS.'Attribute'.DS.'Api.php';
$attributeOption = new Mage_Eav_Model_Entity_Attribute_Api();
$attributeOption->createOption('my_attribute', 'My Option Value', 'My Option Text');