cancel
Showing results for 
Search instead for 
Did you mean: 

Different Text on email transactional

Highlighted

Different Text on email transactional

Hello,

it is possible to add an if or depend by type of payment method in transactional emails?

 

So change the text?

Front End Developer - Magento experience
E-commerce Chile
Perla Simeone
4 REPLIES 4
Highlighted

Re: Different Text on email transactional

Hi @Perla Simeone 

Please add following code within email template:

{{if order.getPayment().getMethodInstance().getCode() == 'banktransfer'}}

Some Text!

{{/if}}

You can also refer below URL for add conditions within email template:
https://mage2.pro/t/topic/1392

If issue resolved, Please click on 'Kudos' & Accept as Solution!

Highlighted

Re: Different Text on email transactional

Hi @Bhanu Periwal ,

 

it worked but calling a phtml inside the template email.

 

Do you know what is the code to do the same but with the shipping method?

Front End Developer - Magento experience
E-commerce Chile
Perla Simeone
Highlighted

Re: Different Text on email transactional

Hi @Perla Simeone 

Kindly refer below link, it  will help you to resolve issue:

https://magento.stackexchange.com/questions/160382/magento-2-send-different-email-templates-for-ship...

If issue resolve, Please click on 'Kudos' & Accept as Solution!

Highlighted

Re: Different Text on email transactional

Hi @Bhanu Periwal ,

I tried it but it doesn't work.

 

Do you have another idea why it doesn't work?

Front End Developer - Magento experience
E-commerce Chile
Perla Simeone