Jump to content

Admin area templates for invoices.


jdsnty

Recommended Posts

Hello everyone!

I am trying to customize some Admin Area views to show some additional data. In particular, I want to customize the Edit Invoice view (admin/invoices.php?action=edit) and the Clients Invoices view (admin/clientsinvoices.php).

This was easy for certain views, like the Clients Summary, where I just had to edit the `clientssummary.tpl` Smarty template file at `admin/templates/blend/`, but the templates directory seems to only cover a handful views: there is no template file for the `invoices` view nor for the `clientsinvoices` view (despite the fact those views are clearly rendered with Smarty). I couldn't find a matching template in other directories either.

Is there a way to customize the 'template' used for those views?

Thanks in advance!

Link to comment
Share on other sites

14 hours ago, steven99 said:

If it isn't in a template already, then it has to be done via a admin area output hook and moved around with javascript. 

I ended up doing something similar, except I conditionally included the content (along with JS to move it to the desired place) inside the footer template instead of using an output hook. I reckon Steven's solution is more elegant, though (especially considering I still needed an AdminAreaPage hook in order to pass  some additional variables to Smarty).

For anyone facing a similar issue, bear in mind that you can get the name of the current view as the `$filename` variable in Smarty (for instance, you can check whether `$filename == 'clientsinvoices'` in order to display a block or run some JavaScript only when accessing the 'Clients Invoices' tab).

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