Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Adding a rediredect to my code

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 01-22-2008, 09:29 AM
 
Topuk Topuk is offline
 

Member
  
Join Date: Dec 2007
Posts: 23
 

Default 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?
__________________
Topuk

http://www.northidahoflix.com
http://www.lotionsandpotionsonline.com

X-Cart Version 4.1.9
Reply With Quote
  #2  
Old 01-25-2008, 08:20 AM
  SpinyMan's Avatar 
SpinyMan SpinyMan is offline
 

Advanced Member
  
Join Date: Jan 2008
Posts: 30
 

Default 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
__________________
Regards,
SpinyMan

X-Cart Templates Store -
http://www.x-cart-customization.com/shop/

X-Cart Customization Services -
http://www.x-cart-customization.com/
Reply With Quote
  #3  
Old 02-06-2008, 09:50 AM
 
Topuk Topuk is offline
 

Member
  
Join Date: Dec 2007
Posts: 23
 

Default 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?
__________________
Topuk

http://www.northidahoflix.com
http://www.lotionsandpotionsonline.com

X-Cart Version 4.1.9
Reply With Quote
  #4  
Old 02-12-2008, 07:57 AM
  SpinyMan's Avatar 
SpinyMan SpinyMan is offline
 

Advanced Member
  
Join Date: Jan 2008
Posts: 30
 

Default 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";
__________________
Regards,
SpinyMan

X-Cart Templates Store -
http://www.x-cart-customization.com/shop/

X-Cart Customization Services -
http://www.x-cart-customization.com/
Reply With Quote
  #5  
Old 02-12-2008, 02:01 PM
 
Topuk Topuk is offline
 

Member
  
Join Date: Dec 2007
Posts: 23
 

Default Re: Adding a rediredect to my code

does this work within the cart itself? i cannot find that require within the cart
__________________
Topuk

http://www.northidahoflix.com
http://www.lotionsandpotionsonline.com

X-Cart Version 4.1.9
Reply With Quote
  #6  
Old 02-12-2008, 02:15 PM
 
Topuk Topuk is offline
 

Member
  
Join Date: Dec 2007
Posts: 23
 

Default Re: Adding a rediredect to my code

forget it lol... found it and thank you for your help Spinyman
__________________
Topuk

http://www.northidahoflix.com
http://www.lotionsandpotionsonline.com

X-Cart Version 4.1.9
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 10:28 PM.

   

 
X-Cart forums © 2001-2020