Mage_Adminhtml_Block_Sales_Order_View_Messages Class Reference

Inheritance diagram for Mage_Adminhtml_Block_Sales_Order_View_Messages:

Mage_Adminhtml_Block_Messages Mage_Core_Block_Messages Mage_Core_Block_Template Mage_Core_Block_Abstract Varien_Object

List of all members.

Public Member Functions

 _prepareLayout ()

Protected Member Functions

 _getOrder ()


Detailed Description

Definition at line 34 of file Messages.php.


Member Function Documentation

_getOrder (  )  [protected]

Definition at line 37 of file Messages.php.

00038     {
00039         return Mage::registry('sales_order');
00040     }

_prepareLayout (  ) 

Preparing global layout

You can redefine this method in child classes for changin layout

Returns:
Mage_Core_Block_Abstract

Check customer existing

Check Item products existing

Reimplemented from Mage_Core_Block_Messages.

Definition at line 42 of file Messages.php.

00043     {
00044         /**
00045          * Check customer existing
00046          */
00047         $customer = Mage::getModel('customer/customer')->load($this->_getOrder()->getCustomerId());
00048         if (!$customer->getId()) {
00049             //$this->addNotice(Mage::helper('sales')->__(' The customer doesn\'t exist in the system anymore'));
00050         }
00051 
00052         /**
00053          * Check Item products existing
00054          */
00055         $productIds = array();
00056         foreach ($this->_getOrder()->getAllItems() as $item) {
00057             $productIds[] = $item->getProductId();
00058         }
00059 
00060 //        $productCollection = Mage::getModel('catalog/product')->getCollection()
00061 //            ->addIdFilter($productIds)
00062 //            ->load();
00063 //
00064 //        foreach ($this->_getOrder()->getAllItems() as $item) {
00065 //            if (!$productCollection->getItemById($item->getProductId())) {
00066 //                /*$this->addNotice(
00067 //                    Mage::helper('sales')->__('The item %s (SKU %s) doesn\'t exist in the catalog anymore', $item->getName(), $item->getSku())
00068 //                );*/
00069 //            }
00070 //        }
00071         return parent::_prepareLayout();
00072     }


The documentation for this class was generated from the following file:

Generated on Sat Jul 4 17:23:02 2009 for Magento by  doxygen 1.5.8