Knowledgebase
[MODIFICATION] Change the search statistics to display the search terms sorted in the order from most to least searched.
Posted by - NA - on 01 December 2010 10:12 AM
|
|||||
This X-Cart modification will display the search terms in the Management -> Statistics -> Search statistics section sorted in the order from most to least searched. This can give you a better idea of the most used search phrases on your store. -------------------------------------------------------------------------------- admin/stats_search.php Find this code near line 65: $statistics = func_query("SELECT * FROM $sql_tbl[stats_search] as ss WHERE $date_condition ORDER BY date DESC LIMIT $first_page, $objects_per_page"); Change it to: $statistics = func_query("SELECT *, COUNT(*) as amount FROM $sql_tbl[stats_search] as ss WHERE $date_condition GROUP BY search ORDER BY amount DESC LIMIT $first_page, $objects_per_page"); skin1/admin/main/atracking_search.tpl Find this code near line 31: | {$lng.lbl_search_string} | Count | {$v.date|date_format:$config.Appearance.datetime_format} | {$v.amount} | |
---|---|---|---|---|---|
|
Comments (0)