Email notification for cancelled order
Clash Royale CLAN TAG#URR8PPP
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;
up vote
2
down vote
favorite
Hi is it also possible to get email notification for cancelled orders?
Thanks
email magento2.1.6
add a comment |Â
up vote
2
down vote
favorite
Hi is it also possible to get email notification for cancelled orders?
Thanks
email magento2.1.6
add a comment |Â
up vote
2
down vote
favorite
up vote
2
down vote
favorite
Hi is it also possible to get email notification for cancelled orders?
Thanks
email magento2.1.6
Hi is it also possible to get email notification for cancelled orders?
Thanks
email magento2.1.6
asked Sep 4 at 7:30


RJ Tubera
186
186
add a comment |Â
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
3
down vote
accepted
You can always write your own module that will do that.
You will need few ingredients for that:
Have an observer that listens on the
sales_order_save_after
event.This link explains it well
catch order place after event magento2
In this observer you will get the order object by
$order= $observer->getData('order');
and you could check if the new status iscanceled
If condition from point 1 above is true you can proceed to send an email programatically.
This link offers good idea of how to do thatHow to send mail programmaticlly in magento2?
Thanks for providing the links! Will check them out
– RJ Tubera
Sep 4 at 8:20
I cannot guarantee that it will be easy to directly copy and use them. But I think it will give you a good idea. And if you somehow get stuck, well, just add a new question here :)
– Marjan
Sep 4 at 8:22
add a comment |Â
up vote
0
down vote
You will need to create a separate functionality for sending the email on order cancellation.
You can use the order_cancel_after
event for writing your email function.
You can get the order details using the order object as given below
<?php
namespace VendorModuleObserver;
use MagentoFrameworkEventObserver;
use MagentoFrameworkEventObserverInterface;
class OrderCancellationEmail implements MagentoFrameworkEventObserverInterface
/**
*
* @param MagentoFrameworkEventObserver $observer
* @return $this
*/
public function execute(MagentoFrameworkEventObserver $observer)
$order = $observer->getData('order');
// Write your email function here
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
accepted
You can always write your own module that will do that.
You will need few ingredients for that:
Have an observer that listens on the
sales_order_save_after
event.This link explains it well
catch order place after event magento2
In this observer you will get the order object by
$order= $observer->getData('order');
and you could check if the new status iscanceled
If condition from point 1 above is true you can proceed to send an email programatically.
This link offers good idea of how to do thatHow to send mail programmaticlly in magento2?
Thanks for providing the links! Will check them out
– RJ Tubera
Sep 4 at 8:20
I cannot guarantee that it will be easy to directly copy and use them. But I think it will give you a good idea. And if you somehow get stuck, well, just add a new question here :)
– Marjan
Sep 4 at 8:22
add a comment |Â
up vote
3
down vote
accepted
You can always write your own module that will do that.
You will need few ingredients for that:
Have an observer that listens on the
sales_order_save_after
event.This link explains it well
catch order place after event magento2
In this observer you will get the order object by
$order= $observer->getData('order');
and you could check if the new status iscanceled
If condition from point 1 above is true you can proceed to send an email programatically.
This link offers good idea of how to do thatHow to send mail programmaticlly in magento2?
Thanks for providing the links! Will check them out
– RJ Tubera
Sep 4 at 8:20
I cannot guarantee that it will be easy to directly copy and use them. But I think it will give you a good idea. And if you somehow get stuck, well, just add a new question here :)
– Marjan
Sep 4 at 8:22
add a comment |Â
up vote
3
down vote
accepted
up vote
3
down vote
accepted
You can always write your own module that will do that.
You will need few ingredients for that:
Have an observer that listens on the
sales_order_save_after
event.This link explains it well
catch order place after event magento2
In this observer you will get the order object by
$order= $observer->getData('order');
and you could check if the new status iscanceled
If condition from point 1 above is true you can proceed to send an email programatically.
This link offers good idea of how to do thatHow to send mail programmaticlly in magento2?
You can always write your own module that will do that.
You will need few ingredients for that:
Have an observer that listens on the
sales_order_save_after
event.This link explains it well
catch order place after event magento2
In this observer you will get the order object by
$order= $observer->getData('order');
and you could check if the new status iscanceled
If condition from point 1 above is true you can proceed to send an email programatically.
This link offers good idea of how to do thatHow to send mail programmaticlly in magento2?
answered Sep 4 at 7:57


Marjan
3516
3516
Thanks for providing the links! Will check them out
– RJ Tubera
Sep 4 at 8:20
I cannot guarantee that it will be easy to directly copy and use them. But I think it will give you a good idea. And if you somehow get stuck, well, just add a new question here :)
– Marjan
Sep 4 at 8:22
add a comment |Â
Thanks for providing the links! Will check them out
– RJ Tubera
Sep 4 at 8:20
I cannot guarantee that it will be easy to directly copy and use them. But I think it will give you a good idea. And if you somehow get stuck, well, just add a new question here :)
– Marjan
Sep 4 at 8:22
Thanks for providing the links! Will check them out
– RJ Tubera
Sep 4 at 8:20
Thanks for providing the links! Will check them out
– RJ Tubera
Sep 4 at 8:20
I cannot guarantee that it will be easy to directly copy and use them. But I think it will give you a good idea. And if you somehow get stuck, well, just add a new question here :)
– Marjan
Sep 4 at 8:22
I cannot guarantee that it will be easy to directly copy and use them. But I think it will give you a good idea. And if you somehow get stuck, well, just add a new question here :)
– Marjan
Sep 4 at 8:22
add a comment |Â
up vote
0
down vote
You will need to create a separate functionality for sending the email on order cancellation.
You can use the order_cancel_after
event for writing your email function.
You can get the order details using the order object as given below
<?php
namespace VendorModuleObserver;
use MagentoFrameworkEventObserver;
use MagentoFrameworkEventObserverInterface;
class OrderCancellationEmail implements MagentoFrameworkEventObserverInterface
/**
*
* @param MagentoFrameworkEventObserver $observer
* @return $this
*/
public function execute(MagentoFrameworkEventObserver $observer)
$order = $observer->getData('order');
// Write your email function here
add a comment |Â
up vote
0
down vote
You will need to create a separate functionality for sending the email on order cancellation.
You can use the order_cancel_after
event for writing your email function.
You can get the order details using the order object as given below
<?php
namespace VendorModuleObserver;
use MagentoFrameworkEventObserver;
use MagentoFrameworkEventObserverInterface;
class OrderCancellationEmail implements MagentoFrameworkEventObserverInterface
/**
*
* @param MagentoFrameworkEventObserver $observer
* @return $this
*/
public function execute(MagentoFrameworkEventObserver $observer)
$order = $observer->getData('order');
// Write your email function here
add a comment |Â
up vote
0
down vote
up vote
0
down vote
You will need to create a separate functionality for sending the email on order cancellation.
You can use the order_cancel_after
event for writing your email function.
You can get the order details using the order object as given below
<?php
namespace VendorModuleObserver;
use MagentoFrameworkEventObserver;
use MagentoFrameworkEventObserverInterface;
class OrderCancellationEmail implements MagentoFrameworkEventObserverInterface
/**
*
* @param MagentoFrameworkEventObserver $observer
* @return $this
*/
public function execute(MagentoFrameworkEventObserver $observer)
$order = $observer->getData('order');
// Write your email function here
You will need to create a separate functionality for sending the email on order cancellation.
You can use the order_cancel_after
event for writing your email function.
You can get the order details using the order object as given below
<?php
namespace VendorModuleObserver;
use MagentoFrameworkEventObserver;
use MagentoFrameworkEventObserverInterface;
class OrderCancellationEmail implements MagentoFrameworkEventObserverInterface
/**
*
* @param MagentoFrameworkEventObserver $observer
* @return $this
*/
public function execute(MagentoFrameworkEventObserver $observer)
$order = $observer->getData('order');
// Write your email function here
answered Sep 4 at 7:54


Dinesh Yadav
3,1871730
3,1871730
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f240700%2femail-notification-for-cancelled-order%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password