Public Member Functions | |
_prepareLayout () | |
Protected Member Functions | |
_getOrder () |
Definition at line 34 of file Messages.php.
_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
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 }