Magento Fishpig Attribute Splash Pages and Delete Splash Group
subscribe
Magento

Magento Fishpig Attribute Splash Pages and Delete Splash Group

I have just discovered that there’s missing function for deleting the splash group. If you try to delete a group, you will get a controller page not found error. To fix this just add this function to the group controller, Fishpig/AttributeSplash/controllers/Adminhtml/GroupController.php anywhere you want:


public function deleteAction($id)
{
   $id = $this->getRequest()->getParam('id');

   if ($id) {
      try {
        $group = Mage::getModel('attributeSplash/group')
                 ->setId($id)
                 ->delete();
         $this->_getSession()->addSuccess($this->__('Splash group was deleted'));
      }
      catch (Exception $e) {
         $this->_getSession()->addError($this->__($e->getMessage()));
      }
      $this->_redirect('*/*');
   }
   $this->_redirect('*/*');
 }

I have not bothered with too many checks, etc, as I am hoping Fishpig will merge this fix in an upcoming new version. :)

Cheers,
Michael.

Leave a Reply

You must be logged in to post a comment.

Curs Valutar

17 August 2017
Curs oferit de Banca Națională a României
EUR
4.5816 RON
USD
3.9104 RON
GBP
5.0369 RON