The code below shows manufacturer logo as active link. If there is no logo, it shows manufacturer name.
Modified PHP:
PHP Code:
$thisManufactorer = $product_info["manufacturerid"];
$manufacturer = func_query("SELECT xcart_manufacturers.*, xcart_images_M.image_path, xcart_images_M.filename FROM xcart_manufacturers, xcart_images_M WHERE xcart_manufacturers.manufacturerid = xcart_images_M.id AND manufacturerid = $thisManufactorer");
$smarty->assign("manufacturer", $manufacturer[0]);
$smarty->assign("m_image_path", $manufacturer[0]["image_path"]);
TPL
Code:
<a href="manufacturers.php?manufacturerid={$manufacturer.manufacturerid}">
{if $m_image_path ne ""}
<img src="{$m_image_path}" />{else}{$manufacturer.manufacturer}{/if}</a>