2025年如何在ecshop注册时添加生日和性别字段

如何在ecshop注册时添加生日和性别字段第一步修改 includes lib passport php 将 function register username password email other array 修改为 function register username password email other array birthday 第二步修改根目录的

大家好,我是讯享网,很高兴认识大家。

第一步修改includes/lib_passport.php


讯享网

将function register($username, $password, $email, $other = array())
修改为function register($username, $password, $email, $other = array(),$birthday)
第二步修改根目录的 user.php
找到if (register($username, $password, $email, $other) !== false)
改为if (register($username, $password, $email, $other,$birthday) !== false)
第三步修改模板中注册文件 themes/yourstemplatename/user_passport.dwt,如果是默认模板,则是themes/default/user_passport.dwt:
找到这段代码(约125行到132行):
        <tr>
          <td align="right">{$lang.label_confirm_password}</td>
          <td>
          <input name="confirm_password" type="password"id="conform_password" class="inputBg" style="width:179px;"/>
            <span style="color:#FF0000" id="conform_password_notice"> *</span>
          </td>
        </tr>
在其之后,插入代码
          <tr>
                  <td width="28%" align="right" bgcolor="#FFFFFF">{$lang.sex}: </td>
                  <td width="72%" align="left" bgcolor="#FFFFFF"><input type="radio" name="other[sex]" value="0" checked="checked" />
                    {$lang.secrecy}  
                    <input type="radio" name="other[sex]" value="1"  />
                    {$lang.male}  
                    <input type="radio" name="other[sex]" value="2"  />
                  {$lang.female}   </td>
                </tr>
  <tr>
                  <td width="28%" align="right" bgcolor="#FFFFFF">{$lang.birthday}: </td>
                  <td width="72%" align="left" bgcolor="#FFFFFF"> {html_select_date field_order=YMD prefix=birthday start_year=-60 end_year=+1 display_days=true month_format=%m day_value_format=%02d time=this.birthday} </td>
                </tr>

小讯
上一篇 2025-01-17 19:04
下一篇 2025-03-24 15:17

相关推荐

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容,请联系我们,一经查实,本站将立刻删除。
如需转载请保留出处:https://51itzy.com/kjqy/122441.html