View Single Post
  #4  
Old 08-02-2012, 06:19 AM
 
fearnothing fearnothing is offline
 

Senior Member
  
Join Date: Jun 2005
Location: North East England
Posts: 124
 

Default Re: Including the manufacturer in the BestSellers Module

Answering my own query:

For 4.5 (and I presume 4.4)

above the line $smarty->assign("bestsellers", $bestsellers); on bestsellers.php

Enter the following

Quote:
# Manufacturer Name Mod

if (is_array($bestsellers)){
foreach($bestsellers as $k => $v) {
$bestsellers[$k]["manufacturer"] = func_query_first_cell("SELECT manufacturer FROM $sql_tbl[manufacturers] m inner join $sql_tbl[products] p on p.manufacturerid = m.manufacturerid WHERE productid ='$v[productid]'"); }}

# End Manufacturer Name Mod

Now the manufacturer name is available in menu_bestsellers.tpl as {$b.manufacturer}
__________________
www.smartchoicemusic.com
Smart Choice Music - Import CD and DVD Specialists
4.6.0
MySQL 5.5.34
PHP 5.4.24
Apache/2.2.26
Multiple homegrown and paid-for mods
Reply With Quote