Hi,
How are we supposed to override the "Payment method" info block in a new order email?
Overriding this payment info block in the email seems to be more complicated than doing it in other places around M2.
Thanks a lot for your answers.
Solved! Go to Solution.
Thank you @Damian Culotta for your insight. The best answer that actually works to override specific content in the order email through event observers, as described in the accepted answer here:
https://magento.stackexchange.com/questions/159142/override-model-function-magento-2
Hi @davidfiaty,
I didn't tried yet but maybe this old examples can help to try to understand a little bit more: https://github.com/magento/magento2-samples/tree/master/sample-module-payment-gateway
thank you for this link. I already had the sample module. I'm not sure what you are suggesting.
Are you saying that there is an example of order email block override in this sample module?
Hi @davidfiaty,
Sorry, I misunderstood the question at the beginning.
I guess you want to add extra/specific content when your payment method is used, right?
If that is the case I don't have an example but I can recommed to follow this blog https://www.maxpronko.com/blog/tagayment to get more information about payment modules on Magento2.
thank you for this, very good blog. Unfortunately I haven't found anything related to my question. Have I missed something?
Nope, you're right.
Right know I can't extra info or examples. I was looking for some modules on github of well known gateways integrations but I didn't found what (I think) you're looking for.
I just want to override blocks in the new order email.
Also, I've found this open isssue: https://github.com/magento/magento2/issues/3724
Thank you @Damian Culotta for your insight. The best answer that actually works to override specific content in the order email through event observers, as described in the accepted answer here:
https://magento.stackexchange.com/questions/159142/override-model-function-magento-2