I searched the internet and founded nothing.
I need to send an email to customer when the order is canceled. I've founded the trigger order_cancel_after
when the order is canceled, but that' all i founded.
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.
Sign up to join this communityI searched the internet and founded nothing.
I need to send an email to customer when the order is canceled. I've founded the trigger order_cancel_after
when the order is canceled, but that' all i founded.
order_cancel_after
-> 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;
}
Source : What is the event will fire after cancelled the order in Magento 2
Magento does send a number of transnational emails, including cancellation. (e.g. order status change); the only issue with a cancellation email, requires the customer service agent cancelling to click Notify Customer
. You can edit this to be the default.
To enable emails on order comments, go to Store > Configuration > Sales > Sales Emails
and make sure order comment is enable. It take from your E-mail template
FYI : This class Magento\Sales\Helper\Data
send all email for order transaction.