Changing priority values

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
vibrancy
Posts: 2
Joined: Fri Jul 06, 2007 10:53 pm

Changing priority values

Post by vibrancy »

Script URL: www.prodjparty.com/ssl
Version of script: .94
Hosting company: Yahoo
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution: Change Priority - Priority - Custom fields

Write your message below:

I currently am making a lot of modifications to Hesk and have everything almost complete, the one thing that is stumping me is I am needing to change the priority values... What I am needing it to do is instead of giving a priority of High- Med- Low I need it to read "Visa, MasterCard.. etc" which I already have done, the drop down menu now reads correctly... the problem is when I submit the form and check it in the admin side, the Credit Card type field is blank.. Basically what I have done is changed all the wording from Priority to Credit Card type in the lang file, it is just a big hack job... heres the code I changed in index.php

Code: Select all

<td align="right" width="150"><?php echo $hesklang['priority']; ?>:<font class="important">*</font></td>
<td align="left" width="600"><select name="priority">
  <option value="1" <?php if($_SESSION['c_priority']==1) {echo 'selected';} ?>>Visa</option>
  <option value="2" <?php if($_SESSION['c_priority']==2) {echo 'selected';} ?>>MasterCard</option>
  <option value="3" <?php if($_SESSION['c_priority']==3) {echo 'selected';} ?>>American Express</option> 
  <option value="4" <?php if($_SESSION['c_priority']==4) {echo 'selected';} ?>>Discover</option> 
</select>
And this is what I changed in admin_ticket.php:

Code: Select all

<td class="white">'.$hesklang['priority'].': </td>
<td class="white">';
        if ($ticket['priority']==1) {echo '<font class="medium">'.$hesklang['Visa'].'</font>';}
        elseif ($ticket['priority']==2) {echo '<font class="medium">'.$hesklang['MasterCard'].'</font>';}
		elseif ($ticket['priority']==3) {echo '<font class="medium">'.$hesklang['AmericanExpress'].'</font>';}
		elseif ($ticket['priority']==4) {echo '<font class="medium">'.$hesklang['Discover'].'</font>';}
        else {echo $hesklang['low'];}
What am I missing? it is passing the information to the DB correct, and I added the extra "4" value to the DB, and it is posting it to the DB fine, but when I view the submitted ticket as admin or the client, the credit card type comes up blank... Any information would be greatly appreciated!
vibrancy
Posts: 2
Joined: Fri Jul 06, 2007 10:53 pm

Post by vibrancy »

Oops I got it - had to change this in index.php:

Code: Select all

<td align="right" width="150"><?php echo $hesklang['priority']; ?>:<font class="important">*</font></td>
<td align="left" width="600"><select name="priority">
  <option value="1" <?php if($_SESSION['c_priority']==1) {echo 'selected';} ?>>Visa</option>
  <option value="2" <?php if($_SESSION['c_priority']==2) {echo 'selected';} ?>>MasterCard</option>
  <option value="3" <?php if($_SESSION['c_priority']==3) {echo 'selected';} ?>>American Express</option>
  <option value="4" <?php if($_SESSION['c_priority']==4) {echo 'selected';} ?>>Discover</option>
</select>
To this:

Code: Select all

<td align="right" width="150"><?php echo $hesklang['priority']; ?>:<font class="important">*</font></td>
<td align="left" width="600"><select name="priority">
  <option value="1" <?php if($_SESSION['c_priority']==1) {echo 'selected';} ?>><?php echo $hesklang['Visa']; ?></option>
  <option value="2" <?php if($_SESSION['c_priority']==2) {echo 'selected';} ?>><?php echo $hesklang['MasterCard']; ?></option>
  <option value="3" <?php if($_SESSION['c_priority']==3) {echo 'selected';} ?>><?php echo $hesklang['AmericanExpress']; ?></option> 
  <option value="4" <?php if($_SESSION['c_priority']==4) {echo 'selected';} ?>><?php echo $hesklang['Discover']; ?></option> 
</select>
Guess I had to keep the reference to the lang file =P
3cwired_com
Posts: 20
Joined: Wed Jul 04, 2007 9:49 am

Post by 3cwired_com »

I didnt get a chance to check ur code, or implementation, but do you have your statuses set up where it is not dependent anymore upon the messaging system? because this was the next hack i was planning on doing in my system.

this and then a clickable tracking # field, and a payment field which would auto populate a paypal payment screen depending on the amount owed in each ticket's screen.

Great Work!
Behind every great fortune lies a crime.
[url]http://www.3cwired.com[/url] - Web Design/SEO/Repair/Sales/Upgrades
[url]http://www.galants.org[/url] - The Home for Galant Enthusiasts
[url]http://www.locatemyip.com[/url] - More than just free IP displays
Duckz
Posts: 7
Joined: Sun Sep 02, 2007 9:49 pm

Post by Duckz »

Hi there

I have tried to do the same thing, but with initials instead of credit cards. I think I have followed all the above instructions but my Priority dropdown box now has no text in it. I can cursor up and down in it so the text must be there, I just can't see it.

Does anybody have any ideas where I might have gone wrong?

Many Thanks

Lee
Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

@vibrancy: a bit late, but you need to change values for priorities also in ticket.php and admin_ticket.php

@Duckz: can't help unless you past the code you edited here
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
jefseb
Posts: 1
Joined: Mon Aug 25, 2008 7:59 pm

Close but...

Post by jefseb »

I've included all the code in all the spots listed above, but the admin page will not list any than the original High, Medium , Low and admin_ticket.php and ticket.php only list the new priorities as "Other"

Here is how i changed the code in those 2 locations:
<td class="white">'.$hesklang['priority'].': </td>
<td class="white">';
if ($ticket['priority']==1) {echo '<font class="medium">'.$hesklang['Desktop'].'</font>';}
elseif ($ticket['priority']==2) {echo '<font class="medium">'.$hesklang['Laptop'].'</font>';}
elseif ($ticket['priority']==3) {echo '<font class="medium">'.$hesklang['Email'].'</font>';}
elseif ($ticket['priority']==4) {echo '<font class="medium">'.$hesklang['User'].'</font>';}
elseif ($ticket['priority']==5) {echo '<font class="medium">'.$hesklang['Printer'].'</font>';}
elseif ($ticket['priority']==6) {echo '<font class="medium">'.$hesklang['Wireless'].'</font>';}
elseif ($ticket['priority']==7) {echo '<font class="medium">'.$hesklang['Network'].'</font>';}
elseif ($ticket['priority']==8) {echo '<font class="medium">'.$hesklang['Virus'].'</font>';}
elseif ($ticket['priority']==9) {echo '<font class="medium">'.$hesklang['Phone'].'</font>';}
elseif ($ticket['priority']==10) {echo '<font class="medium">'.$hesklang['Office'].'</font>';}
elseif ($ticket['priority']==11) {echo '<font class="medium">'.$hesklang['iCampus'].'</font>';}
elseif ($ticket['priority']==12) {echo '<font class="medium">'.$hesklang['Follett'].'</font>';}
elseif ($ticket['priority']==13) {echo '<font class="medium">'.$hesklang['AR'].'</font>';}
elseif ($ticket['priority']==14) {echo '<font class="medium">'.$hesklang['R180'].'</font>';}
elseif ($ticket['priority']==15) {echo '<font class="medium">'.$hesklang['Riverdeep'].'</font>';}
elseif ($ticket['priority']==16) {echo '<font class="medium">'.$hesklang['RP'].'</font>';}
elseif ($ticket['priority']==17) {echo '<font class="medium">'.$hesklang['Lunch'].'</font>';}
else {echo $hesklang['Other'];}
echo '</td>
</td>
Post Reply