X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Display Manufacturer Name on Products Page (https://forum.x-cart.com/showthread.php?t=56459)

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 products.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}&amp;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} />



All times are GMT -8. The time now is 06:58 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.