Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Redirect Login To Selected Page not index.php


DANYEYI

Recommended Posts

hi there,

 

can anybody tell me how to redirect the login page to the last selected page?

 

for instance if you are not logged in and you add an item to your cart and click checkout you are asked to login and are then redirected to index.php. i want the login page to return the customer to the link he/she originally clicked.

 

thanks in advance

dan

Link to comment
Share on other sites

 

 

thanks!

 

i made the change put forward by kfang2004 and everything seems to be working great!

 

the change is:

 

find this in application_top.php

 

if (PHP_VERSION < 4) {

$broken_navigation = $navigation;

$navigation = new navigationHistory;

$navigation->unserialize($broken_navigation);

}

else {

$navigation = new navigationHistory;}

 

and replace with (only in red added)

 

if (basename($PHP_SELF)!=FILENAME_LOGIN){

if (PHP_VERSION < 4) {

$broken_navigation = $navigation;

$navigation = new navigationHistory;

$navigation->unserialize($broken_navigation);

}

else {

$navigation = new navigationHistory;}

}

 

is this a good way to achieve what i want and can you see any problems that could come up from this change?

 

thanks again

dan

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...