ecshop当中如何调用收货地址, {insert_scripts files='region.js,utils.js'} <script type="text/javascript"> region.isAdmin = false; {foreach from=$lang.flow_js item=item key=key} var {$key} = "{$item}"; {/foreach} {literal} onload = function() { if (!document.all) { document.forms['theForm'].reset(); } } {/literal} </script> <select name="country" id="selCountries_{$sn}" onchange="region.changed(this, 1, 'selProvinces_{$sn}')" style="border:1px solid #ccc;"> <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;"> <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;"> <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:none"{/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> 动态php代码 /* 取得国家列表、商店所在国家、商店所在国家的省列表 */ $smarty->assign('country_list', get_regions()); $smarty->assign('shop_country', $_CFG['shop_country']); $smarty->assign('shop_province_list', get_regions(1, $_CFG['shop_country'])); (责任编辑:好模板) |