$orderId = '10000015';
$order = Mage::getModel('sales/order')->load($orderId);
// For getting Customer Order Info
$order->getCustomerId(); // get customer Id
$order->getCustomerEmail(); // get customer email
print_r($order->getData()); //show all order data
// For getting Product Order Info
$items = $order->getAllItems();
foreach ($items as $itemId => $item){
$item->getName(); // get order product name
print_r$item->getData()); //show all order product data
}
// For getting Shipping Order Info
$shippingId = $order->getShippingAddress()->getId();
$shipAddress = Mage::getModel('sales/order_address')->load($shippingId);
print_r($shipAddress->getData());
If you want Billing/Shipping Country name see here
// For getting Billing Order Info
$billingId = $order->getBillingAddress()->getId();
$billAddress = Mage::getModel('sales/order_address')->load($billingId);
print_r($billAddress->getData());
$order = Mage::getModel('sales/order')->load($orderId);
// For getting Customer Order Info
$order->getCustomerId(); // get customer Id
$order->getCustomerEmail(); // get customer email
print_r($order->getData()); //show all order data
// For getting Product Order Info
$items = $order->getAllItems();
foreach ($items as $itemId => $item){
$item->getName(); // get order product name
print_r$item->getData()); //show all order product data
}
// For getting Shipping Order Info
$shippingId = $order->getShippingAddress()->getId();
$shipAddress = Mage::getModel('sales/order_address')->load($shippingId);
print_r($shipAddress->getData());
If you want Billing/Shipping Country name see here
// For getting Billing Order Info
$billingId = $order->getBillingAddress()->getId();
$billAddress = Mage::getModel('sales/order_address')->load($billingId);
print_r($billAddress->getData());
No comments:
Post a Comment