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中

 

      

 

里面,将

 

    "#ffffff">{$consignee.address|escape}   

 

修改为

 

    "#ffffff">[{$consignee.region|escape}]{$consignee.address|escape}   

 

效果如:

 

方法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中

 

      

 

里面,将

 

    "#ffffff">{$consignee.address|escape}   

 

修改为

 

    "#ffffff">[{$consignee.region|escape}]{$consignee.address|escape}   

 

效果如下:

转载:http://wwguofang.blog.163.com/blog/static/255357220149145624404/

 

你可能感兴趣的:(ECSHOP购物流程收货人信息详细地址显示省市区)