![]() |
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) |
I want to redirect customer to orders.php cant fine the code in include/login.php
|
I want to redirect the customer to either the cart page or to their account page is nothing is in the cart, what code do I place in for that?
|
Quote:
if(!func_is_cart_empty($cart)) func_header_location($redirect_to."/cart.php"); else func_header_location($redirect_to."/account.php"); Anyone know how to have it redirect to the previous page??? |
Quote:
This would be useful on a lot of pages. Click a button, get the action processed and return to the same page. The same as 'add to cart' with 'redirect to cart' switched off - this is achieved in cart.php by func_header_location($HTTP_REFERER); .... Code:
if($config["General"]["redirect_to_cart"]=="Y") { I think firewalls that block the referrer might cause this to fail tho. |
All times are GMT -8. The time now is 12:14 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.