---
title: "How Magento 2 get Order Data on Success Page?"
url: "https://dolphinwebsolution.com/how-to-get-order-data-on-success-page"
date: "2021-05-31T12:54:17+05:30"
modified: "2023-08-24T10:06:39+05:30"
author:
  name: "Chirag Parmar"
categories:
  - "Magento"
word_count: 165
reading_time: "1 min read"
summary: "By default, Magento show thank you message and quick order id on the order success page. Some customers have custom requirements for edit success page content and show order information in detail o..."
description: "By default, Magento show thank you message and quick order id on the order success page. Some customers have custom requirements for edit success page conten..."
keywords: "success page,order data on success page, Magento"
language: "en"
schema_type: "Article"
related_posts:
  - title: "Top 10 Magento Development Companies in India (2026)"
    url: "https://dolphinwebsolution.com/blog/top-magento-development-companies-in-india/"
  - title: "How to add additional text based on selected shipping methods in the checkout"
    url: "https://dolphinwebsolution.com/how-to-add-additional-text-based-on-selected-shipping-methods-in-the-checkout"
  - title: "Call phtml File From Helper In Magento 2"
    url: "https://dolphinwebsolution.com/call-phtml-file-from-helper-in-magento-2"
---

# How Magento 2 get Order Data on Success Page?

_Published: May 31, 2021_  
_Author: Chirag Parmar_  

![](https://dolphinwebsolution.com/wp-content/uploads/2023/02/Order-data-on-success-page.jpg)

By default, Magento show thank you message and[ quick order id](https://dolphinwebsolution.com/shop/quick-order-for-magento.html) on the order success page. Some customers have custom requirements for edit success page content and show order information in detail or pass this data to [google analytics](https://analytics.google.com/). In this blog, I will show you how to get order information on the success page and use order data for various prospects.

### There are 2 ways to get Order Detail in Success page :

We can get order data on the Magento 2 success page by following way :

- 1) By overriding success block
- 2) By Object Manager (Not Recommended)

#### 1) Register your module at Path :- Dolphin/Ordersuccess/registration.php

```
<?php
\Magento\Framework\Component\ComponentRegistrar::register(
    \Magento\Framework\Component\ComponentRegistrar::MODULE,
    'Dolphin_Ordersuccess',
    __DIR__
);
```

#### 2) Create module.xml file at Path:- Dolphin/InvoicePdf/etc/module.xml

```
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
    <module name="Dolphin_Ordersuccess" setup_version="0.0.1" />
</config>
```


---

_View the original post at: [https://dolphinwebsolution.com/how-to-get-order-data-on-success-page](https://dolphinwebsolution.com/how-to-get-order-data-on-success-page)_  
_Served as markdown by [Third Audience](https://github.com/third-audience) v3.5.3_  
_Generated: 2026-08-26 06:54:29 UTC_  
