Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Code to redirect to Login.php


Alk

Recommended Posts

Hi,

 

I need to add a section to the catalog and I wish to ensure that the user is logged in before they can access the page, so what is the process for the redirect to the login.php page?

 

i.e. From product_info.php I can click on the link for Notifications and will be redirected to login.php if I am not already logged in, I can't immediately see any code for this so where does this redirect take place?

 

:blink:

 

Cheers,

 

Alk

Link to comment
Share on other sites

The code is in catalog/includes/application_top.php - look for the code from:

 

 case 'notify' :

 

You will see a check for registered session and:

 

} else {
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?tep_redirect(tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action', 'notify'))));
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?}

 

tep_redirect is the function to use :D

 

Matti

Link to comment
Share on other sites

The code is in catalog/includes/application_top.php - look for the code from:

 

 case 'notify' :

 

You will see a check for registered session and:

 

} else {
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?tep_redirect(tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action', 'notify'))));
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?}

 

tep_redirect is the function to use  :D

 

Matti

 

Sneaky wee code, ta Johnson :thumbsup:

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...