Magento 1.7/1.8 – How to Load Multiselect Attribute Values for Current Product

magento-1.7magento-1.8

I have problem when I try to load multiselect values for product. I have:

$product->getSportTypes()

But these can give me only "sport type" Ids, not and names. How to get names?

Best Answer

I suppose you want to display the value of the multiselect attribute named sport_types in the frontend. To do so you need to follow below steps:

$sportTypes = explode(",",$_product->getResource()
->getAttribute('sport_types')->getFrontend()
->getValue($_product));

foreach($sportTypes as $key => $value){
        echo $value;
    }