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)
-   -   Login Redirect... (https://forum.x-cart.com/showthread.php?t=12863)

eaglemobiles 07-26-2005 06:50 PM

I want to redirect customer to orders.php cant fine the code in include/login.php

mmoskva 08-11-2005 04:40 AM

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?

whsu716 08-12-2005 10:11 PM

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???

xgarb 11-09-2005 05:41 AM

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.


All times are GMT -8. The time now is 07:50 AM.

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