Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Login - Auto Redirection


CC

Recommended Posts

I have been pondering something and investigating to no evail, and need your help if you can...

 

For some reason I have lost the auto redirect after you are asked to login when you go to your account.

 

i.e. - I turn up on my site, and I click 'My Account', naturally I am taken to the login.php page and I login, and this is successful.

The problem is instead of being redirected to the account.php page automatically I get sent back to the index.php page. :?

 

Now I do have a massive amount of mods, but I wonder if anyone knows where the function for this is so I can check it?

 

I have searched high and low, but not found it.

 

Can you let me know if you have experienced this, or know how to fix it please guy n gals?

 

Cheers :bigups:

 

CC.

Link to comment
Share on other sites

Hi Steve!

 

The redirects are at the top of the login.php....Have you installed the redirect back to the page you logged in from?

Link to comment
Share on other sites

Took me a minute to find the page I wanted......Here's the stock redirect from MS1

 

// restore cart contents

       $cart->restore_contents();



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

       }

     }

   }

 }

Link to comment
Share on other sites

Thanks Kim

 

I'll take a look, I am using 2.2 from Dec 23 03, but this is a great start.

I have looke all thru login.php, so maybe I am just missing something.

 

What do you mean by:

Have you installed the redirect back to the page you logged in from?

 

Are you asking if I have installed a mod?

 

CC.

Link to comment
Share on other sites

Are you asking if I have installed a mod?

 

Well...it's not a "packaged" mode per se.....There is a thread in the Tips and Tricks......

 

BTW- Does it always return to default no matter which page you login from?

Link to comment
Share on other sites

Ok, I will look up the tips and tricks section.

 

No it doesnt happen on every login, if I am checking out it redirects fine, but if I am just logging into my account to check something it redirects back to index.

 

pfffff... :?

 

CC.

Link to comment
Share on other sites

Cheers Kim

 

Sorted it now.

 

I have used that code Joshua provided in T&T forum, modded it a tiny bit and 'Robert is now my Mother's Brother!' :wink:

 

Thanks you little gem you. :D

 

CC.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...