Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Making a page members only


JB04

Recommended Posts

I have modified the default so it does not have the top nav bar, instead I have my own links where people can log in and access various pages, but how do I make it so they can only access these pages when logged in, when not logged in they will be returned to the default login.php page when they try to access these restricted pages.

 

Thanks for any help

Link to comment
Share on other sites

under:

 

require('includes/application_top.php');

 

add:

 

if (!tep_session_is_registered('customer_id')) {

$navigation->set_snapshot();

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

}

Your online success is Paramount.

Link to comment
Share on other sites

Lovely, thanks, works like a charm.

 

Three other things maybe you can help with?

 

How do I place the log off link on every page only when people are logged in?

 

Do you have any advice on making the pages w3 compliant, the style sheet is ok but the whole design is a mess, by which I mean tables nested within each other many times and lots of redundant code, can it be done? would I declare the document as html or xhtml?

 

How do I make my custom .shtml error pages display with my design footer and header, I've tried a few things but my knowledge with php is rock bottom, in fact I've only just started using it and learnt a little through customizing oscommerce, so far I like it and are impressed with it's capabilities.

 

Thanks again

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...