public function __construct() { parent::__construct(); $this->setTemplate('customer/address/edit.phtml'); $this->_address = Mage::getModel('customer/address'); // Init address object if ($id = $this->getRequest()->getParam('id')) { $this->_address->load($id); if ($this->_address->getCustomerId() != Mage::getSingleton('customer/session')->getCustomerId()) { $this->_address->setData(array()); } } Mage::app()->getFrontController()->getAction()->getLayout()->getBlock('root')->setHeaderTitle(($this->getAddress()->getId() ? 'Edit' : 'New') . ' Address Entry'); if ($postedData = Mage::getSingleton('customer/session')->getAddressFormData(true)) { $this->_address->setData($postedData); } }
public function __construct() { parent::__construct(); }