Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Only allow registered users to view catalog/products


Guest

Recommended Posts

Posted

Just wondering if anyone can point me in the right direction.. I know its out there, I just cant locate it in the search..

 

Thanks in advance..

Posted
Just wondering if anyone can point me in the right direction.. I know its out there, I just cant locate it in the search..

 

Thanks in advance..

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 need to make a contribution for this, this is the second time I posted this code tonight

Is this what you were looking for?

Posted

Worked perfectly, if anyone else needs this, be sure to add it at the end of your application_top.php and not the beginning..

 

Thanks alot!

Archived

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

×
×
  • Create New...