PDA

View Full Version : Whmcs - how to send custom text based on sonfigurable option selected



Fli
11-02-2014, 08:51 PM
QUESTION:

Hi i want whmcs to send out certain email template if certain "OS template" (configurable option) is selected.

i mean i have openvz template with control panel Kloxo, and i have special whmcs welcome email with Kloxo login details.

The OS templates are set as a "Configurable Options"

How can i achieve this, when certain template with Kloxo is selected, the Kloxo email will be automatically sent too.. ?

ANSWER:

for example if the configurable option is called "Operating System" and the options the client can select are "CentOS & Kloxo + LAMP" and "Windows IIS 2008" then the code might look like:


{foreach from=$service_config_options item=configoption}
{if $configoption.option eq "Operating System"}{if $configoption.value eq "CentOS & Kloxo + LAMP"}Show This{elseif $configoption.value eq "Windows IIS 2008"}Show That{else}Show Other{/if}{/if}
{/foreach}


---
My note: so in general New server welcome email template i add above code and insert appropriate text instead of "Show This" and "Show Other"