| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Login page redirect in Lucid 2-columns (4.3) | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||||
|
|||||||||
Login page redirect in Lucid 2-columns (4.3)
In previous versions of X-cart, Login Box was presented on every page as a part of left/right menu. Many users wanted to move it to a separate login page and there are dozens of threads and mods on how to achieve it.
In 4.3 they implement this modification by default (at least for 2-column Lucid skin). It▓s great that QT is working day and night to bring all these new features to life However I stumble upon one problem with it. I want to hide some information from users who are not logged in: {if $login ne ""} hided blah-blah {else} Please login in order to see blah-blah {/if} When I am on the static page with code above, I am clicking on the Log in link on top of the head which brings me to the login page. After I input login information and click ⌠Submit■, it redirects me to home page instead of the static page I was initially on. Now, I am not sure if this is a bug, or it is intended to work this way, but I really believe that it would be more convenient for users to get back to the page they were on, rather than to navigate to it all over again (or to use double Back button click to get there). Is anyone else having the same problem? The only thing I could think of is somehow to use the previous page javascript code in place of homepage URL in redirect, my java/php is not all that great though. That previous page javascript code is : <a href="javascript:history.go(-1)" onMouseOver="self.status=document.referrer;return true">Previous Page</a> I am sure there got to be an easier solution, anyone pretty please?
__________________
Version 4.7.6 X-cart Gold Last edited by acidon : 02-23-2010 at 04:36 PM. Reason: typo in thread header :) |
|||||||||
#2
|
|||||||
|
|||||||
Re: Login page redirect in Lucid 2-columns (4.3)
<a href="#" onclick="history.back();"> Back </a>
<a href="<?php echo $_SERVER['http_referrer']; ?>"> Back </a> |
|||||||
#3
|
|||||||||
|
|||||||||
Re: Login page redirect in Lucid 2-columns (4.3)
Unfortunally I think the solution with history.back is not gonna work with my problem because I initially didn't count on situation where users would come to login page directly (from bookmark or by typing in).
I would never catch this problem on my own tho, and want to thank jdiehl who point it out in this thread http://forum.x-cart.com/showthread.php?t=52514 . I am currently waiting for reply from QT regarding this issue and will let everyone know as soon as I'll get any news
__________________
Version 4.7.6 X-cart Gold |
|||||||||
#4
|
|||||||
|
|||||||
Re: Login page redirect in Lucid 2-columns (4.3)
Perhaps make a custom php function to use the php back feature if the referrer is in-site, but if its off-site or a bookmark then you can have it redirect to home page?
|
|||||||
#5
|
|||||||
|
|||||||
Re: Login page redirect in Lucid 2-columns (4.3)
If anyone is interested in a fix for this issue, I wrote up a few changes that should take care of it. I've tested on X-Cart 4.3.x if anyone finds any issues just let me know:
http://www.internetmedicineman.com/how-to-fix-xcart-login-redirect.html
__________________
Jason Diehl Finding Cures for Your Online Headaches: http://www.internetmedicineman.com/ |
|||||||
|
|||
X-Cart forums © 2001-2020
|