I already loaded few custom attributes on the product list view. Now I want to show images instead of the attribute values.
I tried:
$filename= $_SERVER['DOCUMENT_ROOT'].'/media/catalog/brands/'.str_replace(' ', '_',$brand).'.jpg';
if (file_exists($filename)) {
echo '<img style="float: left; margin: 2px;" src="/media/catalog/brands/'.str_replace(' ', '_',$brand).'.jpg" alt="'.$brand.'">';
}
but it did not work.