JoyC Posted February 22, 2004 Posted February 22, 2004 I have seen this question asked before, but there was no response, i want to restrict access to a certain category, ie adult products - does anyone have any hints as to how to go about this? rgds Joy Last month, i only knew how to spell PHP, this month i have mastered the art of swearing in php!
mansa77 Posted February 24, 2004 Posted February 24, 2004 Hello, i had faced this problem but although no direct way but this one worked for me took index.php file from catalog manually placed my content ,images text etc and saved it as mylink.php and to assure that user must be logged in i took this code from login script and placed it on top of the my page. <?php require('includes/application_top.php'); ?> <?php if (!tep_session_is_registered('customer_id')) { $navigation->set_snapshot(); tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL')); } ?> alsosee that delte require("includes......); line may be already present so delete it if it is their. Also it is important the file should be in /ctalog folder and not anywhere else. What The script is doing , is that it checks for users cookie setting now if he is not a registered user or has not logged in it will take him to login,or new user page and after that when user does that it will automatically load your custom page. This worked fine for me although may not be the best.!!
JoyC Posted March 2, 2004 Author Posted March 2, 2004 thanks - that gives me something to work with! cheers J Last month, i only knew how to spell PHP, this month i have mastered the art of swearing in php!
mrbill Posted March 18, 2004 Posted March 18, 2004 Thanks Mansa77 for this tip and thanks to JoyC for asking. Works great. osC details osCommerce 2.2-MS2 PHP Version: 4.3.8 (Zend: 1.3.0) Apache Release 10331100 MySQL 4.0.27-standard
Recommended Posts
Archived
This topic is now archived and is closed to further replies.