With this function you can not only determine the node for a location configurable option, but you can also use it to create your own algorithm to override the default host system.
For example, to deploy SSD products on other host systems than the HDD products, or to create specific products on 10 Gbit nodes.
However, the option group "NOCLocationGroup" must always be present to execute the function.

The default WHMCS $params variable get passed to these function. The $params variable contains all informations about the product.


If you want to offer multiple locations for VPS via Configurable Options - or you have your own algorithm for determining the VPS host system - you can override the selected node in the product configuration.

To do this, create a Configurable Option named "NOCLocationGroup" and define in the options the options that the customer can select. In this example we setup a selection of countries.

The module supports "Friendly Display Names", which are also used in this example:

On occasion a module may require a configurable option value to be formatted in a certain way, but this might not be very easy for visitors to understand. WHMCS can display a friendly name to visitors on the order form, emails and invoices, but still send the required machine code to the module.

For the module to know which host system has a reference to the selected option, you must specify this in the /dedicated/modules/servers/dedicated/customconfig.php file. A usage example can be found in the file /dedicated/modules/servers/dedicated/customconfig.example.php.
If you return an array with multiple values, the module will select a random node.

The hostsystems can be distributed across multiple NOC-PS installations. The module searches in all added NOC-PS servers until it finds the specified hostsystem IP.