Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Changing the redirect after login


Guest

Recommended Posts

Posted

I would like to change the page a user is taken to when they login. ANy suggestions on how to do this?

 

thanks in advance

Posted

The redirect may be found in catalog/login.php:

 

        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));
       }

 

This code will direct the user to their account page after login if they clicked the account link, or to the checkout if they clicked checkout while not logged in, or to the main page of the catalog (FILENAME_DEFAULT).

 

I suppose you could change it to simply:

 

tep_redirect(tep_href_link(FILENAME_YOUR_FILE));

 

Matti

  • 5 months later...
Posted

Along the same lines as this topic, I am trying to change the redirect of the failed login. I made a custom error page, but can not figure out how to do this. Please can somebody help.

Archived

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

×
×
  • Create New...