i use this code to assign a image to a drop product attribute named stock_status
(a dropdown att):
<?php $_stockStatus = $_product->getAttributeText('stock_status'); ?><img src="/media/atticons/<?php echo $_stockStatus; ?>.png">
every thing is allright .but in product pages which are not connected to this attribute or do not have any value of this attribute, a broken image with this location address will shown: mysite.com/media/atticons/.png
.
how to remove this image from product pages which are not connected to stock_status
attribute?