How do I pass admin module data to Smarty in WHMCS? -


i pass data whmcs admin module client summary admin template. in order data our admin module smarty template, have been attempting use action hook called "adminareapage". action hook supposed take array of variables (returned in action hook) , make them accessible smarty variables.

the issue having none of variables return in action hook seem accessible template (clientssummary.tpl). have tried listing available smarty variables {debug} several other methods, none of our custom variables displayed (the other template variables listed). basis our action hook taken directly whmcs documentation example: http://docs.whmcs.com/hooks:adminareapage

the action hook running on each page load, able echo text directly page. not able access data passed smarty, however, or not passing correctly. here example code similar using in our action hook, (nearly unmodified whmcs example code):

function module_hook_test($vars) {     $return = array();     $return = array("field1" => "value1", "field2" => "value2");     return $return; } add_hook("adminareapage",1,"module_hook_test"); 

(with "module" being replaced our actual module name)

any assistance action hook, or alternate recommended method of passing data, appreciated. thank you.

i submitted ticket whmcs support. have believe issue may due bug in whmcs , said developers address issue in future release. in mean time, suggested querying data directly template using {php}{/php} tags. work fine temporary workaround.


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -