0

From our Magento 1.7.0 shop, we would like to send an email to a SMS gateway, when the shipping transactional email is sent. I really can't figure how to do this - any ideas?

The email to the SMS gateway should have the following content:

SMS gateway email adress: 432342343@smsgateway.com Title: customes phonenumber content: we have sent your ordre today

Best regards, Jesper

1 Answers1

1

You should be able to observe the sales_order_status_history_model_save_before event. From within you observer:

public function observeStatusHistorySave($observer)
{
     $status = $observer->getObject();
     if (!$status->getIsCustomerNotified()) {
         return false;
     }

     $customer = $status->getOrder()->getCustomer();
     sendSms($customer->getTelephone(), "etc...");         
}
kalenjordan
  • 2,446
  • 1
  • 24
  • 38