missing |
11-19-2010 01:03 PM |
Re: Display Manufacturer Name on Products Page
@Snowrev, that's pretty easy, if you're looking to do it on the individual product page edit the product.php ( not product s.php)
Somewhere above // Assign the current location line add:
HTML Code:
#Product Manufacturer Logos
$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"]);
#Product Manufacturer Logos End
Then add this code to your product.tpl page:
HTML Code:
<img src="{if $manufacturer.image_url ne ''}{$manufacturer.image_url|amp}{else}{$xcart_web_dir}/image.php?id={$manufacturer.manufacturerid}&type=M{/if}" alt="{$manufacturer.manufacturer|escape}" {if $manufacturer.image_x} width="{$manufacturer.image_x}"{/if}{if $manufacturer.image_y} height="{$manufacturer.image_y}"{/if} />
|