SethMcCauley Posted May 14, 2015 Share Posted May 14, 2015 I would like to pass some data from an admin module to the client summary admin template. In order to get the data from our admin module to the Smarty template, we have been attempting to use the "AdminAreaPage" action hook. This action hook is supposed to take an array of variables (returned in the action hook) and make them accessible as Smarty variables. The issue I am having is that none of the variables we return seem to be accessible to the template (clientssummary.tpl). I have tried listing all available Smarty variables with {debug} as well as several other methods, but none of our custom variables are displayed (the other template variables are successfully listed). The basis for our action hook is taken directly from the WHMCS documentation example: http://docs.whmcs.com/Hooks:AdminAreaPage The action hook is running on each page load, as we are able to echo text directly to the page. We are not able to access any data passed to Smarty, however, or we are not passing it correctly. Here is some example code similar to what we are using in our action hook, (unmodified from the 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 with our actual module name) Any assistance with this action hook, or an alternate recommended method of passing the data, would be greatly appreciated. Thank you. 0 Quote Link to comment Share on other sites More sharing options...
SethMcCauley Posted May 15, 2015 Author Share Posted May 15, 2015 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. 0 Quote Link to comment Share on other sites More sharing options...
bellafronte Posted January 5, 2016 Share Posted January 5, 2016 This Bug is fixed? 0 Quote Link to comment Share on other sites More sharing options...
yarantoos Posted April 4, 2016 Share Posted April 4, 2016 Please update . 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.