View Single Post
  #8  
Old 03-01-2005, 11:58 AM
  frankdux's Avatar 
frankdux frankdux is offline
 

Senior Member
  
Join Date: Jul 2004
Location: Manchester, NH, USA
Posts: 125
 

Default

I spoke to X-cart about register_account.tpl and got pointed in the right direction. The whole trick is to know what to comment out and hide without "breaking" something else. All input types should be hidden. Here is my register_account.tpl for the benefit of anyone else who needs all users to be anonymous. (Note that some changes have to be made to other template files as well, but this one is key)

Code:
{* $Id: register_account.tpl,v 1.5.2.4 2005/01/19 12:53:54 svowl Exp $ *} {*Modified version: all input types hidden in order to turn off registration*} {if $hide_header eq ""} <TR> {*<TD height="20" colspan="3">{$lng.lbl_username_n_password}<HR size="1" noshade></TD>*} </TR> {/if} {if $userinfo.login eq $login and $login and $userinfo.usertype ne "C"} {* Display membership level *} <INPUT type="hidden" name="membership" value="{$userinfo.membership}"> <INPUT type="hidden" name="pending_membership" value="{$userinfo.pending_membership}"> {else} {if $config.General.membership_signup eq "Y" and ($usertype eq "C" or ($active_modules.Simple_Mode ne "" and $usertype eq "P") or $usertype eq "A" or $usertype eq "B")} {*{include file="admin/main/membership_signup.tpl"}*} {/if} {if $usertype eq "A" or ($usertype eq "P" and $active_modules.Simple_Mode ne "")} {*{include file="admin/main/membership.tpl"}*} {/if} {* /Display membership level *} {/if} {if $anonymous ne "" and $config.General.disable_anonymous_checkout ne "Y"} {* Anonymous account *} {*<TR> <TD colspan="3">{$lng.txt_anonymous_account_msg}</TD> </TR>*} <TR> {*<TD align="right">{$lng.lbl_username}</TD> <TD></TD> <TD nowrap>*} <INPUT type="hidden" name="uname" size="32" maxlength="32" value="{$userinfo.login}"> </TD> </TR> <TR> {*<TD align="right">{$lng.lbl_password}</TD> <TD></TD>*} <TD nowrap><INPUT type="hidden" name="passwd1" size="32" maxlength="32" value="{$userinfo.passwd1}"> </TD> </TR> <TR> {*<TD align="right">{$lng.lbl_confirm_password}</TD> <TD></TD>*} <TD nowrap><INPUT type="hidden" name="passwd2" size="32" maxlength="32" value="{$userinfo.passwd2}"> </TD> </TR> {* /Anonymous account *} {else} {* NOT anonymous account *} <TR> {*<TD align="right">{$lng.lbl_username}</TD> <TD class="Star">*</TD>*} <TD nowrap> {if $userinfo.login ne "" || ($login eq $userinfo.uname && $login ne '')} {*{$userinfo.login|default:$userinfo.uname}*} <INPUT type="hidden" name="uname" value="{$userinfo.login|default:$userinfo.uname}"> {else} <INPUT type="hidden" id="uname" name="uname" size="32" maxlength="32" value="{if $userinfo.uname}{$userinfo.uname}{else}{$userinfo.login}{/if}"> {if ($reg_error ne "" and $userinfo.uname eq "" and $userinfo.login eq "") or $reg_error eq "U"}<FONT class="Star">&lt;&lt;</FONT>{/if} {/if} </TD> </TR> <TR> {*<TD align="right">{$lng.lbl_password}</TD> <TD><FONT class="Star">*</FONT></TD>*} <TD nowrap><INPUT type="hidden" id="passwd1" name="passwd1" size="32" maxlength="32" value="{$userinfo.passwd1}"> {if $reg_error ne "" and $userinfo.passwd1 eq ""}<FONT class="Star">&lt;&lt;</FONT>{/if} </TD> </TR> <TR> {*<TD align="right">{$lng.lbl_confirm_password}</TD> <TD class="Star">*</TD>*} <TD nowrap><INPUT type="hidden" id="passwd2" name="passwd2" size="32" maxlength="32" value="{$userinfo.passwd2}"> {if $reg_error ne "" and $userinfo.passwd2 eq ""}<FONT class="Star">&lt;&lt;</FONT>{/if} </TD> </TR> {* / NOT anonymous account *} {/if} {if ($active_modules.Simple_Mode ne "" and $usertype eq "P") or $usertype eq "A"} <TR valign="middle"> {*<TD colspan="2"></TD> <TD nowrap> <INPUT type="hidden" name="change_password" value="N"{if $userinfo.change_password eq "Y"} checked{/if}> {$lng.lbl_reg_chpass} </TD>*} </TR> {/if}
__________________
X-Cart: 4.0.18
Linux, Apache, MySQL: 4.1.16, PHP: 4.4.2
Reply With Quote