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

Login page redirect in Lucid 2-columns (4.3)

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 02-23-2010, 04:33 PM
  acidon's Avatar 
acidon acidon is offline
 

Senior Member
  
Join Date: Feb 2008
Posts: 139
 

Question 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 :)
Reply With Quote
  #2  
Old 02-25-2010, 05:06 PM
 
Shamun Shamun is offline
 

X-Adept
  
Join Date: Jun 2009
Location: North Carolina
Posts: 841
 

Default 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>
__________________
- Shane Munroe
Reply With Quote
  #3  
Old 02-25-2010, 08:51 PM
  acidon's Avatar 
acidon acidon is offline
 

Senior Member
  
Join Date: Feb 2008
Posts: 139
 

Default 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
Reply With Quote
  #4  
Old 02-26-2010, 12:34 AM
 
Shamun Shamun is offline
 

X-Adept
  
Join Date: Jun 2009
Location: North Carolina
Posts: 841
 

Default 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?
__________________
- Shane Munroe
Reply With Quote
  #5  
Old 03-08-2010, 10:55 PM
 
jdiehl jdiehl is offline
 

eXpert
  
Join Date: Dec 2003
Location: Kansas City, MO
Posts: 270
 

Default 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/
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 09:18 AM.

   

 
X-Cart forums © 2001-2020