seancon1 Posted June 11, 2012 Share Posted June 11, 2012 based on this documentation http://docs.whmcs.com/API:Internal_API when accessing the API from tpl files do i use the example and replace the PHP tags with {php}{/php} or is there a better way? thank you for any advice Sean 0 Quote Link to comment Share on other sites More sharing options...
laszlof Posted June 11, 2012 Share Posted June 11, 2012 Ideally you shouldnt really use the {php} tags.. What exactly are you trying to do? 0 Quote Link to comment Share on other sites More sharing options...
seancon1 Posted June 11, 2012 Author Share Posted June 11, 2012 in short i want to give customers that belong to a Client Group the ability to fill out a form with specific information and have the API open a ticket with this information. i am aware of the custom fields but i dont see a way to restrict the ability to access the form or department by client groups the only option i see is to hide it. i have added a custom page and it is only accessible by clients from a specific group and this is where i would like to add the form. i initially was going to have the form send an email to the support address but when i saw the open ticket API could be used from within the template i thought this may be a better idea. if i want to access the API from the template and {php} is not the ideal way to go then what is the right way? 0 Quote Link to comment Share on other sites More sharing options...
seancon1 Posted June 11, 2012 Author Share Posted June 11, 2012 i think the WHMCS Allowed Departments module will solve my problem, but i would like to know the proper way to access the API from the template. 0 Quote Link to comment Share on other sites More sharing options...
laszlof Posted June 13, 2012 Share Posted June 13, 2012 You shouldnt use the API in the templates at all. If you're building this from a custom page, the API code belongs within the PHP file, not the template. If you need to do this from the support page, you can simply modify the template to check the client group and display the support department based on that. This can all be accomplished with smarty, no need to use PHP at all. 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.