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

Login Redirect...

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 03-16-2005, 03:44 PM
 
ProjectShadow ProjectShadow is offline
 

Advanced Member
  
Join Date: Oct 2004
Posts: 55
 

Default Login Redirect...

Is there a setting in the Admin CP to redirect the customers to the New Arrivals page after they login, or would I have to edit the template for that page?

If I have to edit the template...where is the template located?
__________________
Adam L Golson
X-Cart v3.5.11 [Linux]
Reply With Quote
  #2  
Old 03-16-2005, 03:50 PM
  Jon's Avatar 
Jon Jon is offline
 

X-Guru
  
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 4,200
 

Default

You'd have to edit the include/login.php

Find this code:

Code:
if(!func_is_cart_empty($cart)) func_header_location($redirect_to."/cart.php"); else func_header_location($redirect_to."/home.php");

Change it to (substitute specials.php) for your script:

Code:
if(!func_is_cart_empty($cart)) func_header_location($redirect_to."/cart.php"); else func_header_location($redirect_to."/specials.php");
Reply With Quote
  #3  
Old 03-16-2005, 04:41 PM
 
ProjectShadow ProjectShadow is offline
 

Advanced Member
  
Join Date: Oct 2004
Posts: 55
 

Default

Perfect! Thanks Jon, I really appreciate it

--Adam
__________________
Adam L Golson
X-Cart v3.5.11 [Linux]
Reply With Quote
  #4  
Old 03-16-2005, 05:12 PM
  Jon's Avatar 
Jon Jon is offline
 

X-Guru
  
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 4,200
 

Default

No prob
Reply With Quote
  #5  
Old 03-19-2005, 04:41 AM
 
JBaker JBaker is offline
 

Newbie
  
Join Date: Jun 2004
Posts: 1
 

Default Where is the include/loging.php?

include/login.php


Where do I find this?
__________________
JB
Reply With Quote
  #6  
Old 03-19-2005, 04:43 AM
 
balinor balinor is offline
 

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

Default

in the include folder in the x-cart root directory. You will need to access it via ftp, not via the x-cart admin.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #7  
Old 04-10-2005, 07:03 PM
 
markwhoo markwhoo is offline
 

X-Adept
  
Join Date: Nov 2003
Posts: 799
 

Default

I have seen redirects going to just about every place imaginable in multiple threads, but I have not found what I am looking to implement other than really old version fixes I have in the archives for the 3.4 branch.

What I would like to do is simply redirect the end user back to the page they were prior to logging in.

When end user clicks log in, they go to a secure login page. Once logged in, I want to be able to send them back to their original page.

Anyone know what call to use for this?

Would this go into both the register and login php files? if so, where?
__________________
vs 4.1.12
Reply With Quote
  #8  
Old 04-21-2005, 02:27 PM
 
instinctual instinctual is offline
 

eXpert
  
Join Date: Nov 2003
Posts: 247
 

Default javascript

I would just use a javascript history command then - you may have to play with it a bit as you may need to go back 2 steps instead of one, but just put this in place of what they are talking about above:

javascript:history.go(-1)

Hope that helps ;o)

Instinctual
Colorado
X-Cart Versions 3.5.x - 4.0.x
Reply With Quote
  #9  
Old 04-21-2005, 03:08 PM
  Jon's Avatar 
Jon Jon is offline
 

X-Guru
  
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 4,200
 

Default

Not everyone has javascript enabled through, and some browsers don't process the javascript history back buttons.

One sure way to do this, is to edit your register links to include the current page. So if they are on home.php?cat=2 the register link would become register.php?return=home.php?cat=2

Then in your register.php you grab the return variable, secure it, pass it to smarty, and embed it in your register.tpl form. So that the return variable will be posted with the registration information. Then on a successful register you do a func_header_location("$return");
Reply With Quote
  #10  
Old 07-16-2005, 09:25 AM
 
whsu716 whsu716 is offline
 

Senior Member
  
Join Date: Jun 2005
Posts: 168
 

Default

Quote:
Originally Posted by Jon
Not everyone has javascript enabled through, and some browsers don't process the javascript history back buttons.

One sure way to do this, is to edit your register links to include the current page. So if they are on home.php?cat=2 the register link would become register.php?return=home.php?cat=2

Then in your register.php you grab the return variable, secure it, pass it to smarty, and embed it in your register.tpl form. So that the return variable will be posted with the registration information. Then on a successful register you do a func_header_location("$return");
\


This is what I'd like to do - Do you have code for this by any chance?
Where do I get the register links?

how do I secure the variable and pass it?

Thanks!!! (nooob)
__________________
...
v 4.0.18; 4.1
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 03:41 PM.

   

 
X-Cart forums © 2001-2020