时间:06-20 互联网 佚名
收货人信息的省市区设成非必选项
一般面向国外用户的ECSHOP商城,可能会有这方面的需求:,其实也就是只留一个“请选择国家”的下拉选择框。
修改相关JS文件
打开 /js/shopping_flow.js 文件,将下面JS代码删除掉
if (frm.elements['province'] && frm.elements['province'].value == 0 && frm.elements['province'].length > 1) { err = true; msg.push(province_not_null); } if (frm.elements['city'] && frm.elements['city'].value == 0 && frm.elements['city'].length > 1) { err = true; msg.push(city_not_null); } if (frm.elements['district'] && frm.elements['district'].length > 1) { if (frm.elements['district'].value == 0) { err = true; msg.push(district_not_null); } }修改程序文件
if ($res) { if (emptyempty($consignee['province'])) { /* 没有设置省份,检查当前国家下面有没有设置省份 */ $pro = get_regions(1, $consignee['country']); $res = emptyempty($pro); } elseif (emptyempty($consignee['city'])) { /* 没有设置城市,检查当前省下面有没有城市 */ $city = get_regions(2, $consignee['province']); $res = emptyempty($city); } elseif (emptyempty($consignee['district'])) { $dist = get_regions(3, $consignee['city']); $res = emptyempty($dist); } }然后收货人信息那里,只选择国家不选择省市区,也照样能提交。
$online_count = $GLOBALS['db']->getOne("SELECT COUNT(*) FROM " . $GLOBALS['ecs']->table('sessions'));
将之修改为:$online_count = $GLOBALS['db']->getOne("SELECT COUNT(*) FROM " . $GLOBALS['ecs']->table('sessions'))*15;
else { $smarty->display('article_pro.dwt', $cache_id); }在它下面增加一行PHP代码,如下: