HR_UK Posted June 24, 2016 Share Posted June 24, 2016 Good Afternoon, I am trying to customize my email templates and missing some WHMCS tag/fields and hoping someone can fill in the blanks. New Cancellation Request Template - I want to send the domain name thats linked to the cancelled hosting. I have tried putting "{$service_domain}" but it comes through as blank. Service Suspension Notification - I want to add how much the customer owes in total for all there unpaid invoices for all services. Any ideas? Thanks in advance, Mark 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted June 24, 2016 Share Posted June 24, 2016 Mark, in general with the email templates, you can only use the mergefields that are available to that template (or template type) - so bizarrely, while you can use {$service_domain} in the client email template for a cancellation request (as it's an available mergefield), it's not available to the admin equivalent - welcome to using WHMCS! if a mergefield is absent in the template you want to use it in, then you can create it using an action hook - but you would need to query the database to get the correct value. with regards to the service suspension template, can you use {$client_due_invoices_balance} to show the correct amount ? 0 Quote Link to comment Share on other sites More sharing options...
HR_UK Posted June 27, 2016 Author Share Posted June 27, 2016 Mark, in general with the email templates, you can only use the mergefields that are available to that template (or template type) - so bizarrely, while you can use {$service_domain} in the client email template for a cancellation request (as it's an available mergefield), it's not available to the admin equivalent - welcome to using WHMCS! if a mergefield is absent in the template you want to use it in, then you can create it using an action hook - but you would need to query the database to get the correct value. with regards to the service suspension template, can you use {$client_due_invoices_balance} to show the correct amount ? Many Thanks Brian. Do you by chance have a link (manual or forum) to the basics of putting an action hook into a template? The SQL side of things I am fine with, I just havent done any work with the WHMCS hooks before. {$client_due_invoices_balance} works a charm thank you. I have included my line here incase it can help anyone else --- Your current balance is {$client_credit}{if $client_due_invoices_balance != '£0.00GBP'} with outstanding invoices of {$client_due_invoices_balance}.{/if} --- Thanks, Mark 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.