Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable redirecting to continue checkout if customer data was incomplete #111

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion app/code/core/Mage/Checkout/Controller/Action.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,10 @@ protected function _preDispatchValidateCustomer($redirect = true, $addErrors = t
}
}
if ($redirect) {
$this->_redirect('customer/account/edit');
$referer = Mage::getUrl('*/*/*', array('_current' => true, '_use_rewrite' => true));
$referer = Mage::helper('core')->urlEncode($referer);
$arguments = array(Mage_Core_Controller_Varien_Action::PARAM_NAME_URL_ENCODED => $referer);
$this->_redirect('customer/account/edit', $arguments);
$this->setFlag('', self::FLAG_NO_DISPATCH, true);
}
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -805,7 +805,7 @@ public function editPostAction()
$this->_getSession()->setCustomer($customer)
->addSuccess($this->__('The account information has been saved.'));

$this->_redirect('customer/account');
$this->_redirectSuccess('customer/account');
return;
} catch (Mage_Core_Exception $e) {
$this->_getSession()->setCustomerFormData($this->getRequest()->getPost())
Expand Down
1 change: 1 addition & 0 deletions app/code/core/Mage/Customer/view/frontend/form/edit.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
<?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
<form action="<?php echo $this->getUrl('customer/account/editPost') ?>" method="post" id="form-validate">
<div class="fieldset">
<input type="hidden" name="<?php echo Mage_Core_Controller_Varien_Action::PARAM_NAME_SUCCESS_URL ?>" value="<?php echo $this->htmlEscape($this->getRefererUrl()) ?>">
<?php echo $this->getBlockHtml('formkey')?>
<h2 class="legend"><?php echo $this->__('Account Information') ?></h2>
<ul class="form-list">
Expand Down