Get Drop Down list and Multi-Select values for Magento Product Attributes

Tuesday, 1. November 2011

Here is a quick snippet for retrieving the text values of Select (drop down list) and Multi-Select attributes for Magento Products.

Get attribute object – if you only have attribute code

$attribute = Mage::getSingleton('eav/config')->getAttribute('catalog_product', $_attribute_code);

Get Multi-Select Values

if($attribute->getFrontendInput() == 'multiselect') {
  $multiSelectArray = $_product->getAttributeText($_attribute);
  echo implode(', ',$multiSelectArray);

Get Drop Down list (Select) Value

if($attribute->getFrontendInput() == 'select') {
  echo $_product->getAttributeText($_attribute);


Leave a Reply

You must be logged in to post a comment.