1

I want to add custom icon/text in category at selected place in screenshot. I don't know which file I need to edit to modify the category tree. Can anyone help me in getting out of this?

enter image description here

3
  • You can start from here magentoroot/js/extjs/ext-tree.js Commented Jul 7, 2017 at 6:06
  • @EmiproTechnologiesPvt.Ltd. I am unable to understand where i need to change in this file. Please suggest.
    – BornCoder
    Commented Jul 7, 2017 at 6:19
  • In this file there is html code for add folder icon and after that there code of display category name , after that you can add your html code for display icon, search in file "x-tree-node-icon" that code is for display folder icon so you can start from there. Commented Jul 7, 2017 at 6:49

1 Answer 1

2

if you want to add a text with the category name you can just over ride the class Mage_Adminhtml_Block_Catalog_Category_Tree.

In that class you can find a function like

public function buildNodeName($node)
{
    $result = $this->escapeHtml($node->getName());
    if ($this->_withProductCount) {
         $result .= ' (' . $node->getProductCount() . ')';
    }
    return $result;
}

You can just add your text like.

$result.='Your Text';
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.