ECSHOP取得国家列表,如果有收货人列表,取得省市区列表

来源:互联网 发布:星球大战评价 知乎 编辑:程序博客网 时间:2024/04/29 22:59
//取得国家列表,如果有收货人列表,取得省市区列表
   foreach ($consignee_list AS $region_id => $consignee)   {       $consignee['country']  = isset($consignee['country'])  ? intval($consignee['country'])  : 0;       $consignee['province'] = isset($consignee['province']) ? intval($consignee['province']) : 0;       $consignee['city']     = isset($consignee['city'])     ? intval($consignee['city'])     : 0;   $consignee['district']     = isset($consignee['district'])     ? intval($consignee['district'])     : 0;//morestock_morecity       $province_list[$region_id] = get_regions(1, $consignee['country']);       $city_list[$region_id]     = get_regions(2, $consignee['province']);       $district_list[$region_id] = get_regions(3, $consignee['city']);   $xiangcun_list[$region_id] = get_regions(4, $consignee['district']);//morestock_morecity      }   /* 获取默认收货ID */   $address_id  = $db->getOne("SELECT address_id FROM " .$ecs->table('users'). " WHERE user_id='$user_id'");   //赋值于模板   $smarty->assign('real_goods_count', 1);   $smarty->assign('shop_country',     $_CFG['shop_country']);   $smarty->assign('shop_province',    get_regions(1, $_CFG['shop_country']));   $smarty->assign('province_list',    $province_list);   $smarty->assign('address',          $address_id);   $smarty->assign('city_list',        $city_list);   $smarty->assign('district_list',    $district_list);   $smarty->assign('xiangcun_list',    $xiangcun_list);//morestock_morecity   $smarty->assign('currency_format',  $_CFG['currency_format']);   $smarty->assign('integral_scale',   $_CFG['integral_scale']);   $smarty->assign('name_of_region',   array($_CFG['name_of_region_1'], $_CFG['name_of_region_2'], $_CFG['name_of_region_3'], $_CFG['name_of_region_4']));   $smarty->display('user_transaction.dwt');
PS:常用JS
-----JS返回---
返回页面: href="javascript:history.back(-1)
-----JS删除-----
<a href="javascript:void(0);" onclick="if (confirm('{$lang.confirm_drop_address}'))location.href='user.php?act=drop_consignee&id={$consignee.address_id}'""> 删除</a>

0 0
原创粉丝点击