function to know that there is any shipping method available
public function haveShippingMethods() { if (count(Mage::getSingleton('checkout/session')->getQuote()->getShippingAddress()->getShippingRatesCollection())) { return true; } return false; }
use this code to get an array of billing address and shipping address
$all_data = array(); $customer = Mage::getModel(‘customer/session’)->getCustomer(); foreach($customer->getAddressesCollection() as $customer_address) { $all_data[] = $customer_address; } var_dump($all_data);