View Single Post
  #4  
Old 09-05-2003, 10:34 AM
 
funkydunk funkydunk is offline
 

X-Man
  
Join Date: Oct 2002
Location: Cambridge, UK
Posts: 2,210
 

Default

Getting it into products_t.tpl is flipping difficult.

It is down to the included php files in the products.php being different to those in product.php. But is would be mightily hard to bring them into loops.

Best bet is to amend the sql query that search products in products.php to something like:

Code:
$products = func_query("select $sql_tbl[products].*, MIN($sql_tbl[pricing].price) as lowestprice, MAX($sql_tbl[pricing].quantity) as quantity from $sql_tbl[products], $sql_tbl[pricing] where $sql_tbl[products].productid=$sql_tbl[pricing].productid AND $sql_tbl[pricing].quantity > 1 AND $sql_tbl[products].categoryid='$cat' AND $sql_tbl[products].forsale='Y' and $avail_condition ($sql_tbl[pricing].membership='$membership' or $sql_tbl[pricing].membership='') group by $sql_tbl[products].productid order by orderby");
The selecting of the lowest price is doen in the sql query. It might be easier.

hope this helps you along the way.
__________________
ex x-cart guru
Reply With Quote