The order detail template shows a particular order in detail.
order.products (array)
The products reference allow you to display order products within the account/myOrdersOrderDetail.template.html . The products reference is a recursive array containing the following references within each sub array of products.
Term | Data Type | Typical Output | Description |
---|---|---|---|
remove_button | html | <button name=.. | HTML button to remove product line |
return_button | html | <button name=.. | HTML button to action a return for the product line |
stock | int | 7 | The quantity in stock for this product |
stock_due | varchar | 3-7 days | Text entry for stock due |
allocated | int | 7 | The quantity allocated from stock to this product |
qty | int | 7 | The quantity ordered for this product |
line_total | int | $5.33 | The formatted total for this product line excluding tax in the currency placed |
name | varchar | Product Name | The plain text name for this product |
code | varchar | 54DF-H | The product code |
returns | html | RMA1<br />RMA2… | A html list of returns for this product |
tax | varchar | 20 | Tax rate in percent |
id | int | 4 | The product id |
price_ex_tax | varchar | $5.00 | The price excluding tax formatted to the local currency |
price_inc_tax* | varchar | $5.90 | The price including tax formatted to the local currency |
* Not currently supported
Usage
<form name="order_products" method="post" action="myorders.php?action=update_products&order_id={{ order.id }}"> <table border="0" width="100%" cellspacing="2" cellpadding="2"> <tr> <td align="left"><b>Code</b></td> <td align="left"><b>Description</b></td> <td align="right"><b>Tax%</b></td> <td align="right"><b>Price</b></td> <td align="right"><b>Total</b></td> <td align="right"><b>Qty</b></td> <td align="right"><b>Allc</b></td> <!-- <td align="right"><b>Free</b></td> --> {% if order.is_editable == false and order.status.id == 7 %} <td align="right"><b>Actions</b></td> {% endif %} </tr> {% for product in order.products %} <tr> <td valign="top">{{ product.code }}</td> <td valign="top">{{ product.name }} {% if product.returns %} {% for return in product.returns %} <br />{{ return.html|raw }} {% endfor %} {% endif %} </td> <td align="right" valign="top"><b>{{ product.tax|raw }}</b></td> <td align="right" valign="top">{{ product.price_ex_tax|raw }}</td> <td align="right" valign="top"><b>{{ product.line_total|raw }}</b></td> {% if order.is_editable and order.customer_can_edit %} <td align="right" valign="top"><input type="hidden" name="old_qty[{{ product.id }}]" value="{{ product.qty }}"><b><input type="text" name="qty[{{ product.id }}]" value="{{ product.qty }}" size="3" /></b></td> <td align="right" valign="top">{{ product.allocated }}</td> {% else %} <td align="right" valign="top">{{ product.qty }}</td> <td align="right" valign="top">{{ product.allocated }}</td> {% endif %} <!-- <td valign="top" align="right">{{ product.stock }}</td> --> {% if order.is_editable and order.customer_can_edit %} <td align="right" valign="top"><b>{{ order.delete_button|raw }}</b></td> {% elseif order.is_editable == false and order.status.id == 7 %} <td align="right" >{{ product.return_button|raw }}</td> {% else %} <td align="right" > </td> {% endif %} </tr> {% endfor %} </table> </form>
order.tickets (array)
The order.tickets reference allow you to display tickets for the associated order within the account/myOrdersOrderDetail.template.html. The order.tickets reference is a recursive array containing the following references within each sub array of order.tickets.
Term | Data Type | Typical Output | Description |
---|---|---|---|
id | int | 4 | The ticket id |
link | varchar | Pending | The link to the ticket details |
subject | varchar | Unwanted item | The subject line |
assignee | varchar | Tue 11th June 2011, 13:45 | The store assignee dealing with the ticket |
date.created | varchar | Tue 11th June 2011, 13:45 | The date the ticket was created |
date.edited | varchar | Tue 11th June 2011, 13:45 | The date the ticket was last updated |
Usage
{% if order.tickets %} <table cellspacing="0" cellpadding="0" id="productList"> <thead> <tr> <th width="50" height="20" class="main"><b>Ticket ID</b></th> <th width="50" height="20" class="main"><b>Status</b></th> <th width="200" height="20" class="main"><b>Subject</b></th> <th width="75" height="20" class="main"><b>Staff Member</b></th> <th width="75" height="20" class="main"><b>Date Created</b></th> <th width="75" height="20" class="main"><b>Date Updated</b></th> <th width="50" height="20" class="main"><b>Msg</b></th> <th width="50" height="20" class="main"><b>Priority</b></th> </tr> </thead> <tbody> {% for ticket in order.tickets %} <tr> <td width="50" height="20" class="main"><span class="productName"><a href="{{ ticket.link }}">{{ ticket.id }}</a></span></td>' . "\n" . <td width="50" height="20" class="main">{{ ticket.link }}</td> <td width="200" height="20" class="main"><span class="productName"><a href="{{ ticket.link }}">{{ ticket.subject }}</a></span></td>' . "\n" . <td width="75" height="20" class="main">{{ ticket.assignee }}</td> <td width="75" height="20" class="main">{{ ticket.date.created }}</td> <td width="75" height="20" class="main">{{ ticket.date.edited }}</td> <td width="50" height="20" class="main">{{ ticket.body }}</td> <td width="50" height="20" class="main">{{ ticket.priority }}</td> </tr> {% endfor %} </tbody> </table> {% else %} <p> You currently have (0) Tickets to display. <a href="mailto:{{ email.support }}?subject=Question relating to [Order Number #{{ order.id }}]&body=Type your question here">Open a new Ticket here</a></p> {% endif %}
order.parcels (array)
The order.parcels reference allow you to display parcels for the order within the account/myOrdersOrderDetail.template.html. The order.parcels reference is a recursive array containing the following references within each sub array of order.parcels.
Term | Data Type | Typical Output | Description |
---|---|---|---|
id | int | 4 | The parcel id |
courier.name | varchar | Pending | The courier name |
courier.id | varchar | 5 | The courier id |
courier.tracking | varchar | http://trackingurl.com/t= | The tracking url of the courier |
consignment_no | varchar | F378493874832 | The consigment / tracking id |
date | varchar | Tue 11th June 2011, 13:45 | The date the parcel was shipped |
Usage
{% if order.status.id == 7 %} <h4>Here's a summary of the parcels we have sent you</h4> {% for parcel in order.parcels %} <p class="greyContainer"> <b>Parcel {{ parcel.id }}</b> was shipped using <b>{{ parcel.courier.name }}</b> with consignment number <a href="ajaxPhp/phpServer.php?action=doTracking&courierId={{ parcel.courier.id }}&trackingId={{ parcel.consignment_no }}" class="menuPopup" title="Tracking for Consignment {{ parcel.consignment_no }}"><b>{{ parcel.consignment_no }}</b></a> on {{ parcel.date }}. <br /> </p> {% endfor %} {% endif %}
order.status_history (array)
The order.status_history reference allow you to display the order status history for the order within the account/myOrdersOrderDetail.template.html. The order.status_history reference is a recursive array containing the following references within each sub array of order.status_history.
Term | Data Type | Typical Output | Description |
---|---|---|---|
name | varchar | Customer | The customer name or admin name that initiated the status change |
status | varchar | Pending | The status name |
date | varchar | Tue 11th June 2011, 13:45 | The date the status change was made |
Comments
0 comments
Please sign in to leave a comment.