收货地址 去掉国家省市
1 \themes\default\user_transaction.dwt
简单的说 前3个下拉菜单隐藏 最后一个显示 直接显示固定的国家省市 隐藏以前的代码
在 <!--{if $action eq 'address_list'} --> 下面的
<select name="country" id="selCountries_{$sn}" onchange="region.changed(this, 1, 'selProvinces_{$sn}')" style="display:none">
<option selected="" value="1">中国</option>
<!-- <option value="0">{$lang.please_select}{$name_of_region[0]}</option>
<!-- {foreach from=$country_list item=country} -->
<option value="{$country.region_id}" {if $consignee.country eq $country.region_id}selected{/if}>{$country.region_name}</option>
<!-- {/foreach} -->-->
</select>
<select name="province" id="selProvinces_{$sn}" onchange="region.changed(this, 2, 'selCities_{$sn}')" style="display:none">
<option value="18">辽宁</option>
<!-- <option value="0">{$lang.please_select}{$name_of_region[1]}</option>
<!-- {foreach from=$province_list.$sn item=province} -->
<option value="{$province.region_id}" {if $consignee.province eq $province.region_id}selected{/if}>{$province.region_name}</option>
<!-- {/foreach} -->-->
</select>
<select name="city" id="selCities_{$sn}" onchange="region.changed(this, 3, 'selDistricts_{$sn}')" style="display:none">
<option value="254">辽阳</option>
<!-- <option value="0">{$lang.please_select}{$name_of_region[2]}</option>
<!-- {foreach from=$city_list.$sn item=city} -->
<option value="{$city.region_id}" {if $consignee.city eq $city.region_id}selected{/if}>{$city.region_name}</option>
<!-- {/foreach} -->-->
</select>
<select name="district" id="selDistricts_{$sn}" {if !$district_list.$sn}style="display:"{/if}>
<option value="0">{$lang.please_select}{$name_of_region[3]}</option>
<!-- {foreach from=$district_list.$sn item=district} -->
<option value="{$district.region_id}" {if $consignee.district eq $district.region_id}selected{/if}>{$district.region_name}</option>
<!-- {/foreach} -->
</select>
2 \user.php
约942行附近
//取得国家列表,如果有收货人列表,取得省市区列表
foreach ($consignee_list AS $region_id => $consignee)
{
// $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']);
$province_list[$region_id] = get_regions(1, 1); //国家
$city_list[$region_id] = get_regions(2, 18); //省
$district_list[$region_id] = get_regions(3, 254); //市
-------------------------------------------------------------------------------------------------------------
首次购物 登记地址去掉国家省市
1 \flow.php
找到 elseif ($_REQUEST['step'] == 'consignee') 位置下面
/* 取得每个收货地址的省市区列表 */
$province_list = array();
$city_list = array();
$district_list = array();
foreach ($consignee_list as $region_id => $consignee)
{
$consignee['country'] = isset($consignee['country']) ? intval($consignee['country']) : 1;
$consignee['province'] = isset($consignee['province']) ? intval($consignee['province']) : 18;
$consignee['city'] = isset($consignee['city']) ? intval($consignee['city']) : 254;
$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']);
}
2 \themes\default\library\consignee.lbi
<select name="country" id="selCountries_{$sn}" onchange="region.changed(this, 1, 'selProvinces_{$sn}')" style="border:1px solid #ccc;display:none;">
<!-- <option value="0">{$lang.please_select}{$name_of_region[0]}</option>-->
<!-- {foreach from=$country_list item=country} -->
<option value="{$country.region_id}" {if $consignee.country eq $country.region_id}selected{/if}>{$country.region_name}</option>
<!-- {/foreach} -->
</select>
<select name="province" id="selProvinces_{$sn}" onchange="region.changed(this, 2, 'selCities_{$sn}')" style="border:1px solid #ccc;display:none;">
<!-- <option value="0">{$lang.please_select}{$name_of_region[1]}</option>-->
<!-- {foreach from=$province_list.$sn item=province} -->
<option value="{$province.region_id}" {if $consignee.province eq $province.region_id}selected{/if}>{$province.region_name}</option>
<!-- {/foreach} -->
</select>
<select name="city" id="selCities_{$sn}" onchange="region.changed(this, 3, 'selDistricts_{$sn}')" style="border:1px solid #ccc;display:none;">
<!-- <option value="0">{$lang.please_select}{$name_of_region[2]}</option>-->
<!-- {foreach from=$city_list.$sn item=city} -->
<option value="{$city.region_id}" {if $consignee.city eq $city.region_id}selected{/if}>{$city.region_name}</option>
<!-- {/foreach} -->
</select>
<select name="district" id="selDistricts_{$sn}" {if !$district_list.$sn}style="display:"{/if} style="border:1px solid #ccc;">
<option value="0">{$lang.please_select}{$name_of_region[3]}</option>
<!-- {foreach from=$district_list.$sn item=district} -->
<option value="{$district.region_id}" {if $consignee.district eq $district.region_id}selected{/if}>{$district.region_name}</option>
<!-- {/foreach} -->
</select>
-------------------------------------------------------------------------------------------------
wap版本
1 \mobile\user.php
elseif($act == 'add_address') 下面
$smarty->assign('country_list', get_regions());
$consignee['country'] = isset($consignee['country']) ? intval($consignee['country']) : 1;
$consignee['province'] = isset($consignee['province']) ? intval($consignee['province']) : 18;
$consignee['city'] = isset($consignee['city']) ? intval($consignee['city']) : 254;
2 \mobile\templates\address_add.dwt
和网站的修改地方一致