ecshop 订单确认中显示省市地址信息的方法
程序员文章站
2022-05-25 20:52:10
先添加显示这些信息: 1.修改lib_order.php文件的get_consignee函数(1798行) 添加如下代码在return前面: 复制代码 代码如下: $sql...
先添加显示这些信息:
1.修改lib_order.php文件的get_consignee函数(1798行)
添加如下代码在return前面:
$sql = "select region_name from ".$globals['ecs']->table('region') . " where region_id in(".$arr['country'].",".$arr['province'].",". $arr['city'].",".$arr['district'].")";
$address = $globals['db']->getall($sql);
foreach($address as $value)
{
$arr['address1'] .= $value['region_name']."-";
}
1.修改lib_order.php文件的get_consignee函数(1798行)
添加如下代码在return前面:
复制代码 代码如下:
$sql = "select region_name from ".$globals['ecs']->table('region') . " where region_id in(".$arr['country'].",".$arr['province'].",". $arr['city'].",".$arr['district'].")";
$address = $globals['db']->getall($sql);
foreach($address as $value)
{
$arr['address1'] .= $value['region_name']."-";
}