zoukankan      html  css  js  c++  java
  • ecshop 调用收货地址

    html

    {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']));
  • 相关阅读:
    Maven在dos窗口中的命令
    11. Spring Boot JPA 连接数据库
    2.JPA学习总结
    1.JPA概要
    10.Maven依赖排除 禁止依赖传递 取消依赖的方法
    10. Spring Boot JDBC 连接数据库
    9.Spring Boot实战之配置使用Logback进行日志记录
    $GLOBALS['HTTP_RAW_POST_DATA'] 和$_POST的区别
    !!!四种常见的 POST 提交数据方式(含application/json)
    PhpStorm Git 配置
  • 原文地址:https://www.cnblogs.com/wesky/p/5148923.html
Copyright © 2011-2022 走看看