This service has been discontinued

If you are a company selling whmcs modules and you are interested in our code you can contact us with an offer at info at whmcstricks dot com
All other requests will be ignored.

Related product required when opening a ticket

February 16, 2018

WHMCS by default lets your customers pick a service, addon or domain when opening a ticket.

For some departments it could be useful to force this, setting the Related Service select required.

This is exactly what this hook does.


Installation and configuration

To install the hook simply upload the php file in the includes/hooks folder of your whmcs installation.

This hook requires the Custom module to manage hooks settings that you can download for free.

All you will have to do is to add a setting (whmcstricks_related_product_required_departments) with the departments names as the setting values.

The department names have to be comma separated (example: info, support) with or without the space. Make sure you're using exactly the same name you're using in whmcs, with a particular look on capital letters, since the script is case sensitive.

NOTE: if you're using Dynamic Field Translations please make sure you add all the translations for the department to the setting, to make it work in every language.

Correct the scroll

If you're using a fixed menu on top, the page will scroll, but most likely the field will remain below the menu. If this is the case with your theme you can set the setting "whmcstricks_related_product_required_full_scroll" to "true" (without the quotation marks). With this setting the page will scroll all the way to the top.