Jump to content

Support Desk - Dropdown with client domain choice

Recommended Posts

Hi Folks,


I'd like to know if anyone has made an edit to their helpdesk which would allow users to submit a support ticket, and in a dropdown menu allow them to pick what package the ticket is in association with?


I'm guessing an SQL call to match the client ID with the packages assigned to that client ID, then populate a dropdown based on that.


Anyone have any thoughts, or has anyone implemented such a thing?

Link to comment
Share on other sites

Well I've spent a while here today and I'm CLOSE but not finished. Anyone know how to finish it up? ;)


Here's what I got:


Made a seperate file called "domainlist.php" in the /whmcs directory


$con = mysql_connect("localhost","DB_user","DB_pass");
if (!$con)
 die('Could not connect: ' . mysql_error());

mysql_select_db("DB_NAME", $con);

$result = mysql_query("SELECT * FROM tblhosting WHERE userid=1");

 print "<select name=\"Domain\">";
while($row = mysql_fetch_array($result))
   print "<option value=\"" . $row['domain'] . "\">" . $row['domain'] . "</option>\n";

print "</select>";



Then in the supportticketsubmit-steptwo.tpl I have the following added in the table section:


<tr><td class="fieldarea">Domain Name:</td><td>

include ('/home/billing/public_html/domainlist.php');



So this DOES get the domain list, and whatnot - populates the dropdown, but I haven't yet been able to save the data into the helpdesk :(


I thought maybe a custom field that I could HIDE, but well there's no HIDE ability :( if I leave it as the fieldname "Domain" and make a custom field for "Domain" then a blank value gets stored.


Anyone got any ideas for the final part?

Link to comment
Share on other sites

I actually got sidetracked on a number of different issues here and was unable to compelete work on this type of integration.


The way that it's currently setup it it requires hard edits of the template file.


As far as the custom fields and hard coding them in rather than using the auto-generate - since some fields show up for some departments and some fields don't for others I'm having to generate lots of IF statements depending on department. Kinda getting messy :)

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