View Single Post
  #28  
Old 08-01-2006, 02:33 AM
  chamberinternet's Avatar 
chamberinternet chamberinternet is offline
 

X-Wizard
  
Join Date: Sep 2005
Location: Lancashire, UK
Posts: 1,471
 

Default

Ok ...

i've tried putting the addtional code in just before the smarty assign ..

but now i get a blank page..

the code i have in random.php is as follows:

// the database query
$query = "SELECT $sql_tbl[products].*, (SELECT MIN($sql_tbl[pricing].price) FROM $sql_tbl[pricing] WHERE $sql_tbl[pricing].productid=$sql_tbl[products].productid AND $sql_tbl[pricing].quantity=1 AND $sql_tbl[pricing].variantid = 0) AS price FROM $sql_tbl[products],$sql_tbl[pricing] WHERE forsale='Y' AND avail>0 ORDER BY RAND() LIMIT 6 ";

// give the product array to smarty to make it available sitewide.
$randoms = func_query($query);

if (is_array($randoms) && count($randoms) > 0) {
foreach ($randoms as $k=>$v) {
$randoms[$k]["tmbn_url"] = func_get_thumbnail_url($v["productid"]);
$randoms[$k]["taxes"] = func_get_product_taxes($randoms[$k], $login);
}
}
$smarty->assign("randoms",$randoms);

Can you help ?

Regards

Shafiq :sK
__________________
Developing in 4.7.x now (Dipping into v5 - Slowly!)
Have used 4.1.x, 4.2.x, 4.4.x, 4.5.x, 4.6.x & 4.7.x
Multiple Instances of X-Cart
MySQL 5.6.37
CentOS 7.4


Chamber Internet
- Lancashire, United Kingdom
http://www.chamberelancs.co.uk
Reply With Quote