在ECMALL中有时需要关注会员注册开店功能,而后台又没有这个开关,要怎么样才能做到呢
关闭会员注册功能
进后台模板页面(htdocs/admin/templates/setting.base_setting.html),添加后台控制会员注册的入口.222-233行
<tr>
<th class="paddingT15">是否允许会员注册:</th>
<td class="paddingT15">
<input id="allowreg_disabled" type="radio" name="allowreg" {if !$setting.allowreg}checked{/if} value="0" />
<label for="allowreg_disabled">{$lang.no}</label>
<input type="radio" id="enable_allowreg" name="allowreg" {if $setting.allowreg}checked{/if} value="1" />
<label for="enable_allowreg">{$lang.yes}</label>
<span class="grey">选否,前台会员就不能够注册,只能通过后台进行添加了</span>
</td>
</tr>
进后数据文档(htdocs/data/setting.inc.php),页面添加相关的数据初始值 'allowreg' => false,
在htdocs/admin/app/setting.app.php中增加
$data['allowreg'] = ($_POST['allowreg'] == '1');//二次开发,是否允许会员注册
在function register()函数中增加
$reg_on = Conf::get('allowreg');
if (!$reg_on)
{$this->display('member.unregister.html');}
else{}
增加member.unregister.html文档来显示不能注册的提示
本文系原创,转载请说明出处,并保留作者的相关
信息 或
个人主页