When guest user has already added addresses, I have to move from step 1 (select checkout method) to shipping method step. I have tried following code in overrided class Mage_Checkout_Model_Type_Onepage in method saveCheckoutMethod. However this is not working, guest goes to Billing Address step, but message "Setting step shipping_method." is printed to Magento log. Is there any way to go directly to shipping method step and skip two address steps programmatically?
public function saveCheckoutMethod($method)
{
if (empty($method)) {
return array('error' => -1, 'message' => $this->_helper->__('Invalid data.'));
}
$this->getQuote()->setCheckoutMethod($method)->save();
$quote = $this->getQuote();
if($quote->getBillingAddress()->validate() && $quote->getShippingAddress()->validate())
{
$this->getCheckout()
->setStepData('billing', 'complete', false)
->setStepData('shipping', 'complete', false)
->setStepData('shipping_method', 'allow', true);
Mage::log("Setting step shipping_method.");
}
else
{
$this->getCheckout()->setStepData('billing', 'allow', true);
}
return array();
}