Download the template for two development, do not know whether it is ecshop own bug or template has been changed, the background can not set TOP10 display bar number, only show 5 data.
After some Baidu, not fruit, began to look at the call template \library\top10_goods.lbi, there is no control to display the number of statements.
Prior to understanding the template mechanism, is pre-set in the index.php template call array data, found in 127 rows: $smarty->assign (' Top_goods ', GET_TOP10 ()); Sales ranking
OK, this confirmation is the function get_top10 ();
But ctrl+f incredibly index.php not, OK, don't know how to come, with EditPlus Direct file Lookup function statement. \includes\lib_goods.php
The target function was found in line 164 of \includes\lib_goods.php, and OK is close to the target.
Well? Seems to be the global variable, again Baidu, found the place for global variable settings: \lib_common.php
The amount!! Why is 10, but the front desk can only call 5 data, to now do not understand, it may be the original template author where the changes have been made.
No way, only return to \includes\lib_goods.php
Directly modify the number of control bar numbers in the SQL statement:
Front desk refresh, OK, can use.
Always do the front end, rarely do PHP development, the first time with ecshop two times development, avoid strong first use O (∩_∩) o haha ~
The above describes the Ecshop home Top10 the number of changes, including the content, I hope that the PHP tutorial interested in a friend helpful.