Tidy up registration
I had complaints about having to fill in your name too many times on registration etc. So heres the code to clean it up, see link below to see how it looks.
http://www.qvsdirect.com/reg_x-cart.jpg :-) THIS HAS BEEN DONE FOR VERSION 4.014 1. <xcart_dir>/skin1/main/register_billing_address.tpl: replace {if $default_fields.title.avail eq 'Y'} <TR> <TD align="right">{$lng.lbl_title}</TD> <TD>{if $default_fields.title.required eq 'Y'}<FONT class="Star">*</FONT>{else} {/if}</TD> <TD nowrap> <SELECT name="b_title"> {section name=title loop=$name_titles} <OPTION {if $userinfo.b_title eq $name_titles[title]}selected{/if}>{$name_titles[title]}</OPTION> {/section} </SELECT> </TD> </TR> {/if} {if $default_fields.firstname.avail eq 'Y'} <TR> <TD align="right">{$lng.lbl_first_name}</TD> <TD>{if $default_fields.firstname.required eq 'Y'}<FONT class="Star">*</FONT>{else} {/if}</TD> <TD nowrap> <INPUT type="text" name="b_firstname" size="32" maxlength="32" value="{$userinfo.b_firstname}"> {if $reg_error ne "" and $userinfo.b_firstname eq "" && $default_fields.firstname.required eq 'Y'}<FONT class="Star"><<</FONT>{/if} </TD> </TR> {/if} {if $default_fields.lastname.avail eq 'Y'} <TR> <TD align="right">{$lng.lbl_last_name}</TD> <TD>{if $default_fields.lastname.required eq 'Y'}<FONT class="Star">*</FONT>{else} {/if}</TD> <TD nowrap> <INPUT type="text" name="b_lastname" size="32" maxlength="32" value="{$userinfo.b_lastname}"> {if $reg_error ne "" and $userinfo.b_lastname eq "" && $default_fields.lastname.required eq 'Y'}<FONT class="Star"><<</FONT>{/if} </TD> </TR> {/if} with <input type="hidden" name="b_title" value=""> <input type="hidden" name="b_firstname" value=""> <input type="hidden" name="b_lastname" value=""> and replace <TR> <TD height="20" colspan="3"><B>{$lng.lbl_billing_address}</B><HR size="1" noshade></TD> </TR> with {if $action ne 'cart'} <TR> <TD height="20" colspan="3"><B>{$lng.lbl_billing_address}</B><HR size="1" noshade></TD> </TR> {/if} 2. <xcart_dir>/skin1/customer/main/register.tpl: find the following line: function check_registerform_fields() {ldelim} and insert the code below after that line {if $default_fields.title.avail eq 'Y' and $action eq 'cart'} document.registerform.b_title.value = document.registerform.title.value; {/if} {if $default_fields.firstname.avail eq 'Y' and $action eq 'cart'} document.registerform.b_firstname.value = document.registerform.firstname.value; {/if} {if $default_fields.lastname.avail eq 'Y' and $action eq 'cart'} document.registerform.b_lastname.value = document.registerform.lastname.value; {/if} Hope it helps a few people.8) |
Re: Tidy up registration
works great on 4.0.12 as well.
Good mod QVS! |
Re: Tidy up registration
That is great! It got rid of forcing the customer to input their names twice. I always thought that unprofessional, but could never find an easy fix. Thanks!!!!
|
Re: Tidy up registration
Looked great, exactly what I've been looking for. Unfortunatly when customer goes to register it errors out with message stating required information missing?
|
All times are GMT -8. The time now is 07:08 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.