Hello Magento Friends,

In today’s blog, I will provide a solution on How to Add Custom Text on the Checkout Payment Page in Magento 2.

Magento 2 offers a wide range of customization options to tailor your online store according to your brand and customer preferences. One such customization involves adding custom text on the checkout payment page, allowing you to communicate important information or promotions to your customers at a critical stage in their purchasing journey. Whether it’s conveying important information, highlighting promotions, or reinforcing your brand message, this simple customization can make a significant impact on user satisfaction and conversion rates.

Let’s get started with adding custom text on the checkout payment page in Magento 2, empowering you to enhance user engagement and streamline the buying process.

Steps to Add Custom Text on the Checkout Payment Page in Magento 2:

Step 1: Create a di.xml file inside the etc folder

app/code/Vendor/Extension/etc/frontend/

Add the following code

Step 2: Now, create a ConfigProvider.php file inside the Model folder.

app/code/Vendor/Extension/Model/

Then add the code as below

Step 3: Then create a custom_text.phtml file inside the view folder.

app/code/Vendor/Extension/view/frontend/templates

Include the following line of code

Step 4: Next, create a checkout_index_index.xml file inside the view folder.

Vendor/Extension/view/frontend/layout

Then add the code as follows

Step 5: Then create a custom-text.js file inside the view folder.

app/code/Vendor/Extension/view/frontend/web/js/view/payment/

And add the following piece of code

Step 6: Now, create a custom-text.html file inside the view folder.

app/code/Vendor/Extension/view/frontend/web/template/

And add the following line of code

Step 7: In the last step, we need to run below command once.

Output – 

custom text in checkout page magento 2

Check your Magento 2 storefront. You can see that the custom text is added to the checkout payment page, as shown in the image below.

Conclusion:

By adding custom text on the checkout payment page in Magento 2, you can create a more engaging and informative shopping experience for your customers.

Learn – How to Create an Attractive Checkout Page in the Magento 2 Store.

Stay tuned for more Magento 2 customization tips to optimize your e-commerce store and stay ahead in the competitive online marketplace.

Happy Coding!

Click to rate this post!
[Total: 1 Average: 5]