Add Custom Block in Checkout Success Page in Magento 2

Thank you page on your website leaves an impression and nurtures customers who've already trusted you. That's why it is one of the most important pages in the checkout journey in your store.

Correspondingly, it's important to optimize it to increase customer engagement and ROI. The best way to achieve this is through the Magento CMS or content blocks which could lead anywhere from blog to catalog and customer account.

Today you'll learn how to add a custom block to Checkout Success Page in Magento 2. And we'll also share how to show this block under different conditions. So stick around for more details. 

Have we mentioned it doesn't include any coding?

Let's start adding a custom block to thank you page in Magento.

Most guides on how to add custom blocks to the checkout success page will lead you through complex development instructions. While you can manage to do this with a simple Magento admin config.

1. Create CMS Block

CMS blocks or static blocks are the easiest way to manipulate content on your Magento 2 store pages. So all you need on this step is to go to Content > Blocks and Add New Block.

CMS blocks settings are really straightforward. Just Enable the Block, give it a Title and Identifier and define a Store View where it will be available. 

The last thing is to add the content of the block which depends on what you want customers to engage with. 

New CMS Block

Don't forget to Save the block and move on to the next step.

2. Create Widget to Display CMS Block

Unfortunately, CMS blocks don't appear on the website pages automatically. You need to use widgets to define where to display the blocks.

So, go to Content > Widgets and press the Add Widget button. It is a standard process of adding a widget in Magento. You need to select the CMS Static Block as the widget Type and define your theme.

Then, set a Widget Title, Assign it to Store Views, and set the Sort Order.

Custom Block on Checkout Success Page

The most important section that defines where the block will be displayed is Layout Updates.

Correspondingly, select Specified Page as the place to Display the block on. Then find the One Page Checkout Success Page in the dropdown and chose the page Container

We've decided to display it at the Main Content Bottom

How to Add Custom Block to Checkout Magento

Last but not least, choose the CMS block you've just created in the Widget Options tab and Save it.

Magento Widget Options

Note: the block might not appear instantly, so clean caches and check the storefront again.


Once you add a custom block to the checkout success page it should encourage customers to engage with it after they've placed an order.

Magento Custom Block on Checkout Success Page

You can display anything from the "Thank You" banner to blog articles CTA. Opportunities are limitless. 

Still, you can make it better.

3. Set Conditions to Add Custom Block to Checkout Page

A personalized experience is the key to better conversions. So if customers already trusted you with their money, it makes sense to encourage them to do it repeatedly. 

The "Thank you" page is a perfect place for that. Especially if the custom blocks you display on the checkout success page in Magento relate to the ordered items, subtotal, or any other cart or product attributes. 

So, here's when Magento 2 Dynamic Blocks and Pages come in handy. 

Going back to our CMS block, we just set our travel blog banner to be displayed for someone who purchased a bag from our Bags category.

But that's just a drop in the ocean.

CMS Display Rule for Checkout Page

You can display a block with your fitness training products if someone purchased some gear, or encourage people to join your special customer program if they purchased more than 5 products at once. 

Do you offer free shipping only for products higher than $40 or have some special offers for logged-in customers? 

It goes as far as your imagination and business objectives. And the best thing is, that you can display this block anywhere on your website. Dynamic blocks allow you to personalized customer experience and market your product better. Visit our live demo and check it out yourself.