![]() |
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? |
You'd have to edit the include/login.php
Find this code: Code:
if(!func_is_cart_empty($cart)) Change it to (substitute specials.php) for your script: Code:
if(!func_is_cart_empty($cart)) |
Perfect! Thanks Jon, I really appreciate it :D
--Adam |
No prob :)
|
Where is the include/loging.php?
include/login.php
Where do I find this? |
in the include folder in the x-cart root directory. You will need to access it via ftp, not via the x-cart admin.
|
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? |
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 |
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"); |
Quote:
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.