Magento – How to Get Shipping Address by Shipping Address ID

magento-1.7shipping-address

I have the order object. From that I can get the shipping address id. Can anyone suggest how to derive Shipping address by shipping address id?

Best Answer

You could use the order_address object to get the shipping address:

 $address = Mage::getModel('sales/order_address')->load($shippingId);
// $shippingId is the id you get from order object.
$custName = $address->getName();
$custAddr = $address->getStreetFull();
$region = $address->getRegion();
$country = $address->getCountry();

or use

print_r(get_class_methods($address)); 

to see what are the methods that can be used on the address object ($address).

hope it solves your prob :)