Jump to content

Free Hook: Auto-Check your customer details


Recommended Posts

Do you have registrations or request with fake details ?

 

Or you just want to have your data well updated ?

 

Just uploading this file into your hook folder it will check send and alert to your customers if they dont have :

  1. Dont have A good Zip code
  2. Dont have A phone number
  3. Dont have any other data you want to have always filled as customer (customizable)

 

This is not a hook to avoid register or request a service, it checks all your customer database and send them an alert to each one.

 

Instructions:

 

  1. Upload below file to /includes/hooks/updatecustomer.php
  2. Customer an Template email called "CRM - Customer data"

Thats all.

 

<?php
#
function updatecustomer_sendclientmail() 
 {
 # Template file name
 $emailtpl = "CRM - Customer data";
 # API Command
 $command = 'SendEmail';
 # Admin Username or ID
 $adminuser = "youradminuser";  //<--ENTER HERE YOUR ADMIN USER
 $adminid = "1";
 #todos pending.
$laquery = mysql_query('SELECT * FROM  `tblclients` WHERE  STATUS NOT IN (\'Closed\',\'Inactive\') and (`address1` =\'\' or `phonenumber` =\'\' or `postcode` =  \'\') ');
 #make array
 while ($result = mysql_fetch_assoc($laquery)) 
	 {
	 $id = $result['id']; 
	 $values = array('messagename' => $emailtpl,'customtype' => $general, 'id' => $id,);
	 $apiresults = localAPI($command,$values,$adminuser);
	 logActivity("CRM - Envio $emailtpl a $id - $userid - $email - fin");
	 }
}

add_hook('DailyCronJob', 2, 'updatecustomer_sendclientmail');

?>

Link to comment
Share on other sites

  • 2 weeks later...
  • 3 weeks later...

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.   Paste as plain text instead

  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

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated