- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
i want to write a update qurey before sending the order mail to customer mail magento 2 ?
Hi guys ,
i want to write a update qurey before sending the order mail to customer mail. where can i find phtml file for email. is this possible . if yes, can anyone guide me ?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: i want to write a update qurey before sending the order mail to customer mail magento 2 ?
You need to write your query in below file,
vendor/magento/module-sales/Model/Order/Email/Sender/OrderSender.php
In the above file, send() function is used for send order mail to a customer,
$order->setSendEmail(true);
You need to write query above this line and create plugin for this function.
Magento 2 Blogs/Tutorial
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: i want to write a update qurey before sending the order mail to customer mail magento 2 ?
is there any phtml file for email ?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: i want to write a update qurey before sending the order mail to customer mail magento 2 ?
you can find the phtml files related to orders here
vendor/magento/module-sales/view/frontend/templates/email/
and html files are on this path
vendor/magento/module-sales/view/frontend/email
But not sure how you will be going to write an update query in phtml, Rakesh's answer is the correct way to implement it.
If Issue Solved, Click Kudos/Accept As solutions