| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Including the manufacturer in the BestSellers Module | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() 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
__________________
4.3.0 |
|||||||
#2
|
|||||||
|
|||||||
![]() 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 |
|||||||
#3
|
|||||||
|
|||||||
![]() 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.
__________________
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 |
|||||||
#4
|
|||||||
|
|||||||
![]() 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}
__________________
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 |
|||||||
#5
|
|||||||
|
|||||||
![]() 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 ?
__________________
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 |
|||||||
|
|||
X-Cart forums © 2001-2020
|