
12-10-2006, 01:01 PM
|
|
|
|
 Senior Member
|
|
Join Date: Oct 2005
Location: Chile
Posts: 105
|
|
|
Re: get manufacture in products.php
Quote:
Originally Posted by BCSE
Someone came to me unable to get this code to work on their site and I wasn't able to fix it either so I created another way to do this.
To show the manufacturer on a per product basis on products.php you can also do this instead:
In products.php before:
Code:
$smarty->assign("products",$products);
Insert:
Code:
if($products)
{
foreach($products as $key=> $product)
$products[$key]["manufacturer"]= func_query_first_cell("select manufacturer from $sql_tbl[manufacturers] where manufacturerid=".$product["manufacturerid"]);
}
In skin1/customer/main/products_t.tpl or skin1/customer/main/products.tpl insert the following where you want the manufacturer to show up
Code:
{$products[product].manufacturer}
Hope that helps those who are stuck! A bit less code and less files to edit.
Carrie
|
no work in 4.1.x 
how can fix?
|
|