ecshop模板如何让浏览历史按照先后排序?
ecshop模板的浏览历史默认是按照id来排序的,,怎么样才能让浏览历史按照先后进行排序,其实很简单:打开includes/lib_insert.php,找到insert_history()函数里的" WHERE $where AND is_on_sale = 1 AND is_alone_sale = 1 AND is_delete = 0";修改为" WHERE $where AND is_on_sale = 1 AND is_alone_sale = 1 AND is_delete = 0 order by INSTR(‘".$_COOKIE[‘ECS’][‘history’]."’,goods_id)";
这样就完成了。
大多数人想要改造这个世界,但却罕有人想改造自己。