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

My Account Login

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #71  
Old 02-12-2007, 12:43 PM
  chamberinternet's Avatar 
chamberinternet chamberinternet is offline
 

X-Wizard
  
Join Date: Sep 2005
Location: Lancashire, UK
Posts: 1,470
 

Default Re: My Account Login

Quote:
In 4.1.3 your solution seems to work great! My only need is to have the user be redirected after successfully creating a new, or modifying an existing profile - (in my cart) they remain on the Modify Profile page. I think the right flow would be to go back to thundernugs "Login to Your Account" page.

I think that's a default way in which x-cart works.... takes the user to the 'modify profile' page after account creation.

Mind you, does anyone how to redirect the user to the homepage after logging in with thundernugs modification rather taking them to a page with options to modify their account?

Thanks

Shafiq :sK
__________________
Developing in 4.7.x now (Dipping into v5 - Slowly!)
Have used 4.1.x, 4.2.x, 4.4.x, 4.5.x, 4.6.x & 4.7.x
Multiple Instances of X-Cart
MySQL 5.6.37
CentOS 7.4


Chamber Internet
- Lancashire, United Kingdom
http://www.chamberelancs.co.uk
Reply With Quote
  #72  
Old 02-12-2007, 01:16 PM
 
Jerrad Jerrad is offline
 

X-Adept
  
Join Date: Nov 2004
Location: The Netherlands
Posts: 484
 

Default Re: My Account Login

Quote:
Originally Posted by chamberinternet
Mind you, does anyone how to redirect the user to the homepage after logging in with thundernugs modification rather taking them to a page with options to modify their account?

Thanks

Shafiq :sK

Not sure how it works in 4.1.x but in 4.0.12 I use the following:

in include/login.php (around line 200) you will find this piece of code

Code:
if ($login_type == "C" || $login_type == "B") { if($redirect2 == "checkout") { func_header_location($redirect_to."/cart.php?mode=checkout"); } elseif (!func_is_cart_empty($cart)) { if((strpos($HTTP_REFERER, "mode=auth") === false) && (strpos($HTTP_REFERER, "mode=checkout") === false)) { func_header_location($redirect_to."/cart.php"); } else { func_header_location($redirect_to."/cart.php?mode=checkout"); } } elseif (!empty($HTTP_REFERER)) { if((strncasecmp($HTTP_REFERER,$http_location,strlen($http_location))==0 || strncasecmp($HTTP_REFERER,$https_location,strlen($https_location))==0) && strpos($HTTP_REFERER,"error_message.php")===false && strpos($HTTP_REFERER,'secure_login.php')===false && strpos($HTTP_REFERER,".php")!==false) { func_header_location($redirect_to."/pages.php?pageid=2"); } } func_header_location($redirect_to."/pages.php?pageid=2");

The code in red is the page where my customers are redirected too after a succesfull login.
I'm using a static page, but you can change that into any page, like for example home.php.

Hope this helps - good luck!
__________________
X-Cart 4.0.12
Heavy modified with paid, free and forum mods.
PHP 5.2.5 | MYSQL 5.0.51a
Reply With Quote
  #73  
Old 03-24-2007, 12:14 PM
 
skeep5 skeep5 is offline
 

Advanced Member
  
Join Date: Feb 2007
Posts: 47
 

Default Re: My Account Login

Quote:
Originally Posted by thundernugs
OK, so, how about this.....

create a static page called "Login to Your Account"

here is the page content

Code:
{if $login} <table width=500> <tr><td> <div class=HeadText> You are currently logged in as {$login} <br><Br> <a href="orders.php?mode=search">Click here to track or view your previous orders</a> <br><br> <a href="register.php?mode=update">Click here to view or modify your profile</a> <br><br> <a href="include/login.php?mode=logout&redirect=customer">Click here to Log Out</a> </td></tr></table> {else} <table width=500><tr><td>Please login here using your username and password<br><br> { include file="auth.tpl" } </td> </tr> </table> </div> {/if}

make sure that in "General Settings" you have checked "Parse Smarty tags in the content of embedded static pages:"

you account login link is = "http://www.yoursite.com/pages.php?pageid=2"

or whatever number static page you are on

this seems to be a really easy solution to this problem, almost too easy.....but it works for me.

note - i haven't got my ssl cert installed yet, so not sure if that will cause any issues.

-mike

How can i change the login/register/recover links to be graphical buttons like my add to cart? thanks!
__________________
---------------
Brandon Larsen
---------------
X-Cart version 4.4.3
X-Cart version 4.1.9
X-Cart version 4.1.10
Reply With Quote
  #74  
Old 04-07-2007, 10:30 PM
  Jayk's Avatar 
Jayk Jayk is offline
 

eXpert
  
Join Date: Nov 2003
Location: Calgary, Alberta, Canada
Posts: 333
 

Default Re: My Account Login

I just installed mffowler's mod on 4.1.6. It took a little tweaking, but it is a nice improvement over the default X-Cart behavior I think.

Thanks for your work on this mod.

Cheers,
Jason
__________________
X-Cart Gold 4.4.3
Blog: www.flashinthepan.ca
Reply With Quote
  #75  
Old 06-07-2007, 06:36 PM
  Jayk's Avatar 
Jayk Jayk is offline
 

eXpert
  
Join Date: Nov 2003
Location: Calgary, Alberta, Canada
Posts: 333
 

Default Re: My Account Login

I had a request via PM for the changes I made to the original for 4.1.6. I am now running it on 4.1.8 successfully. I have zipped up my version of the mod including the tpl's and a readme to install it. (attached to this post).

The mod is installed on my site, but please don't create a profile just to see it as we are a live shop (unless you want to buy something of course).

If you improve on this, please share back to the community.

Thanks,
Jason
Attached Files
File Type: zip My_Account_Mod-70808.zip (5.6 KB, 243 views)
__________________
X-Cart Gold 4.4.3
Blog: www.flashinthepan.ca

Last edited by Jayk : 08-08-2007 at 11:16 AM. Reason: Updated Zip File - Aug. 8, 2007
Reply With Quote
  #76  
Old 07-28-2007, 08:10 PM
 
jjohnsonbey jjohnsonbey is offline
 

Newbie
  
Join Date: Jul 2007
Posts: 4
 

Default Re: My Account Login

has any had this error messege after install when trying to login to admin...
Warning: Smarty error: unable to read resource: "admin/home.tpl" in /hsphere/local/home/cciinst/poweronegroup.net/xcart/Smarty-2.6.12/Smarty.class.php on line 1095
__________________
James Johnson
x-gold 4.1.8
Reply With Quote
  #77  
Old 08-04-2007, 10:38 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: My Account Login

Here's how you handle the redirects:

http://forum.x-cart.com/viewtopic.php?t=13003
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #78  
Old 08-04-2007, 09:11 PM
  Jayk's Avatar 
Jayk Jayk is offline
 

eXpert
  
Join Date: Nov 2003
Location: Calgary, Alberta, Canada
Posts: 333
 

Default Re: My Account Login

Quote:
Originally Posted by balinor
Here's how you handle the redirects:

http://forum.x-cart.com/viewtopic.php?t=13003

Thanks for the link. That worked great!

Jason
__________________
X-Cart Gold 4.4.3
Blog: www.flashinthepan.ca
Reply With Quote
  #79  
Old 08-04-2007, 09:30 PM
  Jayk's Avatar 
Jayk Jayk is offline
 

eXpert
  
Join Date: Nov 2003
Location: Calgary, Alberta, Canada
Posts: 333
 

Default Re: My Account Login

I updated the README in the .zip file above to include the redirect. You may need to tweak some of the CSS/styles in the included template files as they are based on the Flexy Rectangles templates that we are running on our site.

Jason
__________________
X-Cart Gold 4.4.3
Blog: www.flashinthepan.ca
Reply With Quote
  #80  
Old 08-07-2007, 10:38 AM
 
sassicat sassicat is offline
 

Advanced Member
  
Join Date: May 2007
Location: Dale City, Virginia
Posts: 80
 

Question Re: My Account Login

Quote:
Originally Posted by Jayk
I had a request via PM for the changes I made to the original for 4.1.6. I am now running it on 4.1.8 successfully. I have zipped up my version of the mod including the tpl's and a readme to install it. (attached to this post).

The mod is installed on my site, but please don't create a profile just to see it as we are a live shop (unless you want to buy something of course).

If you improve on this, please share back to the community.

Thanks,
Jason

I found a login form is already created - I knew it had to be just couldn't figure out how to find it. Anyhoo - it is skin1/main/login_form.tpl.

So I am wondering - instead of creating all of these new files....couldn't I just somehow make a call to this already created form? It looks just like I want it to. I found it because when looking at a product, if you click on the add to wishlist button - it makes you login first. So why not use the same form instead of creating a new one?

Sassy
__________________
Christy Catterton
http://www.sassicataviary.com
X-Cart Gold Ver 4.1.8
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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:42 AM.

   

 
X-Cart forums © 2001-2020