Jump to content

modify variable in model email


ouldfella

Recommended Posts

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.

Link to comment
Share on other sites

  • WHMCS Developer

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

Link to comment
Share on other sites

Hi,

thanks all for your reply,

the content of this variable is :

Sous-total: 12000.00 DZD

19.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 DZD

TVA : 19.00%, 2280.00 DZD

Crédit: 0.00 DZD

Total: 14280.00 DZD

Link to comment
Share on other sites

  • 2 years later...

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 PHP
Credit: ₱0.00 PHP
Total: ₱57,990.00 PHP

What i want is:

Subtotal: ₱57,990.00 PHP
Total: ₱57,990.00 PHP

How can I do this? Thank you in advance.

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