Guest Posted April 1, 2006 Posted April 1, 2006 Is there a way / setting within osCommerce somewhere to force a user to login before he / she can view any products in my catalog? We are setting up a dealer site and we'd like to show the login screen immediately, forcing the user to create an account or login to their existing account before they can browse. Thanks for any help...
compwhizmm90 Posted April 2, 2006 Posted April 2, 2006 Is there a way / setting within osCommerce somewhere to force a user to login before he / she can view any products in my catalog? We are setting up a dealer site and we'd like to show the login screen immediately, forcing the user to create an account or login to their existing account before they can browse. Thanks for any help... I have been trying to do this for a long time and I finally figured it out. simply paste this code in you applicationtop and that will only allow people to create an account or use the contactus.php feature. It will also allow them to use the forgot password feature. if ( (!tep_session_is_registered('customer_id')) && (!strstr($_SERVER['PHP_SELF'],'login.php')) ) { if ( (!strstr($_SERVER['PHP_SELF'],'create_account.php')) && (!strstr($_SERVER['PHP_SELF'],'password_forgotten.php')) && (!strstr($_SERVER['PHP_SELF'],'create_account_success.php')) && (!strstr($_SERVER['PHP_SELF'],'contact_us.php'))) { $navigation->set_snapshot(); tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL')); } } I even added the member approval contribution to prevent fake dealers from signing up Hope that helps :)
Recommended Posts
Archived
This topic is now archived and is closed to further replies.