I've 1.9.1.0 version of magento.
So far after researching I've deleted the lines under
app/code/core/Mage/Checkout/controllers/OnepageController.php
These lines
$action = $this->getRequest()->getActionName();
if (Mage::getSingleton('checkout/session')->getCartWasUpdated(true)
&& !in_array($action, array('index', 'progress'))
) {
$this->_ajaxRedirectResponse();
return true;
}
I'm still noticing that when I enter credentials under one page checkout, it still redirects to cart page. It must redirects to the checkout page itself.
Here is the HTML
<form id="login-form" action="<?php echo $this->getPostAction() ?>" method="post">
<?php $checkout_link = Mage::helper('checkout/url')->getCheckoutUrl(); ?>
<input type="hidden" value="<?php echo $checkout_link; ?>" name="login_redirect" />
<input type="hidden" name="wronrg_redirect" value="<?php echo $this->helper('core/url')->getCurrentUrl(); ?>" />
<fieldset>
<h4><?php echo $this->__('Already registered?') ?></h4>
<p><?php echo $this->__('Please log in below:') ?></p>
<ul class="form-list">
<li>
<?php $title = Mage::getStoreConfig('sms_section/sms_group/title'); ?>
<?php /*?> <label for="mobilenumber" class="required"><em>*</em><?php echo $this->__('%s',$title) ?></label><?php */?>
<div class="input-box">
<input type="text" name="login[mobilenumber]" value="<?php echo $this->htmlEscape($this->getMobilenumber()) ?>" id="mobilenumber" class="input-text required-entry" title="<?php echo $this->__('%s',$title) ?>" placeholder="Mobile/Email" />
</div>
</li>
<li>
<?php /*?> <label for="login-password" class="required"><em>*</em><?php echo $this->__('Password') ?></label><?php */?>
<div class="input-box">
<input type="password" class="input-text required-entry" id="login-password" name="login[password]" placeholder="Password" />
</div>
</li>
</ul>
</fieldset>
</form>
<button type="submit" class="button btn pull-right" onclick="onepageLogin(this)"><span><span><?php echo $this->__('Login') ?></span></span></button>
Best Answer
I have faced the similar issue once on Magento 1.5 and fixed it by increasing the cookie life time to 86400 under
The Reason that I found out after doing some research on internet and different forum is that in Magento, by default cookie lifetime is set to 3600 (1 hour). But if the end users computer time runs ahead of server’s time, cookies will not get set for Magento frontend as well as backend. For example, end user’s computer time is 1 hour forward than server’s time, that means the cookie (holding user’s session id) will expire as soon as user logs in or tries to add an item.
Also try debugging the code and check what is the error.