- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-15-2018
06:47 AM
08-15-2018
06:47 AM
Cancelled order message
I'm trying to find a way to (optionally) send a message to a customer when an order is cancelled, is there a good way of accomplishing that?
Labels:
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-15-2018
10:12 PM
08-15-2018
10:12 PM
Re: Cancelled order message
You need to override Controller Cancel.php from below location
path /vendor/magento/module-sales/Controller/Adminhtml/Order/Cancel.php
you can change your message from above file.
If Issue Solved, Click Kudos/Accept As solutions. Get Magento insight from
Magento 2 Blogs/Tutorial
Magento 2 Blogs/Tutorial
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-15-2018
11:02 PM
08-15-2018
11:02 PM
Re: Cancelled order message
Hello joseph_digiovanna
You can use order_cancel_after obsever event and send email to customer for order. it's dispatched in the cancel method of \Magento\Sales\Model\Order :
public function cancel() { if ($this->canCancel()) { $this->getPayment()->cancel(); $this->registerCancellation(); $this->_eventManager->dispatch('order_cancel_after', ['order' => $this]); } return $this; }
Hope it will help to solve problem then Accept as Solution or Find helpful then Consider Giving Kudos to this post.