Jump to content

Product/Service Related merge fields in an Invoice email template


Recommended Posts

Hi All,

Our billing team would find it very helpful to have some Product/Service Related merge fields available in some invoice templates (Invoice created, First, Second & Third invoice overdue notice).

After some testing and head scratching I realised some merge fields are not available in certain templates. Product/Service Related merge fields are not available in Invoice templates, is there any possible way to include say $service_id in an invoice template?

Thank you in advance for any help,

Link to comment
Share on other sites

  • 2 weeks later...

UPDATE: Finally...

There appears to be a $relid data item available within the $invoice_items array that can be used to display service ID with 'Invoice' related email templates in WHMCS, since {$service_id} tag is only available in 'Product/Service' email templates.

Code below if anyone needs it, though I am still unsure how to print a complete list of items available within the $invoice_items array. I tried adding {debug} to an email template and sending the message but nothing displayed in the email.

{if $invoice_items}
    {foreach from=$invoice_items item=data}
        Service Subscription ID: {$data.relid}
    {/foreach}
{/if}

Hope this helps somebody!

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