I'm currently working in the success.phtml
file. I need to get the name from the shipping address the user put in. I used to have code that would only grab the username of the user and would display Guest
for a name if the user was not logged in. So I decided the name from the shipping address would most likely be the correct one to get. Here is the code I am using.
<?php
$grayson_order_id = $this->getOrderId();
$order = Mage::getModel('sales/order')->load($grayson_order_id);
$custname = $order->getBillingAddress()->getName();
?>
But the page crashes at $custname = $order->getBillingAddress()->getName();
I don't think it really matters but im running Magento EE 1.13
I'm sure it's something simple I'm missing, or I'm simply calling the wrong method. Any help is appreciated.