/** * Prepare profile address (billing or shipping) info */ public function prepareAddressInfo() { $this->_shouldRenderInfo = true; if ('shipping' == $this->getAddressType()) { if ('1' == $this->_profile->getInfoValue('order_info', 'is_virtual')) { return; } $key = 'shipping_address_info'; } else { $key = 'billing_address_info'; } $this->setIsAddress(true); $address = Mage::getModel('sales/order_address', $this->_profile->getData($key)); $this->_addInfo(array('value' => preg_replace('/\\n{2,}/', "\n", $address->getFormated()))); }
/** * Prepare profile address (billing or shipping) info */ public function prepareAddressInfo() { $this->_shouldRenderInfo = true; if ('shipping' == $this->getAddressType()) { if ('1' == $this->_profile->getInfoValue('order_item_info', 'is_virtual')) { $this->getParentBlock()->unsetChild('sales.recurring.profile.view.shipping'); return; } $key = 'shipping_address_info'; } else { $key = 'billing_address_info'; } $this->setIsAddress(true); $address = Mage::getModel('Mage_Sales_Model_Order_Address', array('data' => $this->_profile->getData($key))); $this->_addInfo(array('value' => preg_replace('/\\n{2,}/', "\n", $address->format('text')))); }