Please help us to make AbanteCart Ideal Open Source Ecommerce Solution for everyone.

Support AbanteCart eCommerce

Author Topic: SMS when order is shipped / delivered  (Read 2489 times)

Offline hb007006

  • Newbie
  • *
  • Posts: 28
  • Karma: +1/-3
    • View Profile
SMS when order is shipped / delivered
« 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"

Offline abolabo

  • core-developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2043
  • Karma: +318/-13
  • web for all, all for web!
    • View Profile
    • AbanteCart
Re: SMS when order is shipped / delivered
« Reply #1 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]
$registry->set('im', new AIMManager());
$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.
« Last Edit: November 22, 2016, 04:15:12 AM by abolabo »
“No one is useless in this world who lightens the burdens of another.”
― Charles Dickens


Powered by SMFPacks Social Login Mod