Magento 1.9 – How to Get Customer Telephone Number magento-1.9 I want to display guest customer telephone number on success page.how can i do this? Best Answer you can get billing or shipping telephone by following code $order=Mage::getModel('sales/order')->loadByIncrementId($this->getOrderId()); $order->getShippingAddress()->getTelephone(); $order->getBillingAddress()->getTelephone(); as you requested to update telephone $billingAddress = Mage::getModel('sales/order_address')->load($order->getBillingAddress()->getId()); $billingAddress->setTelephone("value")->save(); Related SolutionsMagento 1.9 – Get Customer Information on Success Page I have written a blog post regarding it. You will get all the information required from there. Check the link: Thank you page Magento Link2: Thank you page part II Let me know if you have any doubts or queries regarding it. Basically you will get all the required stuff from $lastOrder = Mage::getModel(‘sales/order’)->load(Mage::getSingleton(‘checkout/session’)->getLastOrderId()); and $orderObj = Mage::getModel(‘sales/order’)->loadByIncrementId($this->getOrderId()); Magento – How to display only telephone number field in customer registration page Go With the following path : \app\design\frontend\base\default\template\persistent\customer\form\register.phtml and comment the if condition from here. : <?php if($this->getShowAddressFields()): ?> otherwise get the telephone field outside the if condition. Happy Codding. :) Related TopicMagento – How to add validation for telephone number in magento customer registration formMagento – Add telephone filed in register page
Best Answer
you can get billing or shipping telephone by following code
as you requested to update telephone