cancel
Showing results for 
Search instead for 
Did you mean: 

Email - New Order -Payment title only

SOLVED

Email - New Order -Payment title only

Dears,

I'm creating a new email for 'new order' however, I am facing a problem.
the default payment method showing in the email, shows many lines. But I only want the title to be showing.

I tried to change the 

 {{var payment_html|raw}}

To

{{var order.getPayment().getMethodInstance().getTitle()}}

However, this didn't work. in fact, the payment method is not showing at all right now..

Is there anyone has a good solution for my problem ?

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Email - New Order -Payment title only

Hello,

My issue has been solved when I modified the Email from DB by changing is_legacy from 0 to 1.

View solution in original post

4 REPLIES 4

Re: Email - New Order -Payment title only

Hi @achahinewiffa8 

 

Kindly refer below link for your issue:
https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/templates/template-email.html 

 

It may help you!
Problem Solved? Please click on 'Kudos' & Accept as Solution!

Problem solved? Click Accept as Solution!

Re: Email - New Order -Payment title only

Hello @achahinewiffa8 

 

In vendor\magento\module-sales\Model\Order\Email\Sender\OrderSender.php
 
'payment_html' => $this->getPaymentHtml($order),  
You can change in this above line.
 
It is not a good practice to make changes in the default file. What you can do is override that file and make changes.
 
I hope it helps.
Problem solved? Click Kudos and "Accept as Solution".
200+ Magento 2 Extensions for Enhanced Shopping Experience.

Re: Email - New Order -Payment title only

Hii Bhanu Periwal,


 This works really well for us, Thanks for the update and quick reply. I'll be sure to keep an eye on this thread MyGroundBiz.com

Re: Email - New Order -Payment title only

Hello,

My issue has been solved when I modified the Email from DB by changing is_legacy from 0 to 1.