For 4.0.8 login.php
FIND:
Code:
if (!func_is_cart_empty($cart)) {
if(strpos($HTTP_REFERER, "mode=auth") === false) {
func_header_location($redirect_to."/cart.php");
} else {
func_header_location($redirect_to."/cart.php?mode=checkout");
}
Replace with:
Code:
if (!func_is_cart_empty($cart)) {
if($redirect2 == "checkout")
func_header_location($redirect_to."/cart.php?mode=checkout");
elseif(strpos($HTTP_REFERER, "mode=auth") === false) {
func_header_location($redirect_to."/cart.php");
} else {
func_header_location($redirect_to."/cart.php?mode=checkout");
}