Hello Magento Friends,

Today I am going to explain Magento 2: Customize Checkout Order Summary by Adding Custom Content.

The checkout page in Magento 2 shows the order details and payment information. This is the area where Magento store owners can encourage customers to buy more by offering free shipping or discount on minimum purchase amounts and increasing sales. Sometimes store owners may need to show some information to the customers for their orders and delivery. You may also need to alert customers about the products they are ordering. For all this, Magento store merchants need to add custom text on the checkout order summary.

Let’s learn how you can customize the checkout order summary in Magento 2.

Steps to Customize Checkout Order Summary by Adding Custom Content in Magento 2:

Step 1: Navigate to the below path

app\code\Vendor\Extension\view\frontend\layout\checkout_index_index.xml

Then add the below code

Step 2: Now go to the following path

app\code\Vendor\Extension\view\frontend\templates\checkout\custom_content.phtml

Then add the code as mentioned below

Step 3: Now move to the below file path

app\design\Themes\Yourtheme\Magento_Tax\view\frontend\web\template\checkout\summary\grand-total.html

Then add the code as follows

Step 4: Once the above files are created and changes are done, kindly run the below command

After executing the above steps, your custom content is added to the order summary at checkout.

custom content

Conclusion:

Hence, this way you can add any custom text on the checkout order summary in Magento 2. Apart from this, customize the checkout order summary by adding a discount component and increment decrement functionality.

If you have any queries with the implementation of the above steps, reach me via the comment section. Share the article with your friends and stay in the loop with us.

Happy Coding!

Click to rate this post!
[Total: 6 Average: 4.8]