public function _prepareLayout() { $role = Mage::getSingleton('aitpermissions/role'); if ($role->isPermissionsEnabled() && !$role->isAllowedToDelete()) { $category = $this->getCategory()->setIsDeleteable(false); Mage::unregister('category'); Mage::register('category', $category); } return parent::_prepareLayout(); }
protected function _toHtml() { $html = parent::_toHtml(); if (Mage::app()->getRequest()->getParam('duplicated')) { $html .= '<script type="text/javascript"> amCatCopy_Duplicated_Id = ' . intval(Mage::app()->getRequest()->getParam('duplicated')) . '; amCatCopy_updateContent_Url = "' . $this->getUrl('*/*/edit', array('id' => intval(Mage::app()->getRequest()->getParam('duplicated')))) . '"; </script>'; } return $html; }
public function __construct() { parent::__construct(); $this->setTemplate('catalog/category/edit/form.phtml'); }