Imagine, that you have created new select type attribute and you add some manufacturers to it.
Now you may have a script that imports products and you have absolutely no idea which manufacturers do exist in that product feed
It seems obvious that every time there is a new manufacturer in the product import feed, then it needs to be added as new attribute option value.
Unfortunately Magento uses numeric ID-s to store such data, so we need a method which would return the attribute option ID and if needed, then the same method would automatically add the new attribute option value to the database and return newly created attribute option value id.
Read More