1

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.

1 Answer 1

1

Reference Link

create events.xml file at path Vendor/Module/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="Vendor\Module\Observer\ordercancel" />
    </event>
</config>

Create observer file ordercancel.php at path Vendor\Module\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
    }
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.