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 Redirect... (https://forum.x-cart.com/showthread.php?t=12863)

ProjectShadow 03-16-2005 03:44 PM

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?

Jon 03-16-2005 03:50 PM

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");


ProjectShadow 03-16-2005 04:41 PM

Perfect! Thanks Jon, I really appreciate it :D

--Adam

Jon 03-16-2005 05:12 PM

No prob :)

JBaker 03-19-2005 04:41 AM

Where is the include/loging.php?
 
include/login.php


Where do I find this?

balinor 03-19-2005 04:43 AM

in the include folder in the x-cart root directory. You will need to access it via ftp, not via the x-cart admin.

markwhoo 04-10-2005 07:03 PM

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?

instinctual 04-21-2005 02:27 PM

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

Jon 04-21-2005 03:08 PM

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");

whsu716 07-16-2005 09:25 AM

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)


All times are GMT -8. The time now is 11:51 AM.

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