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?


3 Answers 3


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


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

hope it solves your prob :)


To get the Address from an order object you could simple do $order->getShippingAddress()


$order_id = 123; // put your order id here
$order = Mage::getModel('sales/order')->load($order_id);


$address = $order->getShippingAddress();
$custName = $address->getName();
$custAddr = $address->getStreetFull();
$region = $address->getRegion();
$country = $address->getCountry();
  • I've already solved my question months ago. Even though appreciate the response. +1
    – Sukeshini
    Commented Dec 31, 2013 at 3:05
  • $address is empty when i use $address = $order->getShippingAddress() but when i use $address = Mage::getModel('sales/order_address')->load($shippingId); It returns the address Commented Jul 28, 2017 at 7:29

Shathish has given you a nice and correct answer.

However, you can use the singleton method and a query:

$shimnetId = "1"; // use your shipment id: 

$read = Mage::getSingleton('core/resource')->getConnection('core_read');

$query = "SELECT * FROM sales_flat_order_address WHERE entity_id='".$shipmentId."'";

$results = $read->fetchAll($query);


sales_flat_order_address contains both the billing and shipping address.

Hope it will work for you.

  • 2
    I didn't tested your solution. But I think developing according to the way the Magento has developed is better rather than using direct SQL queries in the source. Anyway appreciate your suggestion. Thank you
    – Sukeshini
    Commented Sep 25, 2013 at 5:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.