Jump to content

Email template help


net

Recommended Posts

Hi guys,

 

I am trying to setup a product email template to be mailed our automatically once the product has been setup. The issue I'm having is with the configurable options. I setup a few configurable options and I would like them to show up on the email that is sent out.

 

They only thing I found on WHMCS end regarding this was

 

"Config. Options {$service_config_options}".

 

So I added "{$service_config_options}" to my email body and got the output "Array". I tried setting up a foreach array but I don't know the correct values so my array may be wrong.

 

Here is what I got:

 

{foreach from=$service_custom_fields item=configoption} sa {$configoption.optionname}: {$options.name} {/foreach}

 

Anyone know how to display product config options in an email template set in the product group?

 

All my Google searches bring up custom fields which is not what I am using in this situation.

 

Any help would be greatly appreciated, Thanks!

Link to comment
Share on other sites

I figured it out and wanted to post the solution here incase any other poor souls are having troubles with this.

 

The solution is: {$service_config_options_html}

 

Which displays all the config options.

Link to comment
Share on other sites

  • 2 months later...

I figured out printing the value of a config option in an email template is this way:

 

{foreach from=$service_config_options item=configoption}

{if $configoption.option eq "CONFIGOPTIONNAME"}

{$configoption.option}: {$configoption.value}

{/if}

{/foreach}

Edited by heapmaster
Link to comment
Share on other sites

  • 1 year later...

This was very helpful, thank you!

 

I figured out printing the value of a config option in an email template is this way:

 

{foreach from=$service_config_options item=configoption}

{if $configoption.option eq "CONFIGOPTIONNAME"}

{$configoption.option}: {$configoption.value}

{/if}

{/foreach}

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated