Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Do not Display Columns until they are logged in


Recommended Posts

I have added the following code, customers must login to see products. See image . . . The code has been added to the bottom of "application_top.php"


//require login begin


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'))) {



tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));

} else {






//require login end



This code works, except it is still displaying the left column on the screen, how do I disable the left column so it does not show up until the customer has logged in ?


Any help would be appreciated.


Running the following :


OsCommerce 2.3.3

PHP 5.4

MySql 5


Thanks in advance !



Link to comment
Share on other sites

  • 2 weeks later...

each customer has a customer id when they signup an account on your site, so you can using customer = to 0 or not to run the if condition on each page to let the page shows your left_column.php or not.

Link to comment
Share on other sites


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

  • Create New...