1
votes

I am using an observer to check the shipping information provided by the customer during onepage checkout. By observing the event checkout_controller_onepage_save_shipping_method I want to redirect the customer back to the shipping step to re-enter their information.

Following the conversation on this page, What is the correct way to stop a checkout from an event observer in Magento?, I have everything set up, but I do not want to redirect them to cart, just the shipping step.

Mage::app()->getResponse()->setRedirect(Mage::getUrl('what/goes/here'));

Can I make the code simply refresh the page? Mage::app()->getResponse()->setRedirect(Mage::getUrl('checkout/onepage')); does not work.

Thanks!

2

2 Answers

0
votes

url = checkout/onepage/shipping_method

0
votes
if ($backUrl = $this->_getRefererUrl()) {
    $this->getResponse()->setRedirect($backUrl);
}