i want to add this code
Code: Select all
<!-----kode untuk kirim sms ke admin----->
$nomor="085XXXXXXX";//isi no.hp admin atau anda sebagai pemilik toko.
$email=$this->db->escape($data['email']);
$pass= $this->db->escape($data['password']);
$pesan="Ada Pendaftar baru, username: $email dan
password:".$pass." [prestashop.com]";
$pesan=str_replace(" ","+",$pesan);
$url="http://smsgatewa**.com/api?user=demo@gmail.com&pass=demo&pesan=". $pesan. " .
&senderid=modem1&nomor=".$nomor."";
$curlHandle = curl_init();
curl_setopt($curlHandle, CURLOPT_URL, $url);
curl_setopt($curlHandle, CURLOPT_POSTFIELDS,"");
curl_setopt($curlHandle, CURLOPT_HEADER, 0);
curl_setopt($curlHandle, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curlHandle, CURLOPT_TIMEOUT,0);
curl_setopt($curlHandle, CURLOPT_POST, 1);
curl_exec($curlHandle);
curl_close($curlHandle);
Code: Select all
<!------- kode untuk kirim sms ke pelanggan ------>
$nomor=$this->db->escape($data['telephone']);
$pesan="Terimakasih telah mendaftar, username
anda:".$email." dan password:".$pass." [www.TokoOnlineku.com]";
$pesan=str_replace(" ","+",$pesan);
$url="http://smsgatewa**.com/api?user=demo@gmail.com&pass=demo&pesan=". $pesan. " .
&senderid=modem1&nomor=".$nomor."";
$curlHandle = curl_init();
curl_setopt($curlHandle, CURLOPT_URL, $url);
curl_setopt($curlHandle, CURLOPT_POSTFIELDS,"");
curl_setopt($curlHandle, CURLOPT_HEADER, 0);
curl_setopt($curlHandle, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curlHandle, CURLOPT_TIMEOUT,0);
curl_setopt($curlHandle, CURLOPT_POST, 1);
curl_exec($curlHandle);
curl_close($curlHandle);
under this code line: public function addCustomer($data)
But on oc 2.2.0.0 this customer.php change dramatically and i always getting error when put this code.
if this code installed succesfully, my customer and i will recieve notification from sms gateway when they registered.
where should I install the code correctly?
thank
best regards
alex