X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Adding a rediredect to my code (https://forum.x-cart.com/showthread.php?t=36938)

Topuk 01-22-2008 09:29 AM

Adding a rediredect to my code
 
does anyone know a line of code that i can add and when so that when we have a customer not logged in they will be redirected to the registration page?

secondly does anyone know a php code that i can put on a page outside the cart to check if the logged in cookie is present?

SpinyMan 01-25-2008 08:20 AM

Re: Adding a rediredect to my code
 
Quote:

Originally Posted by Topuk
does anyone know a line of code that i can add and when so that when we have a customer not logged in they will be redirected to the registration page?


if(!$login) func_header_location('register.php');

Quote:

Originally Posted by Topuk
secondly does anyone know a php code that i can put on a page outside the cart to check if the logged in cookie is present?


$some_var=$HTTP_COOKIE_VARS['xidC_remember'];
//it was return a cookie string with logged in name (ex. "tester")
//else it will be an epmty string

Topuk 02-06-2008 09:50 AM

Re: Adding a rediredect to my code
 
if(!$login) func_header_location('register.php');

Is this smarty or php? where in the code would you suggest i put it?

SpinyMan 02-12-2008 07:57 AM

Re: Adding a rediredect to my code
 
this is PHP.
Put it in the php file where you want to monitor after
Code:

require "./auth.php";

Topuk 02-12-2008 02:01 PM

Re: Adding a rediredect to my code
 
does this work within the cart itself? i cannot find that require within the cart

Topuk 02-12-2008 02:15 PM

Re: Adding a rediredect to my code
 
forget it lol... found it and thank you for your help Spinyman


All times are GMT -8. The time now is 11:19 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.