Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Do not Display Columns until they are logged in


sandwick

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 (REQUIRE_LOGIN_FOR_SITE_ACCESS == 'True') {

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();

if (REQUIRE_LOGIN_FOR_SITE_ACCESS_URL == 'Current Site') {

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

} else {

tep_redirect(REQUIRE_LOGIN_FOR_SITE_ACCESS_URL);

}

}

}

}

//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 !

Sandwick

post-213634-0-82438700-1358435556_thumb.png

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

Archived

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

×
×
  • Create New...