Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About jdsnty

  • Rank
    Junior Member
  1. Lacking a native solution (as far as we could tell), we solved the issue by writing an InvoicePaid hook that checks whether any invoice items match an addon and whether that addon belongs to a suspended product with the telltale signs of having been suspended by an overdue addon (the right suspend message, a non-expired next due date, etc.). That method does work, although it's rather convoluted. Having a native way to revert the effects of a suspend parent product option would certainly be helpful.
  2. The Suspend Parent Product option makes it possible to suspend a hosting service when an associated addon is overdue. Is there a way to automatically unsuspend the parent product once the overdue invoices for the addon are paid?
  3. 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).
  4. 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!
  5. You might be able to use a hook to fetch the data you need and pass it to Smarty as custom variables. The ClientAreaPageProductDetails hook is probably the one you're looking for. https://developers.whmcs.com/hooks-reference/client-area-interface/
  6. The answer above should be enough for most cases, but you might want to set up the HTTP headers to mark the content as a JSON as well. Just adding header('Content-Type: application/json; charset=utf-8'); to your code before echoing the JSON object (as described in sentq's comment) should do the trick.
  • 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