Guest Posted May 15, 2008 Posted May 15, 2008 Hiya. I have a website, www.vendorsmartfleamarket.com , and am using OSCOMMERCE 2.2rc2. This is a non retail site, so I have removed the shopping cart, and the majority of product links. The kink I have ran into though is, I am wanting certain parts of the site restricted to "members only". I cannot seem to find a contribution for this. I have found a contribution to make the whole site private (which I am using now), but I would like to undo that, because it stops potential customer traffic. So my question is "How to I password protect certain pages, but not the rest, ie.... my Newsletter page? If you have a solution please feel free to email me, or respond to this post. Thanks, Josh
germ Posted May 16, 2008 Posted May 16, 2008 One way is to add this code snippet: // if the customer is not logged on, redirect them to the login page if (!tep_session_is_registered('customer_id')) { tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL')); } At the top of the page just BELOW this line: require('includes/application_top.php'); If your site doesn't support SSL, change that to NONSSL in the code I posted. If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
Recommended Posts
Archived
This topic is now archived and is closed to further replies.