I wanna show the username who commented on order history

my question is like below question


but it is for Magento 1.4 and it doesn't work for me. magento version

1 Answer 1


You can create a module and override file ( app/code/core/Mage/Adminhtml/controllers/Sales/OrderController.php ):

There you will find function addCommentAction:


and / change line of code from :

$order->addStatusToHistory($data['status'], $data['comment'], $notify);

To :

$current_Admin = Mage::getSingleton('admin/session')->getUser();
    if(isset($current_Admin)) {
        $commentwithUser = '[ BY: '.$current_Admin->getUsername().' ] - '.$data['comment'];
$order->addStatusToHistory($data['status'], $commentwithUser, $notify);

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.