Quote:
Originally Posted by cherie
Here's an old code sample for 4.0/4.1 that might get you started:
In include/login.php, replace:
PHP Code:
if (!func_is_cart_empty($cart)) {
with:
PHP Code:
if ($login_type == "C") {
func_header_location($redirect_to."/pages.php?pageid=29");
} elseif (!func_is_cart_empty($cart)) {
|
Works great in 4.5.4 -- except it fails on checkout page (OPC w/ajax)
What I did:
include/login.php
find:
PHP Code:
if (!func_is_cart_empty($cart)) {
replace:
PHP Code:
// EDIT Redirect to account page on login
//if (!func_is_cart_empty($cart)) {
if ($login_type == "C") {
func_header_location($redirect_to.'register.php?mode=update');
} elseif (!func_is_cart_empty($cart)) {
// END Redirect to account page on login
On any page except OPCajax, a link to /login.php goes to /login.php and provides a form. After the customer logs in, customer is redirected to /register.php?mode=update -- exactly what I want.
However, if the login process starts on the OPCajax checkout page, the link to login makes a popup -- and then the login happens, but the popup hangs. If the customer closes the popup and reloads the page, the login was successful -
Anyone have a suggestion as to how to get this code working with the OPCajax login popup?
Thx
J