![]() |
Including the manufacturer in the BestSellers Module
Hi,
I would like the Best Sellers module to list: product by manufacturer. I couldn't figure out how to access the manufacturer variable? Can anyone help Thanks heaps, redidesi |
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} |
Re: Including the manufacturer in the BestSellers Module
Resurrecting a very old thread here, but has anyone made this work in 4.4/4.5 ?
Threads elsewhere in the forum about manufacturers displaying on product and search pages are very helpful, but I can't seem to get this one cracked. |
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:
Now the manufacturer name is available in menu_bestsellers.tpl as {$b.manufacturer} |
Re: Including the manufacturer in the BestSellers Module
Hmmm ... Just started testing 4.6 and the manufacturers name mod has stopped working. Does anyone have an idea what has changed in 4.6 ?
|
All times are GMT -8. The time now is 11:24 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.