*/ class Mage_Adminhtml_Block_Sales_Order_View_Messages extends Mage_Adminhtml_Block_Messages { protected function _getOrder() { return Mage::registry('sales_order'); } public function _prepareLayout() { /** * Check customer existing */ $customer = Mage::getModel('customer/customer')->load($this->_getOrder()->getCustomerId()); /** * Check Item products existing */ $productIds = array(); foreach ($this->_getOrder()->getAllItems() as $item) { $productIds[] = $item->getProductId(); } return parent::_prepareLayout(); } }