## Installation Instructions ##


# Copy the config_options_server_assign folder to your WHMCS's modules/addons/ folder. 
# Ensure the proper permissions are set for your environment for the folder and the php files inside of the config_options_server_assign folder.
# Active the Module in WHMCS by going to Setup->Addon Modules in your WHMCS Admin area, find Config Options Server Assign module and click activate.
# Next, click configure next to Config Options Server Assign and grant access to the administrator groups that should have access to the admin area interface.
# Enter in your license key and click save changes.

# This module can assign servers in two different ways, by server id or by a server group id. For our example we will assume you will be adding a new
configurable option which allows a customer to select a data center location.

  ## Assigning using a Server ID
    
    #In the WHCMS Admin area, first setup a new Configurable Options group and configurable options.
      #Setup->Products/Servers->Configurable Options
      #First Click Create a New Group or you can use an existing group. 
       This group can be called anything you would like, for example you can call it Datacenter Locations. Be sure to select all the products you would like to use these locations with.
      #Now create the configurable option by clicking on Add New Configurable Option
      #For the option name enter a name for your option, for this example we will use Location
      #For the option type, select dropdown
      #Add your first data center location option in the add option filed with the following format:
        serveridtoassign|Location Name
        
        For example if we want to assign server 3 when someone selects east coast data center, the option would look like this:
        3|East Coast Data Center
        
        Then our next option will be server 5 for the West Coast Data Center
        5|West Coast Data Center
      
      # You can change the server id values at anytime or add additional options at anytime and it will only apply to new orders.
        
      #You can find the server id's for each server by going to Setup->Product/Services->Servers. Click the edit server link and then look for the id= statement in your url. That is the server id.
      
      # The last step is to activate the server assignments, this is done by going to Addons->Config Options Server Assign
        #Select the Package this should apply to, next select the new configurable option that was just created, and choose ServerID for the Select Server By option.
        #Follow this same procedure to active all packages that you would like to assign by the new configurable option you just created.
     
  ## Assigning a server using a Server Group ID
      
    # From the WHMCS admin area, the first thing that needs to be done is the new server groups by location should be created.
      #Click on Setup->Product/Services->Servers
      #Click Create New Group
      #For the name enter the location name and then select the severs to pick from when someone chooses this location.
      #Leave the Fill Type as the default option. This module uses a similar method for picking the next server to use from the group. 
        #It will look for the least full server in that group hasn't reached the max accounts and pick that for the new server. 
          #If all servers all full, it will select the least full server.
      #Setup your additional server groups for all of your locations
      
    #Next, setup a new Configurable Options group and configurable options.
      #Click on Setup->Products/Servers->Configurable Options
      #First Click Create a New Group or you can use an existing group. 
       This group can be called anything you would like, for example you can call it Datacenter Locations. Be sure to select all the products you would like to use these locations with.
      #Now create the configurable option by clicking on Add New Configurable Option
      #For the option name enter a name for your option, for this example we will use Location
      #For the option type, select dropdown
      #Add your first data center location option in the add option filed with the following format:
        groupidtouse|Location Name
        
        For example if we want to assign server group 3 when someone selects east coast data center, the option would look like this:
        3|East Coast Data Center
        
        Then our next option will be server group 5 for the West Coast Data Center
        5|West Coast Data Center
      
      # You can change the group id values at anytime or add additional options at anytime and it will only apply to new orders.
        
      #You can find the group id's for each server by going to Setup->Product/Services->Servers. Click the edit group link and then look for the id= statement in your url. That is the group id.
      
      # The last step is to activate the server assignments, this is done by going to Addons->Config Options Server Assign
        #Select the Package this should apply to, next select the new configurable option that was just created, and choose Server Group ID for the Select Server By option.
        #Follow this same procedure to active all packages that you would like to assign by the new configurable option you just created.
        
If you have any questions or run into any issues, feel free to email us at support@serverping.net.