diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tab/Design.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tab/Design.php deleted file mode 100644 index 4d378ba8b77..00000000000 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tab/Design.php +++ /dev/null @@ -1,65 +0,0 @@ -setShowGlobalIcon(true); - } - - /** - * @return Mage_Catalog_Model_Category - */ - public function getCategory() - { - if (!$this->_category) { - $this->_category = Mage::registry('category'); - } - return $this->_category; - } - - /** - * @return $this - */ - public function _prepareLayout() - { - parent::_prepareLayout(); - $form = new Varien_Data_Form(); - $form->setDataObject($this->getCategory()); - - $fieldset = $form->addFieldset('base_fieldset', ['legend' => Mage::helper('catalog')->__('Custom Design')]); - - $this->_setFieldset($this->getCategory()->getDesignAttributes(), $fieldset); - - $form->addValues($this->getCategory()->getData()); - $form->setFieldNameSuffix('general'); - $this->setForm($form); - return $this; - } -} diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tab/General.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tab/General.php deleted file mode 100644 index 1810b89467e..00000000000 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tab/General.php +++ /dev/null @@ -1,113 +0,0 @@ -setShowGlobalIcon(true); - } - - public function getCategory() - { - if (!$this->_category) { - $this->_category = Mage::registry('category'); - } - return $this->_category; - } - - public function _prepareLayout() - { - parent::_prepareLayout(); - $form = new Varien_Data_Form(); - $form->setHtmlIdPrefix('_general'); - $form->setDataObject($this->getCategory()); - - $fieldset = $form->addFieldset('base_fieldset', ['legend' => Mage::helper('catalog')->__('General Information')]); - - if (!$this->getCategory()->getId()) { - $parentId = $this->getRequest()->getParam('parent'); - if (!$parentId) { - $parentId = Mage_Catalog_Model_Category::TREE_ROOT_ID; - } - $fieldset->addField('path', 'hidden', [ - 'name' => 'path', - 'value' => $parentId - ]); - } else { - $fieldset->addField('id', 'hidden', [ - 'name' => 'id', - 'value' => $this->getCategory()->getId() - ]); - $fieldset->addField('path', 'hidden', [ - 'name' => 'path', - 'value' => $this->getCategory()->getPath() - ]); - } - - $this->_setFieldset($this->getCategory()->getAttributes(true), $fieldset); - - if ($this->getCategory()->getId()) { - if ($this->getCategory()->getLevel() == 1) { - $fieldset->removeField('url_key'); - $fieldset->addField('url_key', 'hidden', [ - 'name' => 'url_key', - 'value' => $this->getCategory()->getUrlKey() - ]); - } - } - - $form->addValues($this->getCategory()->getData()); - - $form->setFieldNameSuffix('general'); - $this->setForm($form); - return $this; - } - - protected function _getAdditionalElementTypes() - { - return [ - 'image' => Mage::getConfig()->getBlockClassName('adminhtml/catalog_category_helper_image') - ]; - } - - protected function _getParentCategoryOptions($node = null, &$options = []) - { - if (is_null($node)) { - $node = $this->getRoot(); - } - - if ($node) { - $options[] = [ - 'value' => $node->getPathId(), - 'label' => str_repeat(' ', max(0, 3 * ($node->getLevel()))) . $this->escapeHtml($node->getName()), - ]; - - foreach ($node->getChildren() as $child) { - $this->_getParentCategoryOptions($child, $options); - } - } - return $options; - } -}