I have implemented wish list button in product detail page and it is working as expected.
For the users who has logged in, I can redirect to wish list page.
For the users who has not logged in, I am asking to log in and trying to redirect to product detail page again for wish list but it is not working. It always redirects to Profile.php page.
Could you please help me how to resolve this issue?
Partial of login.php page is as follows:
<?php
if($_SERVER["REQUEST_METHOD"] == "POST"){
$WA_Auth_Parameter = array(
"connection" => $cwconn,
"database" => $database_cwconn,
"tableName" => "dim_customer",
"columns" => explode($WA_Auth_Separator,"Email".$WA_Auth_Separator."Password"),
"columnValues" => explode($WA_Auth_Separator,"".((isset($_POST["username"]))?$_POST["username"]:"") ."".$WA_Auth_Separator."".((isset($_POST["userpassword"]))?$_POST["userpassword"]:"") .""),
"columnTypes" => explode($WA_Auth_Separator,"text".$WA_Auth_Separator."text"),
"sessionColumns" => explode($WA_Auth_Separator,"Customer_Code"),
"sessionNames" => explode($WA_Auth_Separator,"Customer_Code"),
"successRedirect" => "Profile.php",
"failRedirect" => "Emailpwd.php",
"gotoPreviousURL" => TRUE,
"keepQueryString" => TRUE
);
WA_AuthenticateUser($WA_Auth_Parameter);
}
?>