Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

making a page available for only registered customers


yanarasod

Recommended Posts

i have a page which i want only registered users to see. suppose a page xyz.php from there a link to member page xyzdownload.php, if the visitor is logged in, it would take them to the page else redirect to login, and then from login going back to xyzdownload.php. and if new customer then he registers himslef and is taken back to the xyzdownload.php page from create accout. thanks

Link to comment
Share on other sites

Dear Gourav,

The method to test if the customer is logged in is ....

if (!tep_session_is_registered('customer_id'))

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

// continue executing the code

 

Find the program which transfers you to xyz.php and put this test

infront of the code...

 

I hope this helps

dittone.com

Roman

Link to comment
Share on other sites

well what i probably found is this in account.php

 

if (!tep_session_is_registered('customer_id')) {

$navigation->set_snapshot();

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

}

 

your code's slightly different, any reasons

Link to comment
Share on other sites

i added this in my page,

 

if (!tep_session_is_registered('customer_id')) {

$navigation->set_snapshot();

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

}

 

and now it takes me to the login screen but after that an HTTP 404 not found error is reported, but could cause this

Link to comment
Share on other sites

ok, if i am logged in prior to going to that page no error is reported, but when i click on the link xyzdownload.php in the page xyz.php, then after aking to the logging screen it reports a 404 error, is there something more needed to do

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...