handsonwebhosting Posted January 22, 2008 Share Posted January 22, 2008 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? 0 Quote Link to comment Share on other sites More sharing options...
DigitalEnigma Posted January 22, 2008 Share Posted January 22, 2008 Hi, I woudl also be interested in this, I had just come to post the same question. 0 Quote Link to comment Share on other sites More sharing options...
ganesh.rao Posted January 23, 2008 Share Posted January 23, 2008 ...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.... Yup, exactly. I asked Matt about it and he suggest this way. I am also getting custom field data this way. -- Ganesh 0 Quote Link to comment Share on other sites More sharing options...
handsonwebhosting Posted January 23, 2008 Author Share Posted January 23, 2008 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 <?php $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>"; mysql_close($con); ?> Then in the supportticketsubmit-steptwo.tpl I have the following added in the table section: <tr><td class="fieldarea">Domain Name:</td><td> {php} include ('/home/billing/public_html/domainlist.php'); {/php} </td></tr> 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? 0 Quote Link to comment Share on other sites More sharing options...
AMateos Posted January 23, 2008 Share Posted January 23, 2008 Hi, im very interested in this, thank you for your work. 0 Quote Link to comment Share on other sites More sharing options...
fwebs Posted January 23, 2008 Share Posted January 23, 2008 Hi connor, i guess there is no column available to store the info in and as the admin files are encoded its impossible to add / edit anything to the forms 0 Quote Link to comment Share on other sites More sharing options...
DigitalEnigma Posted January 23, 2008 Share Posted January 23, 2008 Hi, Does it work ok if you add the custom field in the admin side but remove the code form the template to generate the custom fields and then hard code you custom field (this code) in its place? 0 Quote Link to comment Share on other sites More sharing options...
handsonwebhosting Posted January 23, 2008 Author Share Posted January 23, 2008 Hi Neil, That's a thought! Let me play with that this afternoon and get an update! See I knew there was a reason I posted what I had 0 Quote Link to comment Share on other sites More sharing options...
AMateos Posted January 31, 2008 Share Posted January 31, 2008 Hi, is it possible to make a "module" about this for WHMCS, we haven't programming knowledge and we are very interested to use this module. 0 Quote Link to comment Share on other sites More sharing options...
handsonwebhosting Posted January 31, 2008 Author Share Posted January 31, 2008 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 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.