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

Login | Logout | Register | Authentication MOD help

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 03-25-2005, 10:19 AM
 
jb1013 jb1013 is offline
 

Advanced Member
  
Join Date: Jul 2004
Posts: 80
 

Default 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
__________________
Jason Brantley
Axis Computer Conuslting
www.axiscc.com
Reply With Quote
  #2  
Old 03-25-2005, 11:18 AM
 
cotc2001 cotc2001 is offline
 

X-Man
  
Join Date: Feb 2003
Location: Shrewsbury, UK
Posts: 2,351
 

Default

this may partly help
http://forum.x-cart.com/viewtopic.php?t=13425&highlight=show+login
__________________
x-cart 4.0.5 (live and heavily modded)
Server: freebsd
Reply With Quote
  #3  
Old 03-25-2005, 08:23 PM
 
Bella Forma Bella Forma is offline
 

Senior Member
  
Join Date: Nov 2004
Location: Australia
Posts: 150
 

Default

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
__________________
X-Cart Gold 4.0.12
X-AOM, X-RMA, X-FancyCat
Apache/Linux Server
PHP 4.3.8
Reply With Quote
  #4  
Old 03-26-2005, 10:58 PM
 
jb1013 jb1013 is offline
 

Advanced Member
  
Join Date: Jul 2004
Posts: 80
 

Default 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
__________________
Jason Brantley
Axis Computer Conuslting
www.axiscc.com
Reply With Quote
  #5  
Old 03-27-2005, 04:52 PM
 
jb1013 jb1013 is offline
 

Advanced Member
  
Join Date: Jul 2004
Posts: 80
 

Default 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
__________________
Jason Brantley
Axis Computer Conuslting
www.axiscc.com
Reply With Quote
  #6  
Old 03-28-2005, 03:24 AM
 
Bella Forma Bella Forma is offline
 

Senior Member
  
Join Date: Nov 2004
Location: Australia
Posts: 150
 

Default

Try this as your logout link instead...

Code:

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
__________________
X-Cart Gold 4.0.12
X-AOM, X-RMA, X-FancyCat
Apache/Linux Server
PHP 4.3.8
Reply With Quote
  #7  
Old 03-28-2005, 09:21 AM
 
jb1013 jb1013 is offline
 

Advanced Member
  
Join Date: Jul 2004
Posts: 80
 

Default Thanks Bella Forma

Thanks Bella Forma, that worked for the logout link.

JB
__________________
Jason Brantley
Axis Computer Conuslting
www.axiscc.com
Reply With Quote
  #8  
Old 04-11-2008, 08:25 AM
 
KeithXtreme KeithXtreme is offline
 

Advanced Member
  
Join Date: Mar 2008
Location: Oklahoma
Posts: 46
 

Default 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.....
__________________
http://www.chopworx.com
Gold Version 4.1.11
Fancy Categories
Shipper Per Product
Featured Products
Gallery V3
Store Manager
Reply With Quote
  #9  
Old 04-11-2008, 09:32 AM
  kube's Avatar 
kube kube is offline
 

X-Adept
  
Join Date: Sep 2005
Location: London: a small place East of Wales
Posts: 529
 

Default 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.
__________________
Doms
kube v4.1.9
Reply With Quote
  #10  
Old 04-11-2008, 06:18 PM
 
KeithXtreme KeithXtreme is offline
 

Advanced Member
  
Join Date: Mar 2008
Location: Oklahoma
Posts: 46
 

Default 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....
__________________
http://www.chopworx.com
Gold Version 4.1.11
Fancy Categories
Shipper Per Product
Featured Products
Gallery V3
Store Manager
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 10:27 AM.

   

 
X-Cart forums © 2001-2020