方法一:

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>  

 

效果如:

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

 

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

 

效果如下:

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

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

 

相关文章:

  • 2021-11-16
  • 2021-08-19
  • 2021-10-12
  • 2022-12-23
  • 2022-01-28
  • 2022-12-23
  • 2021-11-14
猜你喜欢
  • 2021-11-12
  • 2023-02-07
  • 2021-11-01
  • 2021-06-21
  • 2021-07-28
  • 2022-12-23
  • 2022-01-21
相关资源
相似解决方案