Jump to content

How to display Dedicated IP in viewinvoice.tpl and invoicepdf.tpl


JacksonT

Recommended Posts

How to display Dedicated IP in viewinvoice.tpl and invoicepdf.tpf?

I try to use {php}{/php} to query out the product details but it doesn't work anymore.

i'm surprised {php} didn't work in the viewinvoice.tpl template - you'd need to enable the feature in general settings, but it should work... having said that, you shouldn't really be using {php} in templates nowadays. :idea:

 

Im guessing that you will need to have a custom hook created for this to work

only for viewinvoice.tpl, and as invoicepdf.tpl is basically a PHP file anyway and can't use hooks, you can add sql queries directly to the code.

 

for viewinvoice, they'd be a number of ways to do a hook... you could query tblinvoiceitems and join on tblhosting (which is the table that stores the dedicated IP value for that product), or as the template already knows the relid values, you could create an array of dedicatedIP values for that specific invoice and then query that in the template output.

 

for the pdf invoice, it's should be slightly easier as one option would be to query the database for the specific dedicatedIP value in the foreach loop.

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