Jump to content

using the API in the template files


Recommended Posts

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?

Link to comment
Share on other sites

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.

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.

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