public function _prepareLayout()
 {
     /**
      * Check customer existing
      */
     $customer = AO::getModel('customer/customer')->load($this->_getOrder()->getCustomerId());
     if (!$customer->getId()) {
         //$this->addNotice(AO::helper('sales')->__(' The customer doesn\'t exist in the system anymore'));
     }
     /**
      * Check Item products existing
      */
     $productIds = array();
     foreach ($this->_getOrder()->getAllItems() as $item) {
         $productIds[] = $item->getProductId();
     }
     //        $productCollection = AO::getModel('catalog/product')->getCollection()
     //            ->addIdFilter($productIds)
     //            ->load();
     //
     //        foreach ($this->_getOrder()->getAllItems() as $item) {
     //            if (!$productCollection->getItemById($item->getProductId())) {
     //                /*$this->addNotice(
     //                    AO::helper('sales')->__('The item %s (SKU %s) doesn\'t exist in the catalog anymore', $item->getName(), $item->getSku())
     //                );*/
     //            }
     //        }
     return parent::_prepareLayout();
 }
示例#2
0
 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();
 }
示例#3
0
 public function _prepareLayout()
 {
     $this->addMessages(Mage::getSingleton('adminhtml/session_quote')->getMessages(true));
     parent::_prepareLayout();
 }
示例#4
0
 public function _prepareLayout()
 {
     $this->addMessages(Mage::getSingleton('Mage_Adminhtml_Model_Session_Quote')->getMessages(true));
     parent::_prepareLayout();
 }