Question

I am very beginner to magento and i am looking for answer,

if i cancel order from admin panel but cancel email order is not sent to customer.

If i want to sent email to customer what should i need to do?

I already create custom email template for cancel order

I am using Ranosys module to cancel order from frontend.

No correct solution

OTHER TIPS

Reference Link

create events.xml file at path companyname/modulename/etc/adminhtml/events.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
    <event name="order_cancel_after">
        <observer name="order_cancel" instance="companyname\modulename\Observer\ordercancel" />
    </event>
</config>

Create observer file ordercancel.php at path companyname\modulename\Observer and insert the below code,

<?php

class ordercancel implements ObserverInterface
{
   public function __construct(
    ) {

    }

    public function execute(\Magento\Framework\Event\Observer $observer)
    {
       //implement here for sending mail
    }
}
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top