AbanteCart Community

Shopping Cart Operations => Support => Topic started by: hb007006 on November 21, 2016, 11:04:00 AM

Title: SMS when order is shipped / delivered
Post by: hb007006 on November 21, 2016, 11:04:00 AM
I want to know where is the code written for SMS in case of order is shipped / delivered? What is the sendpoint in codebase and what message customer will get? For example, customer should get an sms like "Your order #1 is out for delivery, It will be reaching today"
Title: Re: SMS when order is shipped / delivered
Post by: abolabo on November 22, 2016, 04:12:00 AM
Sms -sending is under instant messaging concept. This means all text message senders have it's own driver and settings for it. Send points - it's a abstract list of event names. Any extension can expand it.

To use your own sendpoint you have to add it into this list. You can access to AIM class instance via registry. (
see init.php
Code: [Select]
//IM
if(IS_ADMIN===true){
$registry->set('im', new AIMManager());
}else{
$registry->set('im', new AIM());
}
)

See file core/lib/im.php, public property $sendpoints. Please read comments there.
Also you have to add sendpoints on admin side for sending management. see file core/lib/im_manager.php.

Both of these fles use specific drivers for sending, You selects it in IM-settings.

So, to send message on some event (custom order status), you should to hook controller that updates order status on admin side, check is new status is " delivering" and call im-instance from registry with your own sendpoint name.