I have made a multiselect attribute called "Special"
For every value selection I have to show an image on the product page
I wrote the code below but it works only if I choose only one selection. When I choose more selections I have no image on fronted.
<?php $_product = $this->getProduct(); $specialName = $_product->getAttributeText('special'); $specialId = $_product->getSpecial(); ?> <?php if ($specialId) : ?> <img src="/media/catalog/special/<?php echo str_replace(' ', '_',$specialId); ?>.jpg" alt="<?php echo $specialName; ?>" title="<?php echo $specialName; ?>" /> <?php endif; ?>