I am trying to display the Ticket Code that is assigned to a ticket, to appear in the My Tickets list in the Tickets Dashboard, so users/staff can quickly see by the ticket number without having to go to view tickets or searching.
So far I have been able to code in the extra column for the header and have been able to display the corresponding tickets ID, but I just cant seem to get the actual ticket code to display
Below is the code which I have added to the default.php in my template over ride located at html/com_rsticketspro/dashboard/default.php.
Create Column header
<!-- Adds new column to header row -->
<td nowrap="nowrap"><strong><?php echo JHTML::image('components/com_rsticketspro/assets/images/smallicon1.gif', '', 'class="rsticketspro_smallicon"'); ?><?php echo JText::_('TICKET_NUMBER'); ?></strong></td>
Create data field
<!-- Adds new column for Ticket Number -->
<?php if ($this->params->get('show_code', 1)) { ?>
<td>
<a href="<?php echo RSTicketsProHelper::route('index.php?option=com_rsticketspro&view=ticket&cid='.$ticket->id.':'.JFilterOutput::stringURLSafe($ticket->subject)); ?>"><?php echo $ticket->id; ?></a>
</td>
<?php } ?>
In the second piece of code, you can see the use of <?php echo $ticket->id; ?> to pull the ticket ID number in, this works, but I can't find a way to get to the tickets code.
In html/com_rsticketspro/ticket/default_info.php which displays the Ticket Information page, there is code:
<?php echo $this->row->code; ?>
but adding
<?php echo $ticket->code; ?>
does not work and I just can't work out how to do this.
Would anyone have any ideas of advise?
Many thanks.
Simon