Totally Zenned
- Join Date:
- Jul 2005
- Location:
- Brooklyn NY
- Posts:
- 498
- Plugin Contributions:
- 0
Redirect after login is wrong how do I change it?
when I add something to the cart and then go to check out and it asks me to log in after I login it takes me to the front page not to the check out how can I fix that? It does the same thing when I create an account.
here is the codes I found.
/includes/modules/pages/login/header_php.php
$sql = "UPDATE " . TABLE_CUSTOMERS_INFO . "
SET customers_info_date_of_last_logon = now(),
customers_info_number_of_logons = customers_info_number_of_logons+1
WHERE customers_info_id = :customersID";
$sql = $db->bindVars($sql, ':customersID', $_SESSION['customer_id'], 'integer');
$db->Execute($sql);
$zco_notifier->notify('NOTIFY_LOGIN_SUCCESS');
// restore cart contents
$_SESSION['cart']->restore_contents();
/*
if ($_SESSION['cart']->count_contents() > 0) {
zen_redirect(zen_href_link(FILENAME_CHECKOUT_SHIPPING));
}
/includes/modules/pages/create_account_success/header_php.php
if (sizeof($_SESSION['navigation']->snapshot) > 0) {
$origin_href = zen_href_link($_SESSION['navigation']->snapshot['page'], zen_array_to_string($_SESSION['navigation']->snapshot['get'], array(zen_session_name())), $_SESSION['navigation']->snapshot['mode']);
$_SESSION['navigation']->clear_snapshot();
} else {
$origin_href = zen_href_link(FILENAME_DEFAULT);
}
// redirect customer to where they came from if their cart is not empty and they didn't click on create-account specifically
if ($_SESSION['cart']->count_contents() > 0) {
if ($origin_href != zen_href_link(FILENAME_DEFAULT)) {
zen_redirect($origin_href);
}
}