Jump to content

Help in Opencart sms notification to user


navachaitanya

Recommended Posts

Hi everyone
I need help in opencart sms integration,
I have php sms gateway API, I want send notification to user when any new user get created account
please anyone tell me in which file i need to integrate SMS API for new account notification
 
and here is my PHP SMS API script
<?php
$sender_id=’abc’;           // sender id
$mob_no = ’123,456';       //123, 456 being recepients number
$pwd=’xxxx’;               //your account password
$msg=hi%20everyone’;       //your message
$str = trim(str_replace(‘ ‘, ‘%20', $msg));
// to replace the space in message with  ‘%20’
$url="http://login.smsgatewayhub.com/smsapi/pushsms.aspx?user='.$user.’&pwd='.$pwd.'&to=’.$mob_no.’&sid=’.$sender_id.’&msg=’.$str.’&fl=0&gwid=2';
// create a new cURL resource
$ch = curl_init();
// set URL and other appropriate options
curl_setopt($ch, CURLOPT_URL,$url);
// grab URL and pass it to the browser
curl_exec($ch);
// close cURL resource, and free up system resources
curl_close($ch);
?>

 

Link to comment
Share on other sites

create a new method with your sms code in the class "ControllerAccountRegister extends Controller", then call that method right before...

 

          // your sms method call here... $this->sendSMS();
 
            $this->response->redirect($this->url->link('account/success'));

 

but I myself would turn it into an extension, that way I could control it from the admin panel... but how to do that goes beyond the scope of a scripting help forum.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.