i created new attribute called 'brands' as dropdown menu have some values like "nike,puma,..." and added it to the default attribute set i try to get the attribute id to add it to product when insert new one

$brand_id = $this->attributeValueExists('brands',$pro->brand->name );
$product = Mage::getModel('catalog/product');

but i have error "Fatal error: Call to undefined method attributeValueExists() " Thank in Advance..


This function does not exist in a fresh Magento installation

I think you maybe copied that from, for instance, Checking for attribute value existence. What does this do?

In that case, you should copy that function code in the model / helper / block you are calling your posted code

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.