Page tree
Skip to end of metadata
Go to start of metadata

If you want to add additional variables into the notification template, proceed as follows:

  • Navigate into the directory /modules/servers/servicenotifications/
  • Open the file defaults.php
  • At the function sn_extendVars you can return an associative array, whereby the key is the value which you insert into the notification template.

The WHMCS params array and the product type (addon or product) is passed as an argument. Based on the content of these arguments, you can fetch values from the database, or build any template variable.

Example

return array ('additionalParam1' => 'value123', 'nameAsYouWant' => '123value');

In your notification template, you can insert "$nameAsYouWant" and it will send the notification with the value "123value".


  • No labels