AbanteCart Development > General Extensions

SMS / Short Message Extensions

(1/2) > >>

James:
Dear All,

I think there should be in the future release, a new extension or feature covering the ability for owners of store to.

Allow integrating the ability to send SMS to their users, from the store based on the activities or on predefined actions.

Possible methods that can be incorporated are, by calling Web based API's or so from providers of SMSC/SMPP access.

or even writing a SMPP class to take care of the need, to communicate using SMPP protocol with the SMS providers.

Or ability to integrate with third party providers, such as "routesms.com" or other providers of SMS features.

REgards.
JAmes

abantecart:
This is very good idea. Thanks.

We will keep this open if someone is interested to create an extension for this.

James:
Thought it would be of help, to attach some resources i have had.

1.  SMPPSim.rar this has a SMSC simulator, which simulates live Telco SMSC servers, hence allowing to test applications locally without having to connect to live Telco servers and pay them for the services.

download smscsim from here (attachment size 800kb+) http://www.4shared.com/rar/ZVZ7qKJ0/SMPPSim.html

2. smppclass.rar a php based class i have had for some time, which works just fine and can be modified to work in better ways to send across sms to these SMSC's of Telco using SMPP protocol.

Steps to follow to test the same.
1. smpp.php file has  sample test script
2. smppclass.php is the class for smpp protocol (still lots need to be covered)
3. You can modify the smpp.php file to suit your local setup, by configuring the
 $smpphost , $smppport, $systemid, $password and $system_type and $from.
These are preset to the simulators configuration for now for ease of use.
4. Simulator's configurations can be changed by going into directory conf->smppsim.props.props file can be opened in any text editor.
5. Run the "startsmppsim batch file"
6. Run the smpp.php file from any local server. and you should get the output on the web end.
and see the incoming messages on the SMSC simulator.


This is for SMPP based PHP conectivity to SMSC's

For web based, API's of Telco Operators, i shall share resources soon :)

Any feedback most welcome, I will be trying to incorporate the above setup into our installation of abantecart. will upload the progress soon :)

abantecart:
Thank you for this information. Sounds good. Post if you have any questions.

James:
First Question Related to this topic.

1. What is the best way to achieve, the ability to call a function, when a admin user updates the status of an order.
2. The aim is to send an SMS nottification, When the Status of an order is updated from any of the admin section, just like there is a Send an email notification tick box while updating the order status.
3. When the admin selects the tick box to send sms along with email, the function (Code added below needs to be run). what would be the best adviced way to implement it, without having to worry about future cart updates affecting the deployment of this feature.

Note : There will be a need to be able to configure, What the Message Templates would be for each Order Status update, Also There will be the need to carry out some checks on the (Telephone number) of the user before this function is run to see if they have provided valid mobile number.

The same mobile number needs to be retrieved to be assigned to $msisdn and the preset template of message needs to be retreived as well based on the status update of the order (also note the message content will have msg templates for each order status) however, there should be ability to retrieve values such as order number, amount and order status (to be dynamically added into the msg content)

Dear All, Also i am not soo good at php. :) so i have decided to wait it out for advice from you guys rather than make any changes on the code myself and ruin it :)

PS : Also Each SMS being sent out, will need to be stored in a table sms_out. with ID/MSISDN/MESSAGE/ORDERID/DATETIME/MSGSTATUS


--- Code: ---require_once('smppclass.php');

$smpphost = "127.0.0.1";
$smppport = 2775;
$systemid = "james";
$password = "james";
$system_type = "james ";
$from = "AbanteCart";

$msisdn = "8698966383";
$msg = "Your Order # 2023, Amounting to $ 250/- Has been Dispatched";

$smpp = new SMPPClass();
$smpp->SetSender($from);
$smpp->Start($smpphost, $smppport, $systemid, $password, $system_type);
$smpp->TestLink();
$smpp->Send($msisdn, $msg);
$smpp->End();

--- End code ---

Navigation

[0] Message Index

[#] Next page

Go to full version
Powered by SMFPacks Social Login Mod