X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Making All Customers Anonymous (https://forum.x-cart.com/showthread.php?t=12426)

frankdux 02-25-2005 01:38 PM

Making All Customers Anonymous
 
Is there a way to set X-cart so that customers can never login, i.e., all customers are always anonymous?

BCSE 02-25-2005 04:40 PM

Should be as simple as not displaying the username and password fields upon registration and not showing the Login and register boxes.

Carrie

frankdux 02-25-2005 05:00 PM

Thanks for the reply Carrie. I tried to not show the login and register boxes by commenting out the following code from /customer/main/register.tpl :

Code:

{*{include file="main/register_account.tpl" userinfo=$userinfo}*}

This appears to do the trick, but then if the customer tries to go back and modify their billing/shipping information, when they click submit they get the following message:

Access denied !
You are not allowed to access that resource!
Error ID: 36

I guess there must be some data that is held in register_account.tpl that is needed. I know this is the problem because I just removed the comment tags and the "Access Denied" error no longer happens. Of course then my original need to remove the login is still there.

BCSE 02-25-2005 05:14 PM

It probably needs this:
Code:

<INPUT type="hidden" name="membership" value="{$userinfo.membership}">
<INPUT type="hidden" name="pending_membership" value="{$userinfo.pending_membership}">


in that tpl. Try commenting out everything but those lines?

That's my first guess.

Carrie

frankdux 02-28-2005 08:00 AM

Carrie- I tried commenting out everything except what you suggested to leave, but I still get the same error message. I am going to try leaving a little more code in the register_account.tpl, but if anyone has any ideas about what code has to stay I would appreciate hearing it.

BCSE 02-28-2005 07:16 PM

If I get the chance to look into this myself I'll see what I can do. Not sure though when that would be as I got the flu this weekend and it has gotten me way behind on work, emails etc. :(

Carrie

frankdux 02-28-2005 07:22 PM

Thanks for replying when you are sick. I had something flu-like earlier this month and it wiped me out for a couple of weeks. I finally broke down and saw a doctor who gave me antibiotics. I normally try to avoid them but I think it worked. Now I am just left with an annoying cough. I hope you feel better soon. Try drinking a lot of tea.

frankdux 03-01-2005 11:58 AM

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}


BCSE 03-03-2005 07:46 AM

Glad you got it figured out! :)

Carrie


All times are GMT -8. The time now is 01:42 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.