ECSHOP购物流程收货人信息详细地址显示省市区

方法一:

1.在flow.php中的

elseif ($_REQUEST['step'] == 'checkout')
$_SESSION['flow_consignee'] = $consignee;
前,插入
	$sql = "SELECT concat( IFNULL(c.region_name, ' '), 
			IFNULL(p.region_name, ''), 
			IFNULL(t.region_name, ''), 
			IFNULL(d.region_name, '')) AS region " .
			" FROM " . $ecs->table('region') . " c, " . $ecs->table('region') . " p, " . $ecs->table('region') . " t, " . $ecs->table('region') . " d
			WHERE c.`region_id`='".$consignee['country']."'
			AND p.`region_id`='".$consignee['province']."'
			AND t.`region_id`='".$consignee['city']."'
			AND d.`region_id`='".$consignee['district']."'";
	
	$consignee['region'] = $db->getOne($sql);
2.在flow.dwt中
<!-- {if $step eq "consignee"} -->
里面,将
<td bgcolor="#ffffff">{$consignee.address|escape} </td>
修改为
<td bgcolor="#ffffff">[{$consignee.region|escape}]{$consignee.address|escape} </td>
效果如:


转载自:http://www.ecy.cc/News/show/c/1/id/206.html

方法2

1.includes\lib_order.php,在

function get_consignee($user_id)
里的
return $arr;
前,添加以下语句
        $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']." ";
		} 
2.在flow.dwt中
<!-- {if $step eq "consignee"} -->
里面,将
<td bgcolor="#ffffff">{$consignee.address|escape} </td>
修改为
<td bgcolor="#ffffff">[{$consignee.region|escape}]{$consignee.address|escape} </td>

效果如下:

转载自:http://www.jb51.net/article/22577.htm

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值