Jump to content

Modify Domain Table on Admin Customer Summary Screen with hook?


SoccerGuy3

Recommended Posts

Looking for a push in the right direction or someone to tell me that I am on the wrong track...

I would like to have the domains table on the admin client summary screen display the recurring amount charged in a new column. It is the only section on that page (dealing with goods/services) that doesn't have an amount column. Having it would be very helpful as we monitor accounts where hosting comes and goes, but sometimes the domain stays registered through us. We charge a different amount depending on whether you host with us or not.

My thought would be to use a hook to add this column to display the recurring amount. Can anyone perhaps give me some code to get me going? I am pretty handy with PHP, so can pick it up if I can figure out where to start!

Link to comment
Share on other sites

10 hours ago, SoccerGuy3 said:

My thought would be to use a hook to add this column to display the recurring amount.

the admin client summary page is one of the few pages in the admin area that used an editable Smarty template, so you have multiple options open to you if you want to change its content.

you could edit the clientsummary.tpl template, add your Amount column to the table, and then its just a case of modifying the $domainsummary array using an adminareapage hook - e.g looping through the array and querying the database (via capsule or models), getting the recurring amount and formatting it to the client's currency... that will give you a $domain.amount element to add to your new column output.

if you wanted to do it all by hook, then you're likely looking at adding the column and content via jQuery.

Link to comment
Share on other sites

The hook method is not a requirement, just my first thoughts after doing some research. I am familiar with editable template - I have done some editing already to make it easier to read (see attached). So adding the column to the layout/template is not an issue, it was just getting that $domain.amount part of the array. Thanks for the pointer on how to add it to the array, I will start researching that part.

 

 

Edited by WHMCS ChrisD
Removed duplicated screenshot with PII
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