1

In the persistent cart steps, customer is sent to the login page to re-enter the login information. What I want to do is if the customer is logged in (step also adds "Not" in welcome msg header), I want to auto populate email address in the login form. But since no sessions(customer and checkout) are available at this point I cant do it. What would be the best way to achieve this?

2

You can get the customer id like this:

$sessionModel = Mage::helper('persistent/session');
$customerId = $sessionModel->getCustomerId();

then you can easily get the e-mail address.

$customer = Mage::getModel('customer/customer')->load($customerId);
$email = $customer->getEmail();

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.