Beispiel #1
0
 /**
  * Clear chache related with product and protect delete from not admin
  * Register indexing event before delete product
  *
  * @return Mage_Catalog_Model_Product
  */
 protected function _beforeDelete()
 {
     $this->_protectFromNonAdmin();
     $this->cleanCache();
     Mage::getSingleton('index/indexer')->logEvent($this, self::ENTITY, Mage_Index_Model_Event::TYPE_DELETE);
     return parent::_beforeDelete();
 }
Beispiel #2
0
 /**
  * Clear chache related with product and protect delete from not admin
  * Register indexing event before delete product
  *
  * @return Mage_Catalog_Model_Product
  */
 protected function _beforeDelete()
 {
     $this->_protectFromNonAdmin();
     $this->cleanCache();
     return parent::_beforeDelete();
 }
 /**
  * Before delete process
  *
  * @return Mage_Catalog_Model_Category
  */
 protected function _beforeDelete()
 {
     $this->_protectFromNonAdmin();
     if ($this->getResource()->isForbiddenToDelete($this->getId())) {
         Mage::throwException("Can't delete root category.");
     }
     return parent::_beforeDelete();
 }