I have this code:
<?php
$multiSelectArray = $this->getProduct()->getAttributeText('color');
$lastItem = end($multiSelectArray);
foreach($multiSelectArray as $multiSelectItem){
echo $multiSelectItem;
if($multiSelectItem != $lastItem) echo ", ";
}
?>
to get multi-select attribute options in category list page.
My problem is that it don’t show the attribute if there is only one option in the multi-select
Help !
Problem solved because the only one option was a string, I have tested, if(is_string)…….. show the first option 😉