Magento Forum

   
Get Custom Registration Form Fields to display on dashboard
 
tbeerapu
Jr. Member
 
Total Posts:  8
Joined:  2013-01-17
 

So, I have managed to add custom fields, save them to the database, show them in the admin BUT how can I show them on the dashboard.

Say -

I added a new field phone_number.

$this->htmlEscape($this->getCustomer()->getPhoneNumber()) does not work

Why?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Magikvishal
Sr. Member
 
Total Posts:  277
Joined:  2012-06-12
 

Hello Check below code may be help you

$customerAddressId Mage::getSingleton('customer/session')->getCustomer()->getDefaultBilling();
 
$address Mage::getModel('customer/address')->load($customerAddressId);
$telephone$address->getData('telephone');
OR
$customer Mage::getModel('customer/customer')->load(2); //put customer id here
$data = array();
 foreach (
$customer->getAddresses() as $address)
 
{
    $data 
$address->toArray();
    echo 
$data['telephone'];
 
}

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top