Search the Community
Showing results for tags 'client group'.
Found 3 results
This hook is similar to the one that assigns clients to groups based on purchases. This time we're assigning clients to groups based on registration date or more precisely on user seniority. Let's take this code as example. $groups['1'] = '90'; $groups['2'] = '180'; $groups['3'] = '365'; They key of $groups array (eg. ['1']) represents the ID of the group while the value user seniority (days between registration date and current date). According to the above configuration, here is what happens: Customer A registered 34 days ago. No change Customer B registered 90 days ago. He goes to client group ID 2 Customer C registered 364 days ago. Still group ID 2 Customer D registered 500 days ago. He goes to client group ID 3 Optionally, you can turn on any of the following features to add some restrictions: $activeCustomers rules apply only on Active customers (boolean true or false) $oldestPurchase rules apply only on if customer has a product/service or domain older than the given number of days (integear) The hook runs with WHMCS daily cron job meaning that tomorrow the customer C of the above example will move from group 2 to 3. Get the Code »
Automatically assign customers to a client group based on purchased product/service, product addon and configurable options. It works only for customers that haven't been assigned to any group yet. Below we're going to show you how to define group/product pairs. Let's take this code as example. $groups['products']['1'] = array('1', '2', '3'); $groups['products']['2'] = array('4'); $groups['productaddons']['1'] = array('2'); $groups['configurableoption']['3'] = array('5' => true, '6' => array('7', '8', '10')); They key of the first level of $groups array (eg. ['products']) can assume the following values: products for group/product pairs productaddons for group/product addon pairs configurableoption for group/configurable option paris They key of the second level of $groups array (['1'], ['2']) represents the client group ID. array() stores product IDs, product addon IDs and configurable options. Let's put it into practice explaining what the above configuration means: Customer A purchases product 1. He goes to client group ID 1 Customer B purchases product 2. He still goes to client group ID 1 Customer C purchases product 4. He goes to client group ID 2 Customer D purchases product 5. No action taken Customer E purchases product 1 and is already assigned to a client group. No action taken Customer F purchases product addon 2. He goes to client group ID 1 Customer G purchases a product selecting any value of configurable option ID 5. He goes to client group ID 3 Customer H purchases a product selecting specifically 7, 8 or 10 options of configurable option ID 6. He goes to client group ID 3 The script is available in two versions. The configuration is the same. What changes is the hook point: AcceptOrder version assigns the group when the order is accepted - both manually and automatically EmailPreSend version assign the group a moment before WHMCS sends the Welcome Email - any type (eg. Hosting, VPS, CodeGuard, Marketgoo...). This way the group just assigned is immediately ready for use in email templates
Am I missing something? What do you recommend? How do I enable Auto Registration for domains for a specific client group, or a client(s)? On the example.whmcs/configdomains.php page there is a dropdown option to enable Auto Registration for specific registrar. How do I make it so existing clients, or even a specific client group will "auto register" for say... a .com domain if the default .com option is None? I usually like to manually review / register domains to make sure they pass my fraud protection. I've never been a big of the Fraud Protection by Maxmind (or anyone else). I made sure too, in the WHMCS 7.4.1 General Settings tab, that existing clients skip fraud protection. But since I'm not using any fraud protection that shouldn't even matter... Thanks for any feedback and tips.