<?php
$order = Mage::getModel('sales/order')->loadByIncrementId($orderId);
if($order->getCustomerId() === NULL)
{
$customerName = $order->getBillingAddress()->getName();
$customerEmail = $order->getBillingAddress()->getEmail();
}
else
{
$customer = Mage::getModel('customer/customer')->load($order->getCustomerId());
$customerName = $order->getCustomerName();
$customerEmail = $order->getCustomerEmail();
}
?>
$order = Mage::getModel('sales/order')->loadByIncrementId($orderId);
if($order->getCustomerId() === NULL)
{
$customerName = $order->getBillingAddress()->getName();
$customerEmail = $order->getBillingAddress()->getEmail();
}
else
{
$customer = Mage::getModel('customer/customer')->load($order->getCustomerId());
$customerName = $order->getCustomerName();
$customerEmail = $order->getCustomerEmail();
}
?>
No comments:
Post a Comment