Showing posts with label How to get customer name. Show all posts
Showing posts with label How to get customer name. Show all posts

Wednesday, 3 February 2016

How to get customer name, customer email on order success page in Magento

If you want to display customer name and email on order success page in Magento. 


So use following code on success.phtml page 


(/public_html/app/design/frontend/base/default/template/checkout/success.phtml)




<?php


 $order = Mage::getModel('sales/order')->loadByIncrementId($this->getOrderId());


      echo $order->getCustomerName();


      echo $order->getCustomerEmail();


?>