Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8586595
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T22:20:47+00:00 2026-06-11T22:20:47+00:00

I am working on magento. I want add a functionality that when user places

  • 0

I am working on magento. I want add a functionality that when user places the order, a comment is added to the history comment of the order. I have gone through the code and come to know that the function

 public function addStatusHistoryComment($comment, $status = false)

in order.php is used to add the comment. I want to access it when user places the order. So how can i do that? Do anyone have any idea?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T22:20:48+00:00Added an answer on June 11, 2026 at 10:20 pm

    As with anything in Magento there are many ways.

    First you need to write a module. In that module you could listen for checkout success event – checkout_onepage_controller_success_action. Do that with the module etc/config.xml, e.g:

        <events>
            <checkout_onepage_controller_success_action>
                <observers>
                    <whatever>
                        <type>singleton</type>
                        <class>whatever/observer</class>
                        <method>checkout_onepage_controller_success_action</method>
                    </whatever>
                </observers>
            </checkout_onepage_controller_success_action>
        </events>
    

    In your observer you load the last order, append your comment to it and then you save your order. The method you describe will work perfectly. You can also do things with the order status, doing so enables you to email the customer if need be:

    public function checkout_onepage_controller_success_action($observer) {
        $orderIds=$observer->getData('order_ids');
        foreach ($orderIds as $orderId) {
            $order = new Mage_Sales_Model_Order();
            $order->load($orderId);
    
            ... Do Something!
    
            $order->setState('processing', 'invoiced', 'Hello World!');
            $order->save();
        }
    

    I hope that helps!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on a Magento module that has a Form where a user
I am working in a Magento store, I want to add some information related
I want to add a login form to CMs page in Magento, I have
I have to make some mods to an existing (and working) magento site. So
How is working with Magento when it comes to adding custom functionality? From an
I am currently working on a Magento extension, and I have overridden a core
For a Magento shop I'm working on I have to check certain session variables
I'm working on an extension for Magento (1.4 CE) that needs to be triggered
I'm working on an extension that will receive product information from Magento when saved
I am working on a new payment module for Magento and have come across

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.