northfork Posted July 6, 2014 Share Posted July 6, 2014 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 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted July 7, 2014 Share Posted July 7, 2014 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 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. 0 Quote Link to comment Share on other sites More sharing options...
northfork Posted July 8, 2014 Author Share Posted July 8, 2014 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! 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Ryan Posted July 8, 2014 Share Posted July 8, 2014 Hello northfork, Could you please share with the forum if this solution did work for you so if other users have a similar problem find this thread they will know that this is worth the time and effort to do. --Thanks 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.