View Single Post
  #7  
Old 08-20-2008, 04:38 AM
  Piotr M.'s Avatar 
Piotr M. Piotr M. is offline
 

Senior Member
  
Join Date: Aug 2008
Posts: 134
 

Default Re: Display manufacturer logo in product.tpl

Quote:
Originally Posted by version
Do you think it's not working for me because of the typo ?

$thisManufactorer <-

$thisManufacturer ?? how are we supposed to use code with variable variables?

There is the same variable name in SQL query.
But table name is case sensitive.
So right php code is
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]["manufacturer"]);
$smarty->assign("m_image_path"$manufacturer[0]["image_path"]); 

tpl code to show manufacturer logo
Code:
{if $m_image_path ne ""} <img src="{$m_image_path}" />{/if}
__________________
Regards,
Piotr Markushin

X-Cart PDF Catalog Generator NEW
Professional X-Cart Skins Store (7 new skins added in August 2008!)

ahedOffice.com - Web 2.0 Online Groupware
Reply With Quote