Example #1
0
 public function indexAction()
 {
     $group = $this->getRequest()->getParam('product_group');
     $Product = Product::getByGroupId($group);
     $Group = ProductGroup::getById($group);
     $this->view->Product = $Product;
     $this->view->Title = $Group->name;
     $this->view->headTitle($this->view->Title);
 }
 public function deleteAction()
 {
     $Product = ProductGroup::getById($this->getRequest()->getParam('id'));
     if ($Product) {
         if ($this->getRequest()->isPost()) {
             $Product->delete();
             $this->Member->log('Nhóm sản phẩm: ' . $Product->name . '(' . $this->getRequest()->getParam('id') . ')', 'Xóa');
             My_Plugin_Libs::setSplash('Nhóm sản phẩm: <b>' . $Product->name . '</b> đã được xóa khỏi hệ thống.');
             $this->_redirect($this->_helper->url('index', 'productgroup', 'admin'));
         }
         $this->view->Product = $Product;
     }
 }