View Single Post
  #27  
Old 02-08-2005, 08:24 AM
 
mpj mpj is offline
 

Senior Member
  
Join Date: Feb 2005
Posts: 106
 

Default

great work pmstudios!

I've just started out on PHP so please forgive my noobness

As for
Code:
{manufacturer.image}
this would output the blob in raw GIF89 code.


Here's what I've done for displaying manufacturer's image:

in products.tpl

to display image:
Code:
[img]mlogo.php?manufacturerid={$manufacturerid.manufacturerid}[/img]

to display the manufacturer name and a link that display other products by the manufacturer:
Code:


in product.php
Code:
$manufacturer = func_query_first("SELECT manufacturer,image,image_type,manufacturerid FROM $sql_tbl[manufacturers] WHERE manufacturerid='$product_info[manufacturerid]'"); $smarty->assign("manufacturer", $manufacturer); $manufacturerid = func_query_first("SELECT manufacturerid FROM $sql_tbl[products] WHERE manufacturerid='$product_info[manufacturerid]'"); $smarty->assign("manufacturerid", $manufacturerid);


Thanks again pmstudios for an excellent code!
__________________
X-Cart 4.0.11


{My simple mods}
Adding Market list and % save on product detail
Quantity input box
Reply With Quote