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

Login Redirect...

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #11  
Old 07-26-2005, 06:50 PM
  eaglemobiles's Avatar 
eaglemobiles eaglemobiles is offline
 

Senior Member
  
Join Date: Jan 2005
Posts: 167
 

Default

I want to redirect customer to orders.php cant fine the code in include/login.php
__________________
X-Cart Gold 4.3.2
X-Cart Gold 4.4.1
Unix

High Quality CCTV DVRs & Cameras
http://www.eaglemobiles.co.uk/CCTV
Reply With Quote
  #12  
Old 08-11-2005, 04:40 AM
 
mmoskva mmoskva is offline
 

eXpert
  
Join Date: Aug 2005
Location: Pennsylvania
Posts: 306
 

Default

I want to redirect the customer to either the cart page or to their account page is nothing is in the cart, what code do I place in for that?
__________________
x-cart 4.0.16v
linux server
Reply With Quote
  #13  
Old 08-12-2005, 10:11 PM
 
whsu716 whsu716 is offline
 

Senior Member
  
Join Date: Jun 2005
Posts: 168
 

Default

Quote:
Originally Posted by mmoskva
I want to redirect the customer to either the cart page or to their account page is nothing is in the cart, what code do I place in for that?

if(!func_is_cart_empty($cart))
func_header_location($redirect_to."/cart.php");
else
func_header_location($redirect_to."/account.php");


Anyone know how to have it redirect to the previous page???
__________________
...
v 4.0.18; 4.1
Reply With Quote
  #14  
Old 11-09-2005, 05:41 AM
 
xgarb xgarb is offline
 

eXpert
  
Join Date: Jul 2004
Location: UK
Posts: 263
 

Default

Quote:
What I would like to do is simply redirect the end user back to the page they were prior to logging in.

When end user clicks log in, they go to a secure login page. Once logged in, I want to be able to send them back to their original page.

This would be useful on a lot of pages. Click a button, get the action processed and return to the same page. The same as 'add to cart' with 'redirect to cart' switched off - this is achieved in cart.php by func_header_location($HTTP_REFERER);
....

Code:
if($config["General"]["redirect_to_cart"]=="Y") { func_header_location("cart.php"); } else{ if(!empty($HTTP_REFERER)) { func_header_location($HTTP_REFERER); } else { func_header_location("home.php?cat=$cat&page=$page"); }

I think firewalls that block the referrer might cause this to fail tho.
__________________
Core version: 5.5.xx
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 02:29 AM.

   

 
X-Cart forums © 2001-2020