Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Add an extra email address field on registration form

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #11  
Old 12-09-2011, 06:09 AM
 
lcg lcg is offline
 

Senior Member
  
Join Date: Feb 2007
Posts: 106
 

Default Re: Add an extra email address field on registration form

Phil, you are the best! Worked for 4.0.18, thanks a million, this is a great mod, much appreciate your sharing and time.
__________________
XCart v.4.0.18
Reply With Quote
  #12  
Old 12-30-2011, 09:01 AM
 
delphi delphi is offline
 

Senior Member
  
Join Date: Jul 2004
Posts: 185
 

Default Re: Add an extra email address field on registration form

Quote:
Originally Posted by PhilJ
Here's a quick way of doing it, though not strictly validated (v4.1.x) ...

skin1/main/register_contact_info.tpl

after...

Code:
{if $default_fields.email.avail eq 'Y'}

add...

Code:
{literal} <script type="text/javascript" language="javascript"> function check_email(){ var theForm = document.forms['registerform']; var errMsg = ""; var setfocus = ""; if (theForm['email2'].value != theForm['email'].value){ errMsg = "E-Mail confirmation does not match!"; setfocus = "['email2']"; } if (errMsg != ""){ alert(errMsg); eval("theForm" + setfocus + ".focus()"); } } </script> {/literal}

Then after,

Code:
<tr> <td align="right">{$lng.lbl_email}</td> <td>{if $default_fields.email.required eq 'Y'}<font class="Star">*</font>{else}&nbsp;{/if}</td> <td nowrap="nowrap"> <input type="text" id="email" name="email" size="32" maxlength="128" value="{$userinfo.email}" /> {if $emailerror ne "" or ($reg_error ne "" and $userinfo.email eq "" and $default_fields.email.required eq 'Y')}<font class="Star">&lt;&lt;</font>{/if} </td> </tr>

and before {/if}

add...

Code:
<tr> <td align="right">Confirm {$lng.lbl_email}</td> <td><font class="Star">*</font></td> <td nowrap="nowrap"> <input type="text" id="email2" name="email2" size="32" maxlength="128" value="" onBlur="check_email();" /> </td> </tr>

This does not work on Chrome because it pops up a bunch of dialogs and no way to close them ...

Any hint how to fix this?
__________________
X-Cart Gold version 4.4.4
X-Cart directory /home/web/u/ugchweb/cart
PHP 5
MySQL server 5
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 11:41 AM.

   

 
X-Cart forums © 2001-2020