🔥 Just Launched! Werra Premium Template for HyväSee it in Action

How to Get Order Data From Magento “sales_order_place_after” Event

By Sanjay JethvaUpdated on May 22, 2025 1 min read

Earlier, I had given the solution to get order data from Magento 2 “sales_order_place_after” event.

A client with a similar requirement for Magento 1 wanted to use the solution to retrieve the order data and send a payment confirmation SMS to store customers.

With a view to sharing the solution with my readers, here’s the stepwise method to get order data from Magento “sales_order_place_after” event

Method to Get Order Data From Magento “sales_order_place_after” Event:

1. Place the below event code in your config.php file

<global>
    .....
    <events>
      <sales_order_place_after>
        <observers>
          <order_place_after>
            <type>model</type>
            <class>extension/observer</class>
            <method>orderAfterObserver</method>
          </order_place_after>
        </observers>
      </sales_order_place_after>
    </events>
    .......
</global>

2. Create Observer.php file at app/code/local/Vendor/Extension/Model/ folder

<?php
class Vendor_Extension_Model_Observer
{
    public function orderAfterObserver(Varien_Event_Observer $observer)
    {
        $order = $observer->getEvent()->getOrder();
        $orderId = $order->getIncrementId();
        //Write Your code here.
    }
}

Follow these steps and easily get order data from Magento “sales_order_place_after” event  to implement features useful to improve customer experience or administration tasks!

Thanks.

Sanjay Jethva Full Image
Article bySanjay Jethva

Sanjay is the co-founder and CTO of Meetanshi with hands-on expertise with Magento since 2011. He specializes in complex development, integrations, extensions, and customizations. Sanjay is one the top 50 contributor to the Magento community and is recognized by Adobe. His passion for Magento 2 and Shopify solutions has made him a trusted source for businesses seeking to optimize their online stores. He loves sharing technical solutions related to Magento 2 & Shopify.