Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

change redirect page on login success


andyshep

Recommended Posts

Posted

hi all,

 

im new to oscommerce and would like to change the redirect page when a user clicks the sign in button and is succesful.

 

what items do i need to change in the login.php page?

and if anywhere else.

 

cheers

Posted

Why is it i spend 4 hrs trying to find a solution to probs im having.

post here. then 5 mins l8r find a solution :rolleyes:

Posted
Hi,

I have the same problem, I need to change the page where the user is redirected after login, can you help me?

 

TY very much,

Michele.

 

In the login.php around lines 60 -68

is this

  if (sizeof($navigation->snapshot) > 0) {
	  $origin_href = tep_href_link($navigation->snapshot['page'], tep_array_to_string($navigation->snapshot['get'], array(tep_session_name())), $navigation->snapshot['mode']);
	  $navigation->clear_snapshot();
	  tep_redirect($origin_href);
	} else {
	  tep_redirect(tep_href_link(FILENAME_DEFAULT));
	}
  }
}

 

 

FILENAME_DEFAULT is defined in includes/filenames like this:

 

line 24

 

define('FILENAME_DEFAULT', 'index.php');

 

add your own line such as

define('FILENAME_MYPAGE, 'mypage.php');

 

and change the line

tep_redirect(tep_href_link(FILENAME_DEFAULT));

 

in the code above from login.php to:

 

tep_redirect(tep_href_link(FILENAME_MYPAGE));

 

thats is job done!

Archived

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

×
×
  • Create New...