As you are working in Zen Cart - here is some code from the checkout_process.php file -
This is the check if they are logged in and if not sends them to login and then returns them to the checkout
the snapshot is what you want and this has to be set from whence they came
Code:
// validate customer
if (zen_get_customer_validate_session($_SESSION['customer_id']) == false) {
$_SESSION['navigation']->set_snapshot(array('mode' => 'SSL', 'page' => FILENAME_CHECKOUT_SHIPPING));
zen_redirect(zen_href_link(FILENAME_LOGIN, '', 'SSL'));
}
}
Bookmarks