Magento add new attribute options programatically and return the option id
Insert attribute option and return option id in Magento 1.x This article presents three methods to add attribute options in a loop and return the inserted option_id correctly. If you do this in a loop to add the options, you may find out that if you just try to getOptionId($value) on the attribute will return…