If this is part of the one page checkout and you are working in a controller that extends Mage_Checkout_OnepageController
, as the comments suggest what you should be able to do to get the shipping or billing information is call:
$this->getQuote()->getBillingAddress();
$this->getQuote()->getShippingAddress();
Another way of doing this could be to use the getAddressAction
if you already know the address id then it might be worth considering this as this will return the address in json form:
/**
* Address JSON
*/
public function getAddressAction()
{
if ($this->_expireAjax()) {
return;
}
$addressId = $this->getRequest()->getParam('address', false);
if ($addressId) {
$address = $this->getOnepage()->getAddress($addressId);
if (Mage::getSingleton('customer/session')->getCustomer()->getId() == $address->getCustomerId()) {
$this->getResponse()->setHeader('Content-type', 'application/x-json');
$this->getResponse()->setBody($address->toJson());
} else {
$this->getResponse()->setHeader('HTTP/1.1','403 Forbidden');
}
}
}