SOLVED: Including the manufacturer in the BestSellers Module
Just to answer my own question:
Using version 4.3, change lines 73 - 100 of bestsellers.php to:
if ($threshold)
$threshold -= 1;
$search_query['where'][] = " $sql_tbl[products_categories].categoryid IN ('".implode("','", $cat_ids)."')";
unset($result);
}
#
# Search the bestsellers
#
$search_query['where'][] = "$sql_tbl[products].views_stats > '0' AND $sql_tbl[products].sales_stats >= '".$threshold."'";
$search_query['fields'][] = "xcart_products.manufacturerid";
$bestsellers = func_search_products($search_query,
@$user_account["membershipid"],
"$sql_tbl[products].sales_stats DESC, $sql_tbl[products].views_stats DESC",
$config["Bestsellers"]["number_of_bestsellers"]
);
if ($bestsellers)
foreach ($bestsellers as $k => $v)
$bestsellers[$k]['manufacturer'] = func_query_first_cell("select manufacturer from $sql_tbl[manufacturers] where manufacturerid = '$v[manufacturerid]'");
$smarty->assign("bestsellers", $bestsellers);
?>
Now the manufacture name is available in the menu_bestsellers.tpl as
{$b.manufacturer}
__________________
4.3.0
|