Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Change where "Login" button lands.


themonastery

Recommended Posts

Hey,

 

I have a minor problem. I want to change the page that the customer lands on after they log in to osCommerce. I am familiar with the login.php file as well as the includes/language/english/login.php file. The page was changed by our former webmaster and now the link is broken so the customer lands on an error page whenever they log in. Could anyone point me to where I can change this so it redirects to the homepage or something?

 

Thanks!

Link to comment
Share on other sites

Towards the top of /catalog/login.php the default code looks like this:

 

 

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

The former webmaster has most likely changed one of the lines that contain tep_redirect to point to this now non-existant page.

 

The code:

 

tep_redirect(tep_href_link(FILENAME_DEFAULT));

Would be the standard osC code to go to the homepage.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

Towards the top of /catalog/login.php the default code looks like this:

 

 

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

The former webmaster has most likely changed one of the lines that contain tep_redirect to point to this now non-existant page.

 

The code:

 

tep_redirect(tep_href_link(FILENAME_DEFAULT));

Would be the standard osC code to go to the homepage.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...