Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Display no products if not logged in?


cgchris99

Recommended Posts

You can put the following line in every file in catalog folder (except index.php, password_forgotten.php, login.pho and logoff.php or the pages you do not want to protect):

 

// if the customer is not logged on, redirect them to the login page

  if (!tep_session_is_registered('customer_id')) {

    $navigation->set_snapshot();

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

  }

 

below the line:

 

require('includes/application_top.php');
Link to comment
Share on other sites

Archived

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

×
×
  • Create New...