Example #1
0
 /**
  * Delete customer
  */
 protected function _delete()
 {
     /** @var $customer Mage_Customer_Model_Customer */
     $customer = parent::_loadCustomerById($this->getRequest()->getParam('id'));
     try {
         $customer->delete();
     } catch (Mage_Core_Exception $e) {
         $this->_critical($e->getMessage(), Mage_Api2_Model_Server::HTTP_INTERNAL_ERROR);
     } catch (Exception $e) {
         $this->_critical(self::RESOURCE_INTERNAL_ERROR);
     }
 }
Example #2
0
File: V1.php Project: quyip8818/Mag
 /**
  * Update customer
  *
  * @param array $data
  * @throws Mage_Api2_Exception
  */
 protected function _update(array $data)
 {
     if ($this->_isOwner($this->getRequest()->getParam('id'))) {
         parent::_update($data);
     }
 }