You can use the following variables to show the list of used decoration processes in the Order Template.
- order.processes_used: the list of names of the decoration process used in the order, separated by a
comma. - order.processes_used_abbr: the list of abbreviations of the decoration process used in the order, separated by a comma.
Here is an example of how you can modify the default Order Template to show the list of decoration processes used in an order.
Default Code
<tr>
<th>Product</th>
<th>Color</th>
<th>Size / Qty</th>
<th class="text_right">Unit Price</th>
{% if order.use_extra_line_item_columns %}
{% if order.has_a_discount %}
<th class="text_right">Discount</th>
<th class="text_right">Disc Unit Price</th>
{% endif%}
{% if order.has_taxes_against_items %}
<th class="text_right">Tax</th>
{% endif %}
{% endif %}
<th class="text_right">Qty</th>
<th class="text_right">Total</th>
</tr>
</thead>
<tbody>
{% assign colspan = 5 %}
{% if order.use_extra_line_item_columns %}
{% if order.has_a_discount %}
{% assign colspan = colspan | plus:2%}
{% endif%}
{% if order.has_taxes_against_items %}
{% assign colspan = colspan | plus:1%}
{% endif %}
{% endif %}
{% assign row_count = 1 %}
{% for item in order.main_items %}
{% if (item.is_divider?) %}
<tr>
<td class="text_left divider" colspan="{{colspan | plus:2}}">{{ item.product_name }}</td>
</tr>
{% else %}
<tr>
<td class="text_left" {% unless item.has_sizes_or_colors? %} colspan="3" {% endunless %}>
{{ row_count }}.
{% if (item.supplier_product) and (item.is_not_freeform?) %}
{{ item.supplier_product.product_code }} -
{% endif %}
{{ item.product_name }}
{% if item.product_based? %}
<br />
{% else %}
{% if item.has_extra_options? %} : {% endif %}
{% endif %}
{{ item.extra_options}}
</td>
Custom Code
Add the code in red to the default code shown above as follows:
<tr>
<th>Product</th>
<th>Decoration Processes</th>
<th>Color</th>
<th>Size / Qty</th>
<th class="text_right">Unit Price</th>
{% if order.use_extra_line_item_columns %}
{% if order.has_a_discount %}
<th class="text_right">Discount</th>
<th class="text_right">Disc Unit Price</th>
{% endif%}
{% if order.has_taxes_against_items %}
<th class="text_right">Tax</th>
{% endif %}
{% endif %}
<th class="text_right">Qty</th>
<th class="text_right">Total</th>
</tr>
</thead>
<tbody>
{% assign colspan = 5 %}
{% if order.use_extra_line_item_columns %}
{% if order.has_a_discount %}
{% assign colspan = colspan | plus:2%}
{% endif%}
{% if order.has_taxes_against_items %}
{% assign colspan = colspan | plus:1%}
{% endif %}
{% endif %}
{% assign row_count = 1 %}
{% for item in order.main_items %}
{% if (item.is_divider?) %}
<tr>
<td class="text_left divider" colspan="{{colspan | plus:2}}">{{ item.product_name }}</td>
</tr>
{% else %}
<tr>
<td class="text_left" {% unless item.has_sizes_or_colors? %} colspan="3" {% endunless %}>
{{ row_count }}.
{% if (item.supplier_product) and (item.is_not_freeform?) %}
{{ item.supplier_product.product_code }} -
{% endif %}
{{ item.product_name }}
{% if item.product_based? %}
<br />
{% else %}
{% if item.has_extra_options? %} : {% endif %}
{% endif %}
{{ item.extra_options}}
</td>
<td class="text_left">{{ order.processes_used }}</td>
Comments
0 comments
Please sign in to leave a comment.