Details
Description
Hosting providers often sell or give away hosting under one of their own domains. This started long ago in the old Freeserver days. A company may own a domain, like domain.com, and allow people to purchase whatevertheywant.domain.com
The domain should be specified under the Package with a new module field called: Subdomains where a comma separated list of domains can be added, e.g. domain.com, anothername.com. During checkout, the client can enter what they want before the domain and then select the domain in a drop down menu. This complete FQDN would be passed to cPanel module for provisioning as if it were entered as before.domain.com during checkout, and stored as a service field in the same way as it is now.
This feature should be something you enable on the Package, a check box that says "Enable Sub-Domains", which then expands and has a text field for a comma separated list of domains that will be available. Display in the drop down in the order entered. If this box isn't checked, the module should work just as it does now.
One possible problem is validating whether the sub-domain has already been taken. If possible we should check this before the order is accepted. The simplest way would be to check if an A record exists for the subdomain, but I'm not sure if that is ideal.
Adding this to other shared hosting modules also would be a good idea.