dm800pvr Posted April 14, 2011 Share Posted April 14, 2011 (edited) Hello, What I didn't find in documents is: We can get Invoice Variables like: $invoiceid = $params['invoiceid']; # Client Variables like $firstname = $params['clientdetails']['firstname']; # System Variables like $companyname = $params['companyname']; But how can I get specific service custom fields for ex: $CustomField.=$service_custom_fields_productname; Doesn't works Is there any array for products like clientdetails array? $PRODS = $params['clientsproducts']['name']; also doesn't works Any Idea? Edited April 14, 2011 by dm800pvr 0 Quote Link to comment Share on other sites More sharing options...
dm800pvr Posted April 15, 2011 Author Share Posted April 15, 2011 I never get any answer anytime in this forum Thanks! I solved my problem by manually coding and query from database;) 0 Quote Link to comment Share on other sites More sharing options...
Inetbiz Posted April 15, 2011 Share Posted April 15, 2011 Hello, What I didn't find in documents is: We can get Invoice Variables like: $invoiceid = $params['invoiceid']; # Client Variables like $firstname = $params['clientdetails']['firstname']; # System Variables like $companyname = $params['companyname']; But how can I get specific service custom fields for ex: $CustomField.=$service_custom_fields_productname; Doesn't works Is there any array for products like clientdetails array? $PRODS = $params['clientsproducts']['name']; also doesn't works Any Idea? Custom Fields To display client custom fields in the email templates, you can either reference it by it's numerical reference such as {$client_custom_fields.0} for the first field, {$client_custom_fields.1} for the second, etc... Or you reference it by name using the format {$client_custom_field_fieldnamehere}. For fieldnamehere, you need to take your custom field name, convert the name to lowercase and remove anything other than a-z 0-9 chars. For example "VAT Number" would become "vatnumber" and so would be {$client_custom_field_vatnumber} in the email template. The same applies to Product custom fields, however they are referenced by {$service_custom_fields.0} or {$service_custom_field_fieldnamehere}. To loop through and display all the custom fields that apply to a product, you can use a foreach loop like this: {foreach from=$service_custom_fields item=customfield} {$customfield.name}: {$customfield.value} {/foreach} Taken from http://wiki.whmcs.com/Messages/Emails 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.