Posts

Showing posts from September, 2016

Observer in magento

Send Email/ Sms on Change Order Status in Magento  Steps 1. Create Module Suppose to "Sendsms_Custmail"  copy and paste the following code into app/etc/modules/ Sendsms_Custmail.xml <?xml version="1.0" encoding="UTF-8"?> <config>     <modules>         <Sendsms_Custmail>             <active>true</active>             <codePool>local</codePool>         </Sendsms_Custmail>     </modules> </config> Steps 2. now Create the Observer.php file and put the following path  app\code\local\Sendsms\Custmail\Model\ <?php class Sendsms_Custmail_Model_Observer {      public function invoicedStatusChange($event)     {         $order = $event->getOrder(); $orderStatus = $order->getStatus();            //if ($order->getState() == Mage_Sales_Model_Order::STATE_CANCELED)         //if ($order->getState() == Mage_Sales_Model_Order::STATE_COMPLETE)         if ($