account/ticketDetail.template.html

Follow

Ticket detail shows detailed information about a particular ticket.

You can access the following references directly within ticketDetail.template.html. All these references are accessed via the ticket reference.

ticket (array)

The ticket reference is an array of references that can be accessed directly from ticket (array).

TermData TypeTypical OutputDescription
ticket.id int 4 The ticket id
ticket.status varchar Pending The current ticket status
ticket.link varchar mymessages.php?id=5 The link to the ticket details
ticket.priority varchar HIGH The link to the ticket details
ticket.subject varchar Unwanted item The subject line
ticket.assignee varchar Tue 11th June 2011, 13:45 The store assignee dealing with the ticket
ticket.date.created varchar Tue 11th June 2011, 13:45 The date the ticket was created
ticket.date.edited varchar Tue 11th June 2011, 13:45 The date the ticket was last updated
ticket.messages array   (See ticket.messages)

ticket.messages (array)

To access the contents ticket.messages, you will need to loop through the array. Each sub array contains the following references.

TermData TypeTypical OutputDescription
user.name varchar 4 The name of the user or customer that created the message
body varchar Message content… The message body
date varchar Tue 11th June 2011, 13:45 The formatted date the message was created

Usage

Usage:

   {% if ticket %}
        <h4>Info about this Ticket created on {{ ticket.date.created }} and updated on {{ ticket.date.updated }}</h4>
        <div class="greyContainer">
            <label>Subject</label><p>{{ ticket.subject|raw }}</p>
            <label>Status</label><p>{{ ticket.status|raw }}</p>
            <label>Priority</label><p>{{ ticket.priority|raw }}<p>
        </div>
        <h4>Send us a message about this return<h4>
                <form action="mymessages.php" method="post">
                    {{ form_field_seed|raw }}
                    <input id="return" name="action" value="reply" type="hidden" />
                    <input id="return" name="ticket_id" value="{{ ticket.id }}" type="hidden" />
                    <p><textarea id="message" name="message" style="width:400px; height: 200px" rows="15">Type your message here..</textarea></p>
                    <input id="submit" name="submit" value="Send Reply" type="submit" />
                </form>
                {% if ticket.messages %}
                <h4>You have the following messages relating to this order</h4>
                {% for message in ticket.messages %}
                <p class="greyContainer"><strong>{{ message.user.name }} wrote on {{ message.date }}</strong><br /><br />
                    {{ message.body }}</p><br />
                {% endfor %}
                {% endif %}
   {% endif %}
Have more questions? Submit a request

Comments

Powered by Zendesk