Hello fellow WHMCS friends,
I am looking for a way to validate custom fields in the "product configuration" options when checking out a product in the shopping cart.
The use case looked pretty simple but became unsolvable: I want my customers to specify a hostname for virtual servers with some conditions.
First, just enter a a regex validated hostname like "host.location.domain.tld" (I know, I can specify and validate regex as builtin option in WHMCS, so thats not the point).
But then I need to intercept before it comes to the cart checkout page.
1. If the FQDN is already used within our zone (*.cfire.cloud) it must throw an error and the customer must choose a different hostname.
2. If the FQDN is _not_ within our zone (*.cfire.cloud), the hostname should be accepted as long as the regex validates it.
3. The this way selected hostname should become the WHMCS native "domain" for the product that is shown on Clients Page together with the product.
How to code this myself is not the problem, but _where_ can I intercept this order process to execute my checks and array settings? There is no hook for this position. "ShoppingCartValidateCheckout" is too late...
Maybe WHMCS would setup a hook, if I ask them...? Any ideas or experiences?
Thank you and best regs,
Alex