Reputation: 3107
How can I send a SMS to a customer as soon as the status of his order changes, from pending, processing or/and complete.
Im using php magento, Im trying to send customers sms whenever an order is being placed, and i want an sms to be sent on each change in the order status. The problem is if i put the message outside the event condition, i get an sms, but if i put in $order_status == Mage_Sales_Model_Order::STATE_COMPLETE, there are no sms
You can see what I've tried below, but it doesn't seem to work.
$order = $observer->getEvent()->getOrder();
if ($order_status == Mage_Sales_Model_Order::STATE_PROCESSING)
{
$message = "Dear Customer, Your order is being processed";
}
if ($order_status == Mage_Sales_Model_Order::STATE_COMPLETE)
{
$message = "Your order is complete, Pls expect the delivery";
}
Upvotes: 0
Views: 1161
Reputation: 243
I Found answer on the same website:
There are free modules available like "Spring Edge Magento sms extension" which is Compatible with: Magento versions 1.x, 2.x
Magento sms module events configuration :
*When Order is placed. * When order status is set to hold. * When order status is set to Unhold. * When order is cancelled. * When order status is set Shipment.
SMS Integration with Magento API
Upvotes: 2