ouldfella Posted August 31, 2017 Share Posted August 31, 2017 hi, in the model emails there is an email named "Invoice Created" in this email there is a variable named : "{$invoice_html_contents} " can i modiy the content ? thanks 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted August 31, 2017 Share Posted August 31, 2017 hi,in the model emails there is an email named "Invoice Created" in this email there is a variable named : "{$invoice_html_contents} " can i modify the content ? it's just a Smarty variable, so you can alter it using Smarty (e.g using Replace) - but it depends how much you want to modify it.... if it's a complicated change, you could {foreach} through the nested {$invoice_items} array... or use an action hook. do a forum search on $invoice_html_contents to see previous answers on the various methods. 0 Quote Link to comment Share on other sites More sharing options...
ouldfella Posted August 31, 2017 Author Share Posted August 31, 2017 thank you for your reply. but what the name of the hook can detect before sendin a model email named "invoice Created" ? 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Developer WHMCS Andrew Posted August 31, 2017 WHMCS Developer Share Posted August 31, 2017 EmailPreSend - https://developers.whmcs.com/hooks-reference/everything-else/#emailpresend - is the hook point you can use to customise email variables before send. Please be aware we do have searchable documentation available at http://developers.whmcs.com/ The smarty variables are not passed to this hook point. As brian stated, you could edit the email template and create your own output using the $invoice_items array 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted August 31, 2017 Share Posted August 31, 2017 out of curiosity, what are you trying to change within it? 0 Quote Link to comment Share on other sites More sharing options...
ouldfella Posted September 7, 2017 Author Share Posted September 7, 2017 Hi, thanks all for your reply, the content of this variable is : Sous-total: 12000.00 DZD19.00% TVA: 2280.00 DZD Crédit: 0.00 DZD Total: 14280.00 DZD as you can see the client asked me to modify the texte and i must place the word TVA at first like this : Sous-total: 12000.00 DZDTVA : 19.00%, 2280.00 DZD Crédit: 0.00 DZD Total: 14280.00 DZD 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted September 7, 2017 Share Posted September 7, 2017 nasty. what might work is... {$invoice_html_contents|replace:'19.00% TVA:':'TVA : 19.00%,'} ... though if the TVA rate ever changed from 19%, you'd have to modify the code. 0 Quote Link to comment Share on other sites More sharing options...
brizkand Posted November 6, 2019 Share Posted November 6, 2019 I also want to edit the $invoice_html_contents What I want is to remove the credit. This is the sample: Subtotal: ₱57,990.00 PHPCredit: ₱0.00 PHPTotal: ₱57,990.00 PHP What i want is: Subtotal: ₱57,990.00 PHPTotal: ₱57,990.00 PHP How can I do this? Thank you in advance. 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.