Skip to content

Instantly share code, notes, and snippets.

@bryanlittlefield
Created December 18, 2013 00:08
Show Gist options
  • Select an option

  • Save bryanlittlefield/8015144 to your computer and use it in GitHub Desktop.

Select an option

Save bryanlittlefield/8015144 to your computer and use it in GitHub Desktop.
[MAGENTO] How to get order shipping address details by order id
$incrementid ="100000004";
$_order = Mage::getModel('sales/order')->loadByIncrementId($incrementid);
OR
$order_id ="4";
$_order = Mage::getModel('sales/order')->load($order_id);
$_shippingAddress = $_order->getShippingAddress();
echo $_shippingAddress->getFirstname() . '
';
echo $_shippingAddress->getLastname() . '
';
echo $_shippingAddress->getCompany() . '
';
echo $_shippingAddress->getStreetFull() . '
';
echo $_shippingAddress->getRegion() . '
';
echo $_shippingAddress->getCity() . '
';
echo $_shippingAddress->getPostcode() . '
';
echo $_shippingAddress->getTelephone() . '
';
echo $_shippingAddress->getCountry_id() . '
';
echo $_order->getCustomerId();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment