Note |
---|
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. |
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.
Info | ||
---|---|---|
| ||
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. |