Who would know how to check if an attribute exists in magento before adding options to it?
Thanks a lot!
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.
Sign up to join this communityYou should be able to do something like:
$entity = 'catalog_product';
$code = 'status';
$attr = Mage::getResourceModel('catalog/eav_attribute')
->loadByCode($entity,$code);
if ($attr->getId()) {
// atttribute exists
}