Order confirmation CSV template

Overview

This template is rendered to create a CSV spreadsheet for a single order which is attached to the confirmation email. It is only attached when the order is being emailed to either the manufacturer or the company, but not when the order is being sent directly to the customer.

If your office has an ERP or accounting system which is able to import CSV files, this can be a great and simple way of reducing the amount of data-entry work they have to do.

Template parameters

order (reference to SalesOrder)

lines (collection of SalesOrderLine)

The set of line items that should be included in this spreadsheet. Note that this might be a subset of the actual lines on this order, e.g. if you're emailing just a manufacturer-specific portion of this order. For that reason, you should always use this top-level lines variable instead of accessing the order.lines collection (which always includes all lines on the order).