zoukankan      html  css  js  c++  java
  • 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>  

    效果如:

    方法2

    1.includeslib_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://wwguofang.blog.163.com/blog/static/255357220149145624404/

  • 相关阅读:
    FZU 2272 Frog 第八届福建省赛 (鸡兔同笼水题)
    HDU 1166 敌兵布阵(线段树点更新区间求和裸题)
    poj 2251 Dungeon Master (BFS 三维)
    16 多校 8 Ball (贪心排序)很巧妙的思路啊~
    16 多校8 Rikka with Parenthesis II
    紫书动规 例题9-7 UVA
    紫书动规 例题9-6 UVA
    紫书动规 例题9-5 UVA
    紫书动规 例题9-4 UVA
    紫书动规 例题9-3 UVA
  • 原文地址:https://www.cnblogs.com/wawahaha/p/4728860.html
Copyright © 2011-2022 走看看