Jump to content

Custom PHP Logic in clientsummary.tpl


yarantoos

Recommended Posts

Please test this code :

 

function hook_my_clsum2($vars)
{	
$return = array();
$return = array("field1" => "value1", "field2" => "value2");
return $return;
}

add_hook('AdminAreaPage', 1, 'hook_my_clsum2');

 

 

You will see field1 and field2 is not set in clientsummary.tpl

Link to comment
Share on other sites

I may misunderstod your request, what exatly do you need to do there?

 

If you need to pass Smarty Tags/Variables to that page, which will need manual modification in clientsummary.tpl file, use:

http://docs.whmcs.com/Hooks:AdminAreaPage

 

But if you need to display HTML code directly, use the ActionHook below:

http://docs.whmcs.com/Hooks:AdminAreaClientSummaryPage

Link to comment
Share on other sites

actually it does not work for me too, very strange maybe you need to report it to WHMCS as a bug.

test was done in WHMCS v6.2.0

confirmed not working in v6.2.2

 

interestingly, the following was posted in May 2015...

 

http://forum.whmcs.com/showthread.php?100886-Passing-admin-module-data-to-Smarty&p=418590#post418590

 

I submitted a ticket to WHMCS support. They have believe the issue may be due to a bug in WHMCS and said that the developers will address the issue in a future release. In the mean time, they suggested querying the data directly from the template using {php}{/php} tags. This will work fine for us as a temporary workaround.

so it's apparently been known as a bug for at least ten months... :roll:

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