How to get payment method title of an order in magento 2?

You can get payment method title of order by below code snippets,

How to override magento 2 order/items/renderer/default.phtml?

We can override default.phtml file using below way,
Create sales_order_item_renderers.xml in your module layout folder,
File path will be in your module,
app/code/Rbj/Training/view/frontend/layout/sales_order_item_renderers.xml

Replace Rbj_Training with your actual module name.

Clear Cache and check your file will be overridden.

How to send image attachment with email template in magento 2

For Attach image in email template, you need to override TransportBuilder Class from Magento\Framework\Mail\Template\TransportBuilder

For Send Email Magento 2 without image attachment refer link,  Send Mail from Custom module Magento 2

For Override TransportBuilder.php file in Magento 2, you need to create di.xml file.
Using di.xml file you can override any PHP class in Magento 2.

Continue reading “How to send image attachment with email template in magento 2”