ECShop地区列表将按字母顺序排列修改步骤
1.打开ECSHOP网店/includes/lib_common.php文件,找到如下代码
function get_regions($type = 0, $parent = 0) { $sql = 'SELECT region_id, region_name FROM ' . $GLOBALS['ecs']->table('region') . " WHERE region_type = '$type' AND parent_id = '$parent'"; return $GLOBALS['db']->GetAll($sql); }
将以上代码改成如下代码
function get_regions($type = 0, $parent = 0) { $sql = 'SELECT region_id, region_name FROM ' . $GLOBALS['ecs']->table('region') . " WHERE region_type = '$type' AND parent_id = '$parent' ORDER BY region_name ASC"; return $GLOBALS['db']->GetAll($sql); }
暂无评论,来发表一个吧