Magento 2 how to remove Category name With ID
-
15-04-2021 - |
Soluzione
Go to
vendor/magento/module-catalog/Block/Adminhtml/Category/Tree.php
comment the code
// $result .= ' (ID: ' . $node->getId() . ')';
on the line 422 at function buildNodeName($node)
public function buildNodeName($node)
{
$result = $this->escapeHtml($node->getName());
// $result .= ' (ID: ' . $node->getId() . ')';
if ($this->_withProductCount) {
$result .= ' (' . $node->getProductCount() . ')';
}
return $result;
}
That would get your job done . Let me know if you face any problem .
Happy Coding :)
NOTE : The right approach would be to overwrite this function in own own module but that would be out of scope for this question for such little tweak.
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a magento.stackexchange