Jump to content

Display Product Group Name in PDF Invoice


Recommended Posts

Hi all - needing a little help.

How can I add the product group name to the description area in the following: viewinvoice.tpl and invoicepdf.tpl?

 

I also need to do the exact same thing in one of my email templates but not sure what to add to call in the product group name. Any thoughts?

 

Thanks in advance

Link to comment
Share on other sites

Hi all - needing a little help.

How can I add the product group name to the description area in the following: viewinvoice.tpl and invoicepdf.tpl?

the problem you will find is that the product group value isn't passed to either of the above invoice pages - so you would either have to use a hook to add the group name to the invoice description database table entry automatically, or modify the two templates to do this - either by querying the database or based on a series of {if} statements.

 

there is a quick example of using {if} statements in the post below..

 

http://forum.whmcs.com/showthread.php?38872-Show-Product-Description-on-Invoice-Item&p=376746#post376746

 

someone has previously written a hook to add group names to new invoices - it's available from the thread below...

 

http://forum.whmcs.com/showthread.php?32657-Product-Group-in-Invoice-Item-Description

 

it's four years old, but I suspect it would probably still work - however, it uses the "InvoiceCreationPreEmail" hook which is currently broken in v5.3.7 :roll:

 

so to find out if it does work, you'll either have to use a whmcs version before v5.3.7 or wait for v5.3.8 - which I assume will be released sometime this month or next.

 

I also need to do the exact same thing in one of my email templates but not sure what to add to call in the product group name. Any thoughts?

I don't think it's one of the listed variables available to the email templates, so if you are unable to rewrite the description field using the above hook, you might need to use {if} statements in the email template to add certain text based on your products.

Link to comment
Share on other sites

Yikes - was hoping I just overlooked something and there was an easy solution. Seems like this would have been requested before and needed? Can't believe the value isn't passed, but I guess they have good reason?

 

Anyways thanks for the reply - I'll give it a go!

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