ocastaned Posted February 9, 2019 Share Posted February 9, 2019 I need some help to figure it out how can I include a service user into an invoice. I have several radio streaming plans. One of them is called: Centova Cast PRO. My customer has 5 of those services, but she would like to know which user is the invoice she is paying for. In conclusion, how can I include a service user into a generated radio streaming invoice, so she can know which service she is paying for. I tried to include this "User: {$service_username}" in the emails templates, but it didn't work. It doesn't show the user. Thank you for your help. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted February 9, 2019 Share Posted February 9, 2019 1 hour ago, ocastaned said: I tried to include this "User: {$service_username}" in the emails templates, but it didn't work. It doesn't show the user. if you're thinking of adding it to the email templates, then i'd suggest adding {debug} to the email template; sending yourself a test email (e.g from the invoices page); go to the client's mail tab in their profile summary, click on the email that has just been sent and you should see a popup window of available arrays and variables to the template. if your service user is available in one of the variables, then you can use it in the email template... if it isn't, then you're looking at using a hook, or if you want to use it in the PDF invoice, then you would edit the template and query the database... in the invoice emails, you won't have access to product details directly. 0 Quote Link to comment Share on other sites More sharing options...
ocastaned Posted February 10, 2019 Author Share Posted February 10, 2019 I don't think it is working. What I want is service username is included in the email notification customer received each month to pay their invoice. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted February 10, 2019 Share Posted February 10, 2019 Just now, ocastaned said: I don't think it is working. you mean the popup doesn't appear or something else isn't working ? if popup, then that only appears when you view the email in WHMCS. 2 minutes ago, ocastaned said: What I want is service username is included in the email notification customer received each month to pay their invoice. then you'd likely need to use a EmailPreSend hook, query the database to get the username (which might take a bit of work, as you'll likely only have the invoice id or invoice_items to work with as a starting point). 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.