dianikol Posted June 10, 2010 Posted June 10, 2010 hi to all. i am new to oscommerce. i just install it on localhost using mac os x and mamp. so far so good. When the installation completed i went to frontend store and i created a new customer. then i try to login but it send me to the index.php instead of my account. any suggestions? thank you in advance
FIMBLE Posted June 10, 2010 Posted June 10, 2010 you can change this behaviour in the login.php line 60 find 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)); } } } } change to 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_ACCOUNT)); } } } } What this bit of code does is to check the URL you came from and will return you there once logged in unless you are en route to the checkout pages. Now when a user logs in they will be directed to the account page, as you requested. Niv Sometimes you're the dog and sometimes the lamp post [/url] My Contributions
dianikol Posted June 10, 2010 Author Posted June 10, 2010 :( now it directes me again in the login screen with the fields been empty. what is wrong?? the installation is fresh
Recommended Posts
Archived
This topic is now archived and is closed to further replies.