Jump to content

Send Email Invoice - For Each Loop?


Recommended Posts

Hi Everyone,

 

I'm using WHMCS v. 5.0.3 and I've been able to create an HTML email template to email the invoice directly to people as HTML in the email message. I'm having a bit of a problem I'm hoping you can help me with.

 

I've got this code in my template:

 

{foreach key=num item=invoiceitem from=$invoice_items}                  
<tr>
    <td>{$invoiceitem.description}</td>
    <td>{$invoiceitem.amount}</td>
</tr>
{/foreach}

 

It sort of works but only shows the last item of the invoice, the late fee.

 

Any ideas on how to make it work to show ALL items from the invoice?

 

I found this post and modified my code to match but it doesn't work either:

http://forum.whmcs.com/showthread.php?t=23949&highlight=%7Bforeach+item%3Dinvoiceitem+from%3D%24invoice_items%7D+email+invoice

 

Thanks!

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