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)
-   -   Login | Logout | Register | Authentication MOD help (https://forum.x-cart.com/showthread.php?t=13015)

jb1013 03-25-2005 10:19 AM

Login | Logout | Register | Authentication MOD help
 
Hi Thanks for reading.

I'm trying to simplfy the login/logout and register/modify profile procedure. I want to eliminate the the Authentication Box and move these items to a custom speedbar.

you can see what I'm working on here:

http://www.billablunt.com/store/home.php

I created a test account you can login with "test/test"

Want I want to accomplish is if the user is not logged in then the speedbar displays "login | register" as the first two items. If the customer is logged in then the first two items would change to "logout | profile".

Also at the top Right Corner of the header I would like for it to say "Welcome - First Name, Last Name" you are logged in. But when they are not logged in to show nothing.

A couple of other things I would like to accomplish:

Once the customer registers, assuming all the fields are appropriately filled out I would like the customer to be directed back to home.php, currently it seems confusing after you register to go the modify profile page because it seems like maybe you missed something or made a mistake.

Lastly I'd like to add the Recover Password link to the Login.php form.

I've also been looking at the EZ Checkout MOD, and wondering if I can use it to accomplish what I'm going for here.

This is my second X-cart store but the first that I've done any type of modification on, so be gentle as I'm not a expert.

Thanks so much for any assitance you can provide, I really do appreciate it.

Jason Brantley

cotc2001 03-25-2005 11:18 AM

this may partly help
http://forum.x-cart.com/viewtopic.php?t=13425&highlight=show+login

Bella Forma 03-25-2005 08:23 PM

I did some work on my login/register set up recently and found this post very helpfull:

http://forum.x-cart.com/viewtopic.php?t=3024&highlight=login+account

Also there is another one but I don't have a link to it anywhere. Try searching for 'myaccount' as I think that was the post header.

Nicki

jb1013 03-26-2005 10:58 PM

Thanks for the input
 
Thanks to both of you for the links to the other threads, they are both very useful. I really wish this forum had a better search engine, it seems like I can never find the info I'm looking for. Another great feature would be something that stores the threads you've been involved with in your profile, but I digress. Anyway...

cotc2001 I really like the way you have your site setup. I went ahead and installed the EZ Checkout Mod, well worth the money I think. Now if I can just streamline a few other things I think I'll be where I want to be.

cotc2001 can you give me some details how you combined the login, register, and recover password areas into one template on your site? I really like the way this is done.

I also like how you converted the registration form into two columns and added some custom fields. I can probably figure this one out myself but if you have any quick pointers they would be appreciated.

FYI, one thing I noticed that you may want to look at is that the Country field in the registration form seems to cross over into the second column using Firefox 1.0.2

Also, I didn't see anyway to logout, but that's probably not a big issue as long as you are automatically logged out after leaving the site. Although it would be nice to see somewhere that lets you know with some sort of confirmation when you are logged in.

Other than that I really like the way you have the site setup, and hope to mimic some of the things you've done if that's OK. I'll be putting some more time into this next week, I'll post back with my results.

Thanks again.

JB

jb1013 03-27-2005 04:52 PM

Getting There
 
I've accomplished a couple of these goals. For some reason though my logout link is not working. Any idea of what I'm missing here?

<TD class="HeadLine" align="right"><FORM action="{$xcart_web_dir}/include/login.php" method="post" name="loginform">
{if $login eq ""}{$lng.lbl_log_in} {/if}
{if $login ne ""}
Log out
{/if} <span class="whitefont">|</span> {if $login eq ""}{$lng.lbl_register} {/if} {if $login ne ""} Profile {/if} <span class="whitefont">|</span> {$lng.lbl_view_cart} <span class="whitefont">|</span> {$lng.lbl_checkout}
<INPUT type="hidden" name="mode" value="logout">
<INPUT type="hidden" name="redirect" value="customer">
</FORM></TD>

Thanks so much!

JB

Bella Forma 03-28-2005 03:24 AM

Try this as your logout link instead...

Code:

Log Out

I had the same problem and couldn't get the one your using to work within the head.tpl file... but the one above did... not entirely sure why so if anyone knows I would love an explanation :)

jb1013 03-28-2005 09:21 AM

Thanks Bella Forma
 
Thanks Bella Forma, that worked for the logout link.

JB

KeithXtreme 04-11-2008 08:25 AM

Re: Thanks Bella Forma
 
Did you ever get this work?

I want to use it on 4.1 a but cannnot get it to read out correctly

Here is the code:

<TD class="HeadLine" align="right"><FORM action="{$xcart_web_dir}/include/login.php" method="post" name="loginform">
{if $login eq ""}{$lng.lbl_log_in} {/if}
{if $login ne ""}
Log OutLog out[/url]
{/if} <span class="whitefont">|</span> {if $login eq ""}{$lng.lbl_register} {/if} {if $login ne ""} Profile {/if} <span class="whitefont">|</span> {$lng.lbl_view_cart} <span class="whitefont">|</span> {$lng.lbl_checkout}
<INPUT type="hidden" name="mode" value="logout">
<INPUT type="hidden" name="redirect" value="customer">
</FORM></TD>

I think it has to do with the URL brackets [ ] this forum is throwing around the code.....

kube 04-11-2008 09:32 AM

Re: Login | Logout | Register | Authentication MOD help
 
hi there,

It will not go through as the javascript fails from having 2 loginform's present on an xcart page (the original Login Form along with the new Login Form). I have amended the code so that it acts separately (loginform2)

PHP Code:

<FORM action="{$xcart_web_dir}/include/login.php" method="post" name="loginform2">
{if 
$login eq ""}<a href="secure_login.php">{$lng.lbl_log_in}</a> {/if} 
{if 
$login ne ""}<a href="javascript: document.loginform2.submit();">Log out</a>{/if} 
<
span class="whitefont">|</span> {if $login eq ""}<a href="register.php">{$lng.lbl_register}</a> {/if} 
{if 
$login ne ""} <a href="register.php">Profile</a> {/if} 
<
span class="whitefont">|</span> <a href="cart.php"> {$lng.lbl_view_cart}</a
<
span class="whitefont">|</span> <a href="cart.php?mode=checkout">{$lng.lbl_checkout}</a>
<
INPUT type="hidden" name="mode" value="logout">
<
INPUT type="hidden" name="redirect" value="customer">
</
FORM


Edit: Although no ideas where this code came from as it looks like it has a few errors in places. I wouldn't use this code without sorting what the purpose of the form is for (ie. it has no input to login with and might as well use direct links), the INPUTs aren't in the right place at the right time.

Hope this helps.

KeithXtreme 04-11-2008 06:18 PM

Re: Login | Logout | Register | Authentication MOD help
 
Is there something else out there better to use, to get all this in the speedbar?

Maybe a mod or something else here on the site, I have searched but might not have found it....


All times are GMT -8. The time now is 10:18 AM.

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