Hi,
Just want to share how I add the custom text fields to tickets v1.7.3 and I found instruction from this web site http://www.tmib.net/adding-custom-text-fields-tickets(http://www.tmib.net/adding-custom-text-fields-tickets) but not for v1.7.3. I mod it and working for me, I still looking for search ability for the phone number and custom text fields, if you know how to make it working, Please let me know, thank you.
Eric
1. add to database
ALTER TABLE `DATABASENAME`.`ost_ticket` ADD COLUMN `orderNumber` VARCHAR(255) AFTER `updated`;
2. Modifying the shared files
=================================
edit /include/class.mailfetch.php
in function createTicket($mid)
line 453 add:
$vars="WEB"; // set default orderNumber from emails
Edit /include/class.ticket.php
at line 87 add
$this->orderNumber = $this->ht;
line 178 add
function getOrderNumber() {
return $this->ht;
}
at about line 299
locate function getUpdateInfo()
in the info=array after email add
'agency' => $this->getOrderNumber(),
line 1652 add
$fields = array('type'=>'string', 'required'=>1, 'error'=>'Order Number required');
line 1697 remove the ; from the end of the line, and add the following on the next line:
.' ,orderNumber='.db_input($vars);
line 1925 add
$fields = array('type'=>'string', 'required'=>1, 'error'=>'Order Number required');
at line 2032 remove the ; from the end of the line, and add the following on the next line:
.' ,orderNumber='.db_input($vars);
2. Modifying the Client Side
=========================
Edit /include/client/open.inc.php
at line 45 insert the following:
start orderNumber
Order Number:
">
* <?php echo $errors; ?>
end orderNumber
edit /include/client/view.inc.php
add a new blank line at the end of line 35
at line 36 add:
on line 52 add:
Order Number:
<?php echo Format:($ticket->getOrderNumber()); ?>
3. Modifying the Staff Side
========================
edit /include/staff/ticket-edit.inc.php
at line 43 (after the close tr from email)
Order Number:
">
* <?php echo $errors; ?>
edit /include/staff/ticket-open.inc.php
at line 38 add:
Order Number
">
∓nbs;* <?php echo $errors; ?>
edit /include/staff/ticket-view.inc.php
at line 142 add:
at line 180 add:
Order Number:
<?php echo Format:($ticket->getOrderNumber()); ?>
Add print rorder#
edit /include/class.pdf.php
at line 149 add:
$this->Cell($w, 7,'order #'.$ticket->getOrderNumber(), 0, 0, 'L');