{"id":2244,"date":"2025-01-02T16:45:04","date_gmt":"2025-01-02T14:45:04","guid":{"rendered":"https:\/\/plumrocket.com\/learn\/?p=2244"},"modified":"2025-06-24T16:34:02","modified_gmt":"2025-06-24T13:34:02","slug":"how-to-customize-magento-2-checkout-success-page","status":"publish","type":"post","link":"https:\/\/plumrocket.com\/learn\/magento-2-checkout-success-page","title":{"rendered":"How to Customize Magento 2 Checkout Success Page"},"content":{"rendered":"\n<figure class=\"wp-block-image size-full disable_zoom\"><img loading=\"lazy\" width=\"1600\" height=\"600\" src=\"https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/12\/custom-block-checkout-success-page.png\" alt=\"How to Customize Magento 2 Checkout Success Page\" class=\"wp-image-2258\" srcset=\"https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/12\/custom-block-checkout-success-page.png 1600w, https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/12\/custom-block-checkout-success-page-300x113.png 300w, https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/12\/custom-block-checkout-success-page-1024x384.png 1024w, https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/12\/custom-block-checkout-success-page-768x288.png 768w, https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/12\/custom-block-checkout-success-page-1536x576.png 1536w, https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/12\/custom-block-checkout-success-page-1568x588.png 1568w\" sizes=\"(max-width: 1600px) 100vw, 1600px\" \/><\/figure>\n\n\n\n<p>The checkout success page, also known as the thank you page, appears on the website when the item is paid. This page is designed to express gratitude for completed orders and display key details about the purchase. Although, by default, the Magento 2 checkout success page is quite generic and simple, you may enhance it and create an engaging page that encourages repeat sales. So, to create such a page, you need to customize the checkout success page in Magento 2.<\/p>\n\n\n\n<p>In this tutorial, we prepared a step-by-step guide on how to add a block to the checkout success page to optimize this page and create a seamless user experience.<\/p>\n\n\n\n<p style=\"background-color: #ECF4F8;min-height:100px;box-shadow: 0 3px 10px 0 rgba(0,0,0,.15); padding: 20px 20px;\">Want to build a beautiful success page without writing any code? Discover our powerful <a href=\"\/magento-checkout-success-page\" target=\"_blank\" rel=\"noreferrer noopener\">Magento 2 Checkout Success Page Extension<\/a>. <\/p>\n\n\n\n<h2>Method 1: Adding Custom Block to the Magento 2 Checkout Success Page (Via Admin Panel)<\/h2>\n\n\n\n<p>Magento 2 provides a fairly simple and convenient method to add a custom block to the checkout success page using only the admin panel without the necessity to edit files. So, let\u2019s get started!<\/p>\n\n\n\n<h3>Step 1. Creating a CMS block<\/h3>\n\n\n\n<p>The following method is based on CMS blocks. At this stage, you need to create and configure a CMS block, including specifying the content you need to display.<\/p>\n\n\n\n<p>To create a CMS block, navigate to <strong>Content -&gt; Blocks<\/strong> in the menu and click the Add New Block button.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" width=\"1206\" height=\"591\" src=\"https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/12\/custom-block-checkout-success-page-1.png\" alt=\"Method 1: Creating a CMS block - 1\" class=\"wp-image-2245\" srcset=\"https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/12\/custom-block-checkout-success-page-1.png 1206w, https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/12\/custom-block-checkout-success-page-1-300x147.png 300w, https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/12\/custom-block-checkout-success-page-1-1024x502.png 1024w, https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/12\/custom-block-checkout-success-page-1-768x376.png 768w\" sizes=\"(max-width: 1206px) 100vw, 1206px\" \/><\/figure>\n\n\n\n<p>You&#8217;ll see the CMS block creation form, where you need to specify the block name, its ID, store view, and its content.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" width=\"1206\" height=\"874\" src=\"https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/12\/custom-block-checkout-success-page-2-1-1.png\" alt=\"Method 1: Creating a CMS block and specifying elements\" class=\"wp-image-2247\" srcset=\"https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/12\/custom-block-checkout-success-page-2-1-1.png 1206w, https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/12\/custom-block-checkout-success-page-2-1-1-300x217.png 300w, https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/12\/custom-block-checkout-success-page-2-1-1-1024x742.png 1024w, https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/12\/custom-block-checkout-success-page-2-1-1-768x557.png 768w\" sizes=\"(max-width: 1206px) 100vw, 1206px\" \/><\/figure>\n\n\n\n<h3>Step 2. Configuring the widget to render the CMS block<\/h3>\n\n\n\n<p>After creating a CMS block, it will not display automatically. Therefore, you need to add a widget to render the block.<\/p>\n\n\n\n<div class=\"wp-block-group pr-notice pr-notice-info\"><div class=\"wp-block-group__inner-container\">\n<p class=\"pr-notice-title\" style=\"margin-bottom: 25px;\">Step-by-step guide:<\/p>\n\n\n\n<ol><li>To set up the widget, navigate to <strong>Content -&gt; Widgets<\/strong> in the admin panel and click <em>Add Widget<\/em>.<\/li><li>In the widget creation form, select CMS Static Block for the Type field and choose your active theme for the Design Theme field.<\/li><li>Name the widget, assign it to the store views where it should appear, and set the sort order.<\/li><\/ol>\n<\/div><\/div>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" width=\"1206\" height=\"913\" src=\"https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/12\/custom-block-checkout-success-page-3.png\" alt=\"Method 1: add a widget to render the block\" class=\"wp-image-2248\" srcset=\"https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/12\/custom-block-checkout-success-page-3.png 1206w, https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/12\/custom-block-checkout-success-page-3-300x227.png 300w, https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/12\/custom-block-checkout-success-page-3-1024x775.png 1024w, https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/12\/custom-block-checkout-success-page-3-768x581.png 768w\" sizes=\"(max-width: 1206px) 100vw, 1206px\" \/><\/figure>\n\n\n\n<p>Next, we proceed to the Layout Updates section, which determines where the block will be displayed. To have the block appear on our custom Magento 2 Checkout Success Page, set the following fields:<\/p>\n\n\n\n<div class=\"wp-block-group pr-notice pr-notice-info\"><div class=\"wp-block-group__inner-container\">\n<p class=\"pr-notice-title\" style=\"margin-bottom: 25px;\">Step-by-step guide:<\/p>\n\n\n\n<ol><li>Select <em>Specified Page<\/em> in the Display on field.<\/li><li>Choose <em>One Page Checkout Success<\/em> in the Page field.<\/li><li>Specify the container in which the block will be placed.<\/li><\/ol>\n<\/div><\/div>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" width=\"1206\" height=\"424\" src=\"https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/12\/custom-block-checkout-success-page-4.png\" alt=\"Method 1: setting fields\" class=\"wp-image-2251\" srcset=\"https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/12\/custom-block-checkout-success-page-4.png 1206w, https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/12\/custom-block-checkout-success-page-4-300x105.png 300w, https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/12\/custom-block-checkout-success-page-4-1024x360.png 1024w, https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/12\/custom-block-checkout-success-page-4-768x270.png 768w\" sizes=\"(max-width: 1206px) 100vw, 1206px\" \/><\/figure>\n\n\n\n<p>The final step is to select the CMS block that you want to display. To do this, follow the next steps:<\/p>\n\n\n\n<div class=\"wp-block-group pr-notice pr-notice-info\"><div class=\"wp-block-group__inner-container\">\n<p class=\"pr-notice-title\" style=\"margin-bottom: 25px;\">Step-by-step guide:<\/p>\n\n\n\n<ol><li>Navigate to the Widget Options tab.<\/li><li>In the Block field, select the previously created block.<\/li><li>Save the widget.<\/li><li>Clear the Magento cache so that the changes are reflected on the frontend.<\/li><\/ol>\n\n\n\n<p><\/p>\n<\/div><\/div>\n\n\n\n<p>Here is the example:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" width=\"1206\" height=\"762\" src=\"https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/12\/custom-block-checkout-success-page-5.png\" alt=\"Method 1: select the CMS block to display\" class=\"wp-image-2254\" srcset=\"https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/12\/custom-block-checkout-success-page-5.png 1206w, https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/12\/custom-block-checkout-success-page-5-300x190.png 300w, https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/12\/custom-block-checkout-success-page-5-1024x647.png 1024w, https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/12\/custom-block-checkout-success-page-5-768x485.png 768w\" sizes=\"(max-width: 1206px) 100vw, 1206px\" \/><\/figure>\n\n\n\n<h2>Method 2: Adding a Custom Block to the Magento 2 Checkout Success Page (Via Custom Extension)<\/h2>\n\n\n\n<p>Magento 2 also allows you to add custom blocks to the checkout success page via the admin panel without editing the code. However, this method provides quite limited capabilities, and often websites require a more flexible approach that can be implemented programmatically.<\/p>\n\n\n\n<p>Let\u2019s take a closer look at creating a custom extension to display a custom block.<\/p>\n\n\n\n<h3>Step 1: Creating a custom module<\/h3>\n\n\n\n<p>To register your module in Magento, create a <code>registration.php<\/code> file following the path <code>app\/code\/VendorName\/ModuleName\/registration.php<\/code>. Here is the file content:<\/p>\n\n\n\n<div class=\"wp-block-prismatic-blocks\"><div><\/div><pre><code class=\"language-php\">&lt;?php\n\n\nuse Magento\\Framework\\Component\\ComponentRegistrar;\n\n\nComponentRegistrar::register(ComponentRegistrar::MODULE, 'VendorName_ModuleName', __DIR__);<\/code><\/pre><\/div>\n\n\n\n<p>Now you need to create a module.xml file. To accomplish this, create a file with the following path <code>app\/code\/VendorName\/ModuleName\/etc\/module.xml<\/code> and locate the code within that file:<\/p>\n\n\n\n<div class=\"wp-block-prismatic-blocks\"><div><\/div><pre><code class=\"language-php\">&lt;?xml version=\"1.0\"?>\n&lt;config xmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\"\n       xsi:noNamespaceSchemaLocation=\"urn:magento:framework:Module\/etc\/module.xsd\">\n   &lt;module name=\"VendorName_ModuleName\"\/>\n&lt;\/config>\n<\/code><\/pre><\/div>\n\n\n\n<h3>Step 2: Implementing custom block output<\/h3>\n\n\n\n<p>Now let&#8217;s move on to displaying the custom block on the Magento 2 Checkout Success Page.<\/p>\n\n\n\n<p>Create checkout_onepage_success.xml file following this path: <code>app\/code\/VendorName\/ModuleName\/view\/frontend\/layout\/checkout_onepage_success.xml<\/code>.<\/p>\n\n\n\n<p>Here is the file content:<\/p>\n\n\n\n<div class=\"wp-block-prismatic-blocks\"><div><\/div><pre><code class=\"language-php\">&lt;?xml version=\"1.0\"?>\n&lt;page xmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\" layout=\"1column\" xsi:noNamespaceSchemaLocation=\"urn:magento:framework:View\/Layout\/etc\/page_configuration.xsd\">\n   &lt;body>\n       &lt;referenceContainer name=\"content\">\n           &lt;block class=\"Magento\\Framework\\View\\Element\\Template\" name=\"custom.coupon_block\" template=\"VendorName_ModuleName::coupon.phtml\" after=\"-\" \/>\n       &lt;\/referenceContainer>\n   &lt;\/body>\n&lt;\/page>\n<\/code><\/pre><\/div>\n\n\n\n<p>Create coupon.phtml, here is the path: <code>app\/code\/VendorName\/ModuleName\/view\/frontend\/templates\/coupon.phtml<\/code>. The content:<\/p>\n\n\n\n<div class=\"wp-block-prismatic-blocks\"><div><\/div><pre><code class=\"language-php\">&lt;div style=\"background-color:#333; color:#ffcc00; text-align:center; padding:20px;\">\n   &lt;p style=\"margin: 0;\">COME BACK SOON! USE THIS CODE FOR 10% OFF YOUR NEXT ORDER:&lt;\/p>\n   &lt;div style=\"background-color:white; color:#ff8c00; display:inline-block; border-radius:5px; font-weight:bold;\">\n       SUMMERTIME10\n   &lt;\/div>\n&lt;\/div>\n<\/code><\/pre><\/div>\n\n\n\n<p>Below is an example of the expected result:<\/p>\n\n\n\n<div class=\"wp-block-group pr-notice pr-notice-warning\"><div class=\"wp-block-group__inner-container\">\n<p class=\"pr-notice-title\">Important Information:<\/p>\n\n\n\n<p>You can also display the CMS block by changing the contents of the <code>checkout_onepage_success.xml<\/code> file to the following:<\/p>\n\n\n\n<div class=\"wp-block-prismatic-blocks\"><div><\/div><pre><code class=\"language-php\">&lt;?xml version=\"1.0\"?>\n&lt;page xmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\" layout=\"1column\" xsi:noNamespaceSchemaLocation=\"urn:magento:framework:View\/Layout\/etc\/page_configuration.xsd\">\n   &lt;body>\n       &lt;referenceContainer name=\"content\">\n           &lt;block class=\"Magento\\Cms\\Block\\Block\" name=\"custom.coupon_block\" after=\"-\" >\n               &lt;arguments>\n                   &lt;argument name=\"block_id\" xsi:type=\"string\">additional_checkout_success_page_block&lt;\/argument>\n               &lt;\/arguments>\n           &lt;\/block>\n       &lt;\/referenceContainer>\n   &lt;\/body>\n&lt;\/page>\n<\/code><\/pre><\/div>\n\n\n\n<p>In this example, <code>additional_checkout_success_page_block<\/code> is the CMS block ID that needs to be displayed. Make sure a CMS block with this ID exists in your Magento.<\/p>\n<\/div><\/div>\n\n\n\n<h2>Method 3: Using Magento 2 Checkout Success Page Extension for Easy Customization<\/h2>\n\n\n\n<p>The customization process is often not that easy, as it requires both technical knowledge and time. For those looking for reliable and tailored solutions, use the <a href=\"\/magento-checkout-success-page\" target=\"_blank\" rel=\"noreferrer noopener\">Checkout Success Page extension<\/a> that provides a streamlined and quick way to customize the checkout success page in Magento 2.<\/p>\n\n\n\n<p>It offers a range of features designed to help you build a checkout success page that \u0438\u0449\u0435\u0440 meets your business needs and delights your customers. For example, by leveraging the Magento 2 Checkout Success page extension, you can:<\/p>\n\n\n\n<ul><li><strong>Use the ready-made templates<\/strong>, which are already equipped with upgraded blocks. These templates include full order summary, shipping details and order subtotal, discount codes, recommended products, and social media banners.<\/li><li><strong>Enable and disable blocks<\/strong> as needed.&nbsp;<\/li><li><strong>Customize the content<\/strong> of each block.<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" width=\"1206\" height=\"918\" src=\"https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/12\/custom-block-checkout-success-page-7.png\" alt=\"Method 3: checkout success page\" class=\"wp-image-2256\" srcset=\"https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/12\/custom-block-checkout-success-page-7.png 1206w, https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/12\/custom-block-checkout-success-page-7-300x228.png 300w, https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/12\/custom-block-checkout-success-page-7-1024x779.png 1024w, https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/12\/custom-block-checkout-success-page-7-768x585.png 768w\" sizes=\"(max-width: 1206px) 100vw, 1206px\" \/><\/figure>\n\n\n\n<p>With the Magento 2 Checkout Success Page Extension, delivering a tailored, professional, and engaging checkout success page has never been easier!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The checkout success page, also known as the thank you page, appears on the website when the item is paid. This page is designed to express gratitude for completed orders and display key details about the purchase. Although, by default, the Magento 2 checkout success page is quite generic and simple, you may enhance it and create an engaging page that encourages repeat sales. So, to create such a page, you need to customize the checkout success page in Magento 2.<\/p>\n","protected":false},"author":15,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0},"categories":[123],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v16.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Customize Magento 2 Checkout Success Page<\/title>\n<meta name=\"description\" content=\"Customize your Magento 2 checkout success page with ease! Learn how to add custom blocks via the admin panel or create a custom extension.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/plumrocket.com\/learn\/magento-2-checkout-success-page\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Customize Magento 2 Checkout Success Page\" \/>\n<meta property=\"og:description\" content=\"Customize your Magento 2 checkout success page with ease! Learn how to add custom blocks via the admin panel or create a custom extension.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/plumrocket.com\/learn\/magento-2-checkout-success-page\" \/>\n<meta property=\"og:site_name\" content=\"Magento Tutorials for Beginners &amp; Professionals\" \/>\n<meta property=\"article:published_time\" content=\"2025-01-02T14:45:04+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-06-24T13:34:02+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/12\/custom-block-checkout-success-page.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"6 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","_links":{"self":[{"href":"https:\/\/plumrocket.com\/learn\/wp-json\/wp\/v2\/posts\/2244"}],"collection":[{"href":"https:\/\/plumrocket.com\/learn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/plumrocket.com\/learn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/plumrocket.com\/learn\/wp-json\/wp\/v2\/users\/15"}],"replies":[{"embeddable":true,"href":"https:\/\/plumrocket.com\/learn\/wp-json\/wp\/v2\/comments?post=2244"}],"version-history":[{"count":11,"href":"https:\/\/plumrocket.com\/learn\/wp-json\/wp\/v2\/posts\/2244\/revisions"}],"predecessor-version":[{"id":2573,"href":"https:\/\/plumrocket.com\/learn\/wp-json\/wp\/v2\/posts\/2244\/revisions\/2573"}],"wp:attachment":[{"href":"https:\/\/plumrocket.com\/learn\/wp-json\/wp\/v2\/media?parent=2244"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/plumrocket.com\/learn\/wp-json\/wp\/v2\/categories?post=2244"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/plumrocket.com\/learn\/wp-json\/wp\/v2\/tags?post=2244"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}