How to Show Separate Blank Product and Decoration Prices in the Order Template
The default Order Template only shows the combined blank item and decoration price of a product for each line item.

If you want to show a breakdown of the combined price into separate blank product and decoration prices, you can use the item.decoration_unit_price and item.decoration_price variables.
item.decoration_unit_price shows the decoration price for a single product in a line item.
item.decoration_price shows the total decoration price for a line item.
To show the blank product price for a single product in a line item, use the following code:
item.currency_unit_price | minus:item.decoration_unit_price
To show the total blank product price for a line item, use the following code:
item.currency_full_price | minus:item.decoration_price
(Note, the total blank produce price includes tax if taxes are applicable).
Custom Code Example
Here is an example of how you can modify the default Order Template to show the blank product unit price, decoration unit price, blank product total price and decoration total price:
Default Code
Code to be modified highlighted in red:
<table class="hundred">
<thead>
<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 %}
<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>
{% if item.has_sizes_or_colors? %}
{% if (item.is_freeform?) %}
<td class="text_left">{{ item.free_form_color }}</td>
{% else %}
<td class="text_left">{{ item.color_names }}</td>
{% endif %}
{% if item.free_form_size %}
<td class="text_left">{{ item.free_form_size }}</td>
{% else %}
<td class="text_left">{{ item.sizes }}</td>
{% endif %}
{% endif %}
<td class="text_right">{{ item.currency_unit_price | simple_price_format }}</td>
{% if order.use_extra_line_item_columns %}
{% if order.has_a_discount %}
<td class="text_right">
{{ item.discount_percent }}%
</td>
<td class="text_right">
{{ item.currency_disc_unit_price | simple_price_format }}
</td>
{% endif %}
{% if order.has_taxes_against_items %}
<td class="text_right">{{ item.unit_tax | simple_price_format }}</td>
{% endif %}
{% endif %}
<td class="text_right">{{ item.qty }}</td>
<td class="text_right qty">{{ item.currency_full_price | simple_price_format }}</td>
</tr>
{% assign row_count = row_count | plus:1 %}
{% endfor %}
</tbody>
<tfoot>
<tr class="total">
<td colspan="{{colspan}}" class="text_right">Subtotal</td>
<td colspan="2" class="text_right">{{ order.main_item_price | simple_price_format }}</td>
</tr>
</tfoot>
</table>
Custom Code
Modified code highlighted in red:
<table class="hundred">
<thead>
<tr>
<th>Product</th>
<th>Color</th>
<th>Size / Qty</th>
<th class="text_right">Blank Product Unit Price</th>
<th class="text_right">Decoration 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">Unit Tax</th>
{% endif %}
{% endif %}
<th class="text_right">Qty</th>
<th class="text_right">Blank Product Total</th>
<th class="text_right">Decoration Total</th>
<th class="text_right">Total</th>
</tr>
</thead>
<tbody>
{% assign colspan = 8 %}
{% 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 %}
<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>
{% if item.has_sizes_or_colors? %}
{% if (item.is_freeform?) %}
<td class="text_left">{{ item.free_form_color }}</td>
{% else %}
<td class="text_left">{{ item.color_names }}</td>
{% endif %}
{% if item.free_form_size %}
<td class="text_left">{{ item.free_form_size }}</td>
{% else %}
<td class="text_left">{{ item.sizes }}</td>
{% endif %}
{% endif %}
<td class="text_right">{{ item.currency_unit_price | minus:item.decoration_unit_price | simple_price_format }}</td>
<td class="text_right">{{ item.decoration_unit_price | simple_price_format }}</td>
{% if order.use_extra_line_item_columns %}
{% if order.has_a_discount %}
<td class="text_right">
{{ item.discount_percent }}%
</td>
<td class="text_right">
{{ item.currency_disc_unit_price | simple_price_format }}
</td>
{% endif %}
{% if order.has_taxes_against_items %}
<td class="text_right">{{ item.unit_tax | simple_price_format }}</td>
{% endif %}
{% endif %}
<td class="text_right">{{ item.qty }}</td>
<td class="text_right qty">{{ item.currency_full_price | minus:item.decoration_price | simple_price_format }}</td>
<td class="text_right qty">{{ item.decoration_price | simple_price_format }}</td>
<td class="text_right qty">{{ item.currency_full_price | simple_price_format }}</td>
</tr>
{% assign row_count = row_count | plus:1 %}
{% endfor %}
</tbody>
<tfoot>
<tr class="total">
<td colspan="{{colspan}}" class="text_right">Subtotal</td>
<td colspan="2" class="text_right">{{ order.main_item_price | simple_price_format }}</td>
</tr>
</tfoot>
</table>
Result

How to Show Line Total Excluding Tax in the Order Template
The default Order Template shows tax included in the total for each line item.

If you want to show the line total without tax included, you can use the item.currency_price variable.
Custom Code Example
Here is an example of how you can modify the default Order Template to show the line total without tax:
Default Code
Code to be modified highlighted in red:
<table class="hundred">
<thead>
<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 %}
<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>
{% if item.has_sizes_or_colors? %}
{% if (item.is_freeform?) %}
<td class="text_left">{{ item.free_form_color }}</td>
{% else %}
<td class="text_left">{{ item.color_names }}</td>
{% endif %}
{% if item.free_form_size %}
<td class="text_left">{{ item.free_form_size }}</td>
{% else %}
<td class="text_left">{{ item.sizes }}</td>
{% endif %}
{% endif %}
<td class="text_right">{{ item.currency_unit_price | simple_price_format }}</td>
{% if order.use_extra_line_item_columns %}
{% if order.has_a_discount %}
<td class="text_right">
{{ item.discount_percent }}%
</td>
<td class="text_right">{{ item.currency_disc_unit_price | simple_price_format }}</td>
{% endif %}
{% if order.has_taxes_against_items %}
<td class="text_right">{{ item.unit_tax | simple_price_format }}</td>
{% endif %}
{% endif %}
<td class="text_right">{{ item.qty }}</td>
<td class="text_right qty">{{ item.currency_full_price | simple_price_format }}</td>
</tr>
{% assign row_count = row_count | plus:1 %}
{% endfor %}
</tbody>
<tfoot>
<tr class="total">
<td colspan="{{colspan}}" class="text_right">Subtotal</td>
<td colspan="2" class="text_right">{{ order.main_item_price | simple_price_format }}</td>
</tr>
</tfoot>
</table>
Custom Code
Modified code highlighted in red:
<table class="hundred">
<thead>
<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 = 4 %}
{% 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 %}
<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>
{% if item.has_sizes_or_colors? %}
{% if (item.is_freeform?) %}
<td class="text_left">{{ item.free_form_color }}</td>
{% else %}
<td class="text_left">{{ item.color_names }}</td>
{% endif %}
{% if item.free_form_size %}
<td class="text_left">{{ item.free_form_size }}</td>
{% else %}
<td class="text_left">{{ item.sizes }}</td>
{% endif %}
{% endif %}
<td class="text_right">{{ item.currency_unit_price | simple_price_format }}</td>
{% if order.use_extra_line_item_columns %}
{% if order.has_a_discount %}
<td class="text_right">
{{ item.discount_percent }}%
</td>
<td class="text_right">{{ item.currency_disc_unit_price | simple_price_format }}</td>
{% endif %}{% if order.has_taxes_against_items %}<td class="text_right">{{ item.unit_tax | simple_price_format}}</td>{% endif %}
{% endif %}
<td class="text_right">{{ item.qty }}</td>
<td class="text_right qty">{{ c | simple_price_format }}</td>
</tr>
{% assign row_count = row_count | plus:1 %}
{% endfor %}
</tbody>
<tfoot>
<tr class="total">
<td colspan="{{colspan}}" class="text_right">Subtotal</td>
<td colspan="2" class="text_right">{{ order.currency_price | simple_price_format }}</td>
</tr>
</tfoot>
</table>
Result

How to Show a Separate Line for Each Tax in the Order Template
The default Order Template only shows the combined tax amount included in an order.

If you want to show a breakdown of the combined tax total into separate lines for each tax included, you can use the tax.name, order.taxable_amount and tax.rate variables.
Custom Code Example
Here is an example of how you can modify the default Order Template to show a separate line for each tax:
Default Code
Code to be modified highlighted in red:
{% if order.has_taxes_against_items %}
<tr>
<td class="heading">Tax Included</td>
<td class="qty">{{ order.currency_final_tax | simple_price_format }}</td>
</tr>
{% endif %}
Custom Code
Modified code highlighted in red:
{% if order.has_taxes_against_items %}
{% for tax in order.taxes %}
<tr>
<td class="heading">Tax: {{ tax.name }}</td>
<td class="qty">{{ order.taxable_amount | divided_by: 100.0 | times: tax.rate | simple_price_format }}</td>
</tr>
{% endfor %}
{% endif %}
Result

How to Include the Order Title in the Order and Worksheet Templates
You can use the order.job_name variable to include the title of an order in the Order Template, Worksheet Template and Worksheet for DecoLinked Outsourcers Template.
You specify the order/quote title using the Title field at the top of the order/quote form when you create or edit an order/order.

Custom Code Example
Here is an example of how you can modify the default Order Template to include the order title:
Default Code
{% if is_quote %}
<li><h2><label>Quote #</label><span>{{order.quote_number}}</span></h2></li>
{% elsif order.is_invoiced? %}
<li><h2><label>INVOICE #</label><span>{{order.order_number}}</span></h2></li>
{% else %}
<li><h2><label>Order #</label><span>{{order.order_number}}</span></h2></li>
{% endif %}
Custom Code
Add the code in red after the default code shown above as follows:
{% if is_quote %}
<li><h2><label>Quote #</label><span>{{order.quote_number}}</span></h2></li>
{% elsif order.is_invoiced? %}
<li><h2><label>INVOICE #</label><span>{{order.order_number}}</span></h2></li>
{% else %}
<li><h2><label>Order #</label><span>{{order.order_number}}</span></h2></li>
{% endif %}
<li><label>Order Title</label><span>{{order.job_name}}</span></li>
Result

How to Include the File Attachments for Line Items in the Artwork Approval Template
You can use the attachment.image_url, attachment.get_file_name, attachment.name and attachment.description variables to include file attachments that were added beside artwork approval line items in the Artwork Approval Template.
Custom Code Example
Add the following code as a list item to the desired position within the {% for line_item in artwork.products_requiring_approval %} loop:
<li>
{% assign first_attachment = true %}
{% for attachment in line_item.attachments_viewable_customer %}
{% if first_attachment %}
<label>File Attachments:</label>
{% assign first_attachment = false %}
{% endif %}
{% if attachment.image_url %}
<div class="image" >
<img src="{{ attachment.image_url_100 }}" alt="[]" class ="attachment_image" />
</div>
{% else %}
<div>
<p>{{ attachment.get_file_name }}</p>
</div>
{% endif %}
<ul>
<li><label><em>Name </em></label><span>{{ attachment.name }}</span></li>
<li><label><em>Description </em></label><span>{{ attachment.description }}</span></li>
</ul>
{% endfor %}
</li>
Result

How to Include Payment Methods in the Order and Worksheet Templates
You can use the order.payment_method_name variable to include payment methods of payments made in the Order Template and Worksheet Template.
Custom Code Example
Here is an example of how you can modify the default Order Template to include payment methods for payments made:
Default Code
{% else %}
<li><label>Date</label><span>{{ order.date_ordered | date: "%d/%b/%Y" }}</span></li>
{% if order.date_due %}
<li><label>Date Ship By</label><span>{{ order.date_due | date: "%d/%b/%Y" }}</span></li>
{% endif %}
{% endif %}
Custom Code
Add the code in red to the default code shown above as follows:
{% else %}
<li><label>Date</label><span>{{ order.date_ordered | date: "%d/%b/%Y" }}</span></li>
<li><label>Payment Method</label><span>{{ order.payment_method_name }}</span></li>
{% if order.date_due %}
<li><label>Date Ship By</label><span>{{ order.date_due | date: "%d/%b/%Y" }}</span></li>
{% endif %}
{% endif %}
Result

How to Include the Source of an Order in the Order Template
You can use the order.is_internal_order? and order.is_internet_order? condition variables to include the source of an order (Internet or Business Hub) in the Order Template.
Custom Code Example
Here is an example of how you can modify the default Order Template to include the order source:
Default Code
{% if is_quote %}
<li><h2><label>Quote #</label><span>{{order.quote_number}}</span></h2></li>
{% elsif order.is_invoiced? %}
<li><h2><label>INVOICE #</label><span>{{order.order_number}}</span></h2></li>
{% else %}
<li><h2><label>Order #</label><span>{{order.order_number}}</span></h2></li>
{% endif %}
{% if order.has_po_number? %}
<li><label>PO Number</label><span>{{ order.po_number }}</span></li>
{% endif %}
Custom Code
Add the code in red to the default code shown above as follows:
{% if is_quote %}
<li><h2><label>Quote #</label><span>{{order.quote_number}}</span></h2></li>
{% elsif order.is_invoiced? %}
<li><h2><label>INVOICE #</label><span>{{order.order_number}}</span></h2></li>
{% else %}
<li><h2><label>Order #</label><span>{{order.order_number}}</span></h2></li>
{% endif %}
{% if order.is_internal_order?? %}
<li><label>Order Source</label><span> Business Hub</span></li>
{% elsif order.is_internet_order? %}
<li><label>Order Source</label><span> Internet Order</span></li>
{% endif %}
{% if order.has_po_number? %}
<li><label>PO Number</label><span>{{ order.po_number }}</span></li>
{% endif %}
Result

How to Show Sales Team Member Name in a Quote/Order and in a Worksheet
You can use the order.has_sales_team_member and order.sales_team_member variables in the Order and Worksheet Templates to show the name of the assigned salesperson.
Custom Code Examples
Here is an example of how you can modify the default Order Template to show the name of the salesperson the quote/order is assigned to:
Default Code
<div class="details">
<h1>
{% if from.account.company %}{{ from.account.company }}{% endif %}
{% if from.fc_settings.company_identification_number %}<br />{{ from.fc_settings.company_identification_number }}{% endif %}
{% if from.fc_settings.has_address? %}
<span>
{{ from.fc_settings.address }} {{ from.fc_settings.city }}, {{ from.fc_settings.state }} {{ from.fc_settings.zip }}<br />
{{ from.fc_settings.country_name }}
</span>
{% endif %}
<a href="http://{{ site.primary_domain }}">http://{{ site.primary_domain }}</a>
</h1>
</div>
Custom Code
Add the code in red to the default code shown above as follows:
<div class="details">
<h1>
{% if from.account.company %}{{ from.account.company }}{% endif %}
{% if from.fc_settings.company_identification_number %}<br />{{ from.fc_settings.company_identification_number }}{% endif %}
{% if from.fc_settings.has_address? %}
<span>
{{ from.fc_settings.address }} {{ from.fc_settings.city }}, {{ from.fc_settings.state }} {{ from.fc_settings.zip }}<br />
{{ from.fc_settings.country_name }}
</span>
{% endif %}
<a href="http://{{ site.primary_domain }}">http://{{ site.primary_domain }}</a>
<ul>
{% if order.has_sales_team_member? %}
<li><label>Salesperson</label> {{ order.sales_team_member }}</li>
{% endif %}
</ul>
</h1>
</div>
Result

Here is an example of how you can modify the default Worksheet Template to show the name of the salesperson the order is assigned to:
Default Code
<div id="header_order_details_2">
<ul>
<li><label>Order date: </label>{{ order.date_ordered | date: "%b %d, %Y" }}</li>
<li><label>Due date: </label><span class="highlight">{{ order.date_due | date: "%b %d, %Y" }}</span></li>
<li><label>Ship by: </label><span class="highlight">{{ order.shipping_method_name }}</span></li>
</ul>
</div>
Custom Code
Add the code in red to the default code shown above as follows:
<div id="header_order_details_2">
<ul>
<li><label>Order date: </label>{{ order.date_ordered | date: "%b %d, %Y" }}</li>
<li><label>Due date: </label><span class="highlight">{{ order.date_due | date: "%b %d, %Y" }}</span></li>
<li><label>Ship by: </label><span class="highlight">{{ order.shipping_method_name }}</span><br /><br /></li>
{% if order.has_sales_team_member? %}
<li><label>Salesperson</label> {{ order.sales_team_member }}</li>
{% endif %}
</ul>
</div>
Result

How to Show an Quote/Order is a priority order in the Order Template
You can use the order.is_priority? variable in the Order Templates to test whether an order is a priority.
Custom Code Examples
Here is an example of how you can modify the default Order Template to test and indicate that a quote/order is a priority order:
Default Code
<div class="details">
<h1>
{% if from.account.company %}{{ from.account.company }}{% endif %}
{% if from.fc_settings.company_identification_number %}<br />{{ from.fc_settings.company_identification_number }}{% endif %}
{% if from.fc_settings.has_address? %}
<span>
{{ from.fc_settings.address }} {{ from.fc_settings.city }}, {{ from.fc_settings.state }} {{ from.fc_settings.zip }}<br />
{{ from.fc_settings.country_name }}
</span>
{% endif %}
<a href="http://{{ site.primary_domain }}">http://{{ site.primary_domain }}</a>
</h1>
</div>
Custom Code
Add the code in red to the default code shown above as follows:
<div class="details">
<h1>
{% if from.account.company %}{{ from.account.company }}{% endif %}
{% if from.fc_settings.company_identification_number %}<br />{{ from.fc_settings.company_identification_number }}{% endif %}
{% if from.fc_settings.has_address? %}
<span>
{{ from.fc_settings.address }} {{ from.fc_settings.city }}, {{ from.fc_settings.state }} {{ from.fc_settings.zip }}<br />
{{ from.fc_settings.country_name }}
</span>
{% endif %}
<a href="http://{{ site.primary_domain }}">http://{{ site.primary_domain }}</a>
<ul>
{% if order.is_priority? %}
<li><label style="color:red;">Priority Order</label></li>
{% endif %}
</ul>
</h1>
</div>
Result

How to Include Production Team Member Names in the Order Template
You can use the following variables to include the production team member names in the Order Template.
- order.has_production_team_members?
- order.production_team_members
Custom Code Example
Here is an example of how you can modify the default Worksheet Template to include the names for all production team members assigned to the order:
Default Code
<div class="details">
<h1>
{% if from.account.company %}{{ from.account.company }}{% endif %}
{% if from.fc_settings.company_identification_number %}<br />{{ from.fc_settings.company_identification_number }}{% endif %}
{% if from.fc_settings.has_address? %}
<span>
{{ from.fc_settings.address }} {{ from.fc_settings.city }}, {{ from.fc_settings.state }} {{ from.fc_settings.zip }}<br />
{{ from.fc_settings.country_name }}
</span>
{% endif %}
<a href="http://{{ site.primary_domain }}">http://{{ site.primary_domain }}</a>
</h1>
</div>
Custom Code
Add the code in red to the default code shown above as follows:
<div class="details">
<h1>
{% if from.account.company %}{{ from.account.company }}{% endif %}
{% if from.fc_settings.company_identification_number %}<br />{{ from.fc_settings.company_identification_number }}{% endif %}
{% if from.fc_settings.has_address? %}
<span>
{{ from.fc_settings.address }} {{ from.fc_settings.city }}, {{ from.fc_settings.state }} {{ from.fc_settings.zip }}<br />
{{ from.fc_settings.country_name }}
</span>
{% endif %}
<a href="http://{{ site.primary_domain }}">http://{{ site.primary_domain }}</a><br />
{% if order.has_production_team_members? %}
<label>Assigned To:</label><span>{{ order.production_team_members }}</span>
{% else %}
<span>No Production Team Members assigned to this Order</span>
{% endif %}
</h1>
</div>
Result

How to Include Production Team Member Name in the Worksheet Template
You can use the following variables to include the name of a production team member assigned to a line item in the Worksheet Template.
- item.has_production_team_member?
- item.production_team_member
Custom Code Example
Here is an example of how you can modify the default Worksheet Template to include the production team member name for each line item in the order:
Default Code
{% for item in order.main_items %}
<div class="lineitem">
<h2 class="heading_lineitem">
<span style="padding:0 10px;">ITEM: {{ item.number }}</span>
{% if (item.supplier_product) and (item.is_not_freeform?) %}({{ item.supplier_product.product_code }}) {% endif %}{{ item.product_name }} {% unless item.product_based? %}{% if item.has_extra_options? %}: {% endif %}{{ item.extra_options}}{%endunless%}
</h2>
Custom Code
Add the code in red to the default code shown above as follows:
{% for item in order.main_items %}
<div class="lineitem">
<h2 class="heading_lineitem">
<span style="padding:0 10px;">ITEM: {{ item.number }}</span>
{% if (item.supplier_product) and (item.is_not_freeform?) %}({{ item.supplier_product.product_code }}) {% endif %}{{ item.product_name }} {% unless item.product_based? %}{% if item.has_extra_options? %}: {% endif %}{{ item.extra_options}}{% endunless %}
{% if item.has_production_team_member? %}
<span style="padding:0 10px; float:right;"><label>Assigned To: </label>{{ item.production_team_member }}</span>
{% else %}
<span style="padding:0 10px; float:right;">Unassigned</span>
{% endif %}
</h2>
Result

How to Include Shipment Dates in the Order Template
You can use the following variables to include shipment dates in the Order Template.
- order.date_shipped: use this variable to show the date on which an order was shipped in its entirety.
- order.first_shipment_date: use this variable to show the configured date for the first recorded shipment in a multiple shipment order.
- order.last_shipment_date: use this variable to show the configured date for the last recorded shipment in a multiple shipment order.
Custom Code Examples
Here is an example of how you can modify the default Order Template to show the date an order was fully shipped:
Default Code
{% if order.shipping_days %}
<li><label>Maximum Delivery Days</label><span>{{ order.shipping_days }}</span></li>
{% endif %}
{% if order.shipping_tracking_code %}
<li><label>Tracking Code</label><span>{{ order.shipping_tracking_code }}</span></li>
{% endif %}
Custom Code
Add the code in red to the default code shown above as follows:
{% if order.shipping_days %}
<li><label>Maximum Delivery Days</label><span>{{ order.shipping_days }}</span></li>
{% endif %}
{% if order.date_shipped %}
<li><label>Date Shipped</label><span>{{ order.date_shipped | date: "%d/%b/%Y" }}</span></li>
{% endif %}
{% if order.shipping_tracking_code %}
<li><label>Tracking Code</label><span>{{ order.shipping_tracking_code }}</span></li>
{% endif %}
Result

Here is an example of how you can modify the default Order Template to show the first or the last shipment dates for a multiple shipment order:
Default Code
{% if order.shipping_days %}
<li><label>Maximum Delivery Days</label><span>{{ order.shipping_days }}</span></li>
{% endif %}
{% if order.shipping_tracking_code %}
<li><label>Tracking Code</label><span>{{ order.shipping_tracking_code }}</span></li>
{% endif %}
Custom Code
Add the code in red to the default code shown above as follows:
{% if order.shipping_days %}
<li><label>Maximum Delivery Days</label><span>{{ order.shipping_days }}</span></li>
{% endif %}
{% if order.first_shipment_date %}
<li><label>Date First Shipped</label><span>{{ order.first_shipment_date | date: "%d/%b/%Y" }}</span></li>
{% endif %}
{% if order.shipping_tracking_code %}
<li><label>Tracking Code</label><span>{{ order.shipping_tracking_code }}</span></li>
{% endif %}
Result

How to Include Shipment Dates in the Shipping Label and Packing Slip Templates
You can use the shipment.date_shipped variable to include the configured date recorded for a particular shipment in both the Shipping Label and Packing Slip Templates.
Custom Code Examples
Here is an example of how you can modify the default Shipping Label Template to show the date configured for a particular shipment in the format DD/MMM/YYYY instead of the format DD-MMM-YYYY:
Default Code
Code to be modified highlighted in red:
<div class="details">
<ul>
<li><label>Delivery Date</label> {{ shipment.ship_date_description }}</li>
{% if show_ship_via %}
<li><label>Ship via</label> {{ shipment.freight_method_description }}</li>
{% if shipment.tracking_number %}
<li><label>Tracking Code</label><span>{{ shipment.tracking_number }}</span></li>
{% endif %}
{% endif %}
{% if show_number_items %}
<li><label>Total Items</label> {{ shipment.total_quantity }}</li>
{% endif %}
{% if show_weight %}
<li><label>Total Weight</label> {{ shipment.weight_description }}</li>
{% endif %}
</ul>
</div>
Custom Code
Replace the code in red above with the code in red below, as follows:
<div class="details">
<ul>
<li><label>Date Shipped</label> {{ shipment.ship_date | date: "%d/%b/%Y" }}</li>
{% if show_ship_via %}
<li><label>Ship via</label> {{ shipment.freight_method_description }}</li>
{% if shipment.tracking_number %}
<li><label>Tracking Code</label><span>{{ shipment.tracking_number }}</span></li>
{% endif %}
{% endif %}
{% if show_number_items %}
<li><label>Total Items</label> {{ shipment.total_quantity }}</li>
{% endif %}
{% if show_weight %}
<li><label>Total Weight</label> {{ shipment.weight_description }}</li>
{% endif %}
</ul>
</div>
Result

Here is an example of how you can modify the default Packing Slip Template to show the date configured for a particular shipment instead of the expected Ship By Date:
Default Code
Code to be modified highlighted in red:
<div class="order">
<ul>
{% if order.has_po_number? %}
<li><label>PO Number</label><span>{{ order.po_number }}</span></li>
{% endif %}
<li><label>Date</label><span>{{ order.date_ordered | date: "%d/%b/%Y" }}</span></li>
{% if order.date_due %}
<li><label>Date Ship By</label><span>{{ order.date_due | date: "%d/%b/%Y" }}</span></li>
{% endif %}
{% if order.shipping_days %}
<li><label>Maximum Delivery Days</label><span>{{ order.shipping_days }}</span></li>
{% endif %}
<li><label>Shipping</label><span>{{ shipment.freight_method_description }}</span></li>
{% if shipment.tracking_number %}
<li><label>Tracking Code</label><span>{{ shipment.tracking_number }}</span></li>
{% endif %}
</ul>
</div>
Custom Code
Replace the code in red above with the code in red below, as follows:
<div class="order">
<ul>
{% if order.has_po_number? %}
<li><label>PO Number</label><span>{{ order.po_number }}</span></li>
{% endif %}
<li><label>Date</label><span>{{ order.date_ordered | date: "%d/%b/%Y" }}</span></li>
{% if order.date_due %}
<li><label>Date Shipped</label><span>{{ shipment.ship_date | date: "%d/%b/%Y" }}</span></li>
{% endif %}
{% if order.shipping_days %}
<li><label>Maximum Delivery Days</label><span>{{ order.shipping_days }}</span></li>
{% endif %}
<li><label>Shipping</label><span>{{ shipment.freight_method_description }}</span></li>
{% if shipment.tracking_number %}
<li><label>Tracking Code</label><span>{{ shipment.tracking_number }}</span></li>
{% endif %}
</ul>
</div>
Result

How to Include the Supplier Description in the Purchase Order Template
You can use the purchase_order.supplier.desc variable to include the supplier description in the Purchase Order Template.
Custom Code Example
Here is an example of how you can modify the default Purchase Order Template to show the supplier description:
Default Code
<div class="order">
<ul>
<li><label>Date</label><span>{{ purchase_order.created_at | date: "%d/%b/%Y" }}</span></li>
<li><label>Reference</label><span>{{ purchase_order.reference }}</span></li>
<li><label>Supplier</label><span>{{ purchase_order.supplier_name }}</span></li>
<li><label>Supplier Invoice #</label><span>{{ purchase_order.vendor_invoice_number }}</span></li>
<li><label>Supplier Tracking #</label><span>{{ purchase_order.vendor_tracking_number }}</span></li>
{% if purchase_order.show_supplier_address? %}
<li><label>Supplier Address</label><span>{{ purchase_order.supplier_address }}</span></li>
{% endif %}
<li><label>Attention to</label><span>{{ purchase_order.attention_to }}</span></li>
</ul>
</div>
Custom Code
Add the code in red to the default code shown above as follows:
<div class="order">
<ul>
<li><label>Date</label><span>{{ purchase_order.created_at | date: "%d/%b/%Y" }}</span></li>
<li><label>Reference</label><span>{{ purchase_order.reference }}</span></li>
<li><label>Supplier</label><span>{{ purchase_order.supplier_name }}</span></li>
<li><label>Supplier Description</label><span>{{ purchase_order.supplier_desc }}</span></li>
<li><label>Supplier Invoice #</label><span>{{ purchase_order.vendor_invoice_number }}</span></li>
<li><label>Supplier Tracking #</label><span>{{ purchase_order.vendor_tracking_number }}</span></li>
{% if purchase_order.show_supplier_address? %}
<li><label>Supplier Address</label><span>{{ purchase_order.supplier_address }}</span></li>
{% endif %}
<li><label>Attention to</label><span>{{ purchase_order.attention_to }}</span></li>
</ul>
</div>
Result

How to Include the Requested Due Date in the Purchase Order Template
You can use the purchase_order.due_date variable to include the requested due date in the Purchase Order Template.
Custom Code Example
Here is an example of how you can modify the default Purchase Order Template to show the requested due date:
Default Code
<div class="order">
<ul>
<li><label>Date</label><span>{{ purchase_order.created_at | date: "%d/%b/%Y" }}</span></li>
<li><label>Reference</label><span>{{ purchase_order.reference }}</span></li>
<li><label>Supplier</label><span>{{ purchase_order.supplier_name }}</span></li>
<li><label>Supplier Invoice #</label><span>{{ purchase_order.vendor_invoice_number }}</span></li>
<li><label>Supplier Tracking #</label><span>{{ purchase_order.vendor_tracking_number }}</span></li>
{% if purchase_order.show_supplier_address? %}
<li><label>Supplier Address</label><span>{{ purchase_order.supplier_address }}</span></li>
{% endif %}
<li><label>Attention to</label><span>{{ purchase_order.attention_to }}</span></li>
</ul>
</div>
Custom Code
Add the code in red to the default code shown above as follows:
<div class="order">
<ul>
<li><label>Date</label><span>{{ purchase_order.created_at | date: "%d/%b/%Y" }}</span></li>
<li><label>Reference</label><span>{{ purchase_order.reference }}</span></li>
<li><label>Supplier</label><span>{{ purchase_order.supplier_name }}</span></li>
<li><label>Supplier Invoice #</label><span>{{ purchase_order.vendor_invoice_number }}</span></li>
<li><label>Supplier Tracking #</label><span>{{ purchase_order.vendor_tracking_number }}</span></li>
{% if purchase_order.show_supplier_address? %}
<li><label>Supplier Address</label><span>{{ purchase_order.supplier_address }}</span></li>
{% endif %}
<li><label>Attention to</label><span>{{ purchase_order.attention_to }}</span></li>
<li><label>Due Date</label><span>{{ purchase_order.due_date | date: "%d/%b/%Y" }}</span></li>
</ul>
</div>
Result

How to Include the Actual Name Specified for the Rush Order Fee in the Order Template
You can use the purchase_order.supplier.desc variable to rename the "Rush Order Fee" label with the actual name specified for the rush order fee in the Order Template.
Custom Code Example
Here is an example of how you can modify the default Order Template to show the actual name of the rush order fee, rather than the generic "Rush Order Fee" label:
Default Code
Code to be modified highlighted in red:
<tbody>
<tr>
<td class="heading">Shipping</td>
<td class="qty">{{ order.currency_total_shipping_price | simple_price_format }}</td>
</tr>
{% if order.rush_order_fee_id %}
<tr>
<td class="heading">Rush Order Fee</td>
<td class="qty">{{ order.rush_order_cost | simple_price_format }}</td>
</tr>
{% endif %}
Custom Code
Replace the code in red above with the code in red below, as follows:
<tbody>
<tr>
<td class="heading">Shipping</td>
<td class="qty">{{ order.currency_total_shipping_price | simple_price_format }}</td>
</tr>
{% if order.rush_order_fee_id %}
<tr>
<td class="heading">{{ order.rush_order_fee_name }}</td>
<td class="qty">{{ order.rush_order_cost | simple_price_format }}</td>
</tr>
{% endif %}
Result

How to Show Part Name Rather than Full Name in Order Templates
You can use the customer.firstname and customer.lastname variables to only show part of the customer's name in an order template.
Custom Code Example
Here is an example of how you can modify the default Customer Account Statement Template to only show the initial of the customer's first name, followed by their last name:
Default Code
Code to be modified highlighted in red:
<div class="billing">
<h3>Bill To</h3>
<h4>{{ customer.full_name }}</h4>
<span>
{{customer.address}}<br />
{{customer.city}}, {{customer.state}} {{ customer.zip }}
</span>
</div>
Custom Code
Replace the code in red above with the code in red below, as follows:
<div class="billing">
<h3>Bill To</h3>
<h4>{{ customer.firstname | truncate: 2, "." }} {{ customer.lastname }}</h4>
<span>
{{customer.address}}<br />
{{customer.city}}, {{customer.state}} {{ customer.zip }}
</span>
</div>
Result

How to Show the Category of a Pre-decorated Product in the Order Template
You can use the item.predecorated_product.category_name variable to show the name of the category a decorated product belongs to in the Order Template.
Custom Code Example
Here is an example of how you can modify the default Order Template to show the name of the category a decorated product belongs to:
Default Code
Code to be modified highlighted in red:
<table class="hundred">
<thead>
<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 %}
<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/replace the code in red to the default code shown above as follows:
<table class="hundred">
<thead>
<tr>
<th>Product</th>
{% for item in order.main_items %}
{% if item.is_predecorated_product? %}
<th>Product Category</th>
{% endif %}
{% endfor %}
<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 = 6 %}
{% 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 %}
<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>
{% if item.is_predecorated_product? %}
<td class="text_left">
{{ item.predecorated_product.category_name }}
</td>
{% endif %}
Result

How to Show the SKU Code of an Item in the Order Template
You can use the item.sku_code variable to show the SKU code(s) of an item in the Order Template. The sku_code variable at the line item level can potentially return multiple SKU codes if multiple sizes have been selected for the line item. If there are multiple codes, the codes will be separated by a comma.
Custom Code Example
Here is an example of how you can modify the default Order Template to show the SKU code(s) for a line item:
Default Code
Code to be modified highlighted in red:
<table class="hundred">
<thead>
<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 %}
<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>
{% if item.has_sizes_or_colors? %}
{% if (item.is_freeform?) %}
<td class="text_left">{{ item.free_form_color }}</<span">td>
{% else %}
<td class="text_left">{{ item.color_names }}</td>
{% endif %}
{% if item.free_form_size %}
<td class="text_left">{{ item.free_form_size }}</td>
{% else %}
<td class="text_left">{{ item.sizes }}</td>
{% endif %}
{% endif %}
<td class="text_right">{{ item.currency_unit_price | simple_price_format }}</td>
{% if order.use_extra_line_item_columns %}
{% if order.has_a_discount %}
<td class="text_right">
{{ item.discount_percent }}%
</td>
<td class="text_right">{{ item.currency_disc_unit_price | simple_price_format }}</td>
{% endif %}
{% if order.has_taxes_against_items %}
<td class="text_right"<span>{{ item.unit_tax | simple_price_format }}</td>
{% endif %}
{% endif %}
<td class="text_right">{{ item.qty }}</td>
<td class="text_right qty">{{ item.currency_full_price | simple_price_format }}</td>
</tr>
{% assign row_count = row_count | plus:1 %}
{% endfor %}
</tbody>
<tfoot>
<tr class="total">
<td colspan="{{colspan}}" class="text_right">Subtotal</td>
<td colspan="2" class="text_right">{{ order.main_item_price | simple_price_format }}</td>
</tr>
</tfoot>
</table>
Custom Code
Add/replace the code in red to the default code shown above as follows:
<table class="hundred">
<thead>
<tr>
<th>Product</th>
<th>Color</th>
<th>Size / Qty</th>
<th>SKU</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 = 6 %}
{% 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 %}
<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>
{% if item.has_sizes_or_colors? %}
{% if (item.is_freeform?) %}
<td class="text_left">{{ item.free_form_color }}</td>
{% else %}
<td class="text_left">{{ item.color_names }}</td>
{% endif %}
{% if item.free_form_size %}
<td class="text_left">{{ item.free_form_size }}</td>
{% else %}
<td class="text_left">{{ item.sizes }}</td>
<td class="text_left"> {{ item.sku_code }}</td>
{% endif %}
{% endif %}
<td class="text_right">{{ item.currency_unit_price | simple_price_format }}</td>
{% if order.use_extra_line_item_columns %}
{% if order.has_a_discount %}
<td class="text_right">
{{ item.discount_percent }}%
</td>
<td class="text_right">{{ item.currency_disc_unit_price | simple_price_format }}</td>
{% endif %}
{% if order.has_taxes_against_items %}
<td class="text_right">{{ item.unit_tax | simple_price_format }}</td>
{% endif %}
{% endif %}
<td class="text_right">{{ item.qty }}</td>
<td class="text_right qty">{{ item.currency_full_price | simple_price_format }}</td>
</tr>
{% assign row_count = row_count | plus:1 %}
{% endfor %}
</tbody>
<tfoot>
<tr class="total">
<td colspan=<span">"{{colspan}}" class="text_right">Subtotal</td>
<td colspan<span">="3" class="text_right"<span">>{{ order.main_item_price | simple_price_format }}</td>
</tr>
</tfoot>
</table>
Result

How to Show the SKU Code of an Item in the Worksheet Template
You can use the item.sku_code variable to show the SKU code(s) of an item in the Worksheet Template. The sku_code variable at the line item level can potentially return multiple SKU codes if multiple sizes have been selected for the line item. If there are multiple codes, the codes will be separated by a comma.
You can use the selected_option.sku_code variable to show the SKU code of an individual size within a line item in the Worksheet Template.
Custom Code Examples
Here is an example of how you can modify the default Worksheet Template to show the SKU code(s) for a line item:
Default Code
<!-- ITEM START HERE -->
{% for item in order.main_items %}
<div class="lineitem">
<h2 class="heading_lineitem">
<span style="padding:0 10px;">ITEM: {{ item.number }}</span>
Custom Code
Add the code in red to the default code shown above as follows:
<!-- ITEM START HERE -->
{% for item in order.main_items %}
<div class="lineitem">
<h2 class="heading_lineitem">
<span style="padding:0 10px;">ITEM: {{ item.number }}</span><span style="padding:0 10px;">SKU: {{ item.sku_code }}</span>
Result

Here is an example of how you can modify the default Worksheet Template to show the SKU code for a particular size in a line item:
Default Code
Style Tag Section
Code to be modified highlighted in red:
#w1 .lineitem_summary_col2 {
float:left;
width: 145px;
}
#w1 .lineitem_summary_col3 {
float:right;
width: 445px;
}
Div Tag Section
<span class="size"><h3>Size</h3></span>
<span class="qty"><h3>Qty</h3></span>
</li>
{% if item.free_form_size %}
<li style="border-bottom:1px solid #F0F0F0;">
<span class="size">{{ item.free_form_size }}</span>
</li>
{% else %}
{% for selected_option in item.size_field.selected_options_sorted_by_size %}
<li style="border-bottom:1px solid #F0F0F0;">
<span class="size">{{ selected_option.option_name }}</span>
<span class="qty">{{ selected_option.option_qty }}</span>
</li>
{% endfor%}
Custom Code
Style Tag Section
Modified code highlighted in red:
#w1 .lineitem_summary_col2 {
float:left;
width: 250px;
}
#w1 .lineitem_summary_col3 {
float:right;
width: 445px;
}
#w1 .lineitem_summary_col2 .sku {
float:left;
width:30px;
display:block;
text-align:left;
}
Div Tag Section
Add the code in red to the default code shown above as follows:
<span class="size"><h3>Size</h3></span>
<span class="qty"><h3>Qty</h3></span>
<span class="sku"><h3>SKU</h3></span>
</li>
{% if item.free_form_size %}
<li style="border-bottom:1px solid #F0F0F0;">
<span class="size">{{ item.free_form_size }}</span>
</li>
{% else %}
{% for selected_option in item.size_field.selected_options_sorted_by_size %}
<li style="border-bottom:1px solid #F0F0F0;">
<span class="size">{{ selected_option.option_name }}</span>
<span class="qty">{{ selected_option.option_qty }}</span>
<span>{{ selected_option.sku_code }}</span>
</li>
{% endfor%}
Result

How to show the Coupon Code in the Order Template
You can show the code of a coupon used in an order by using the order.coupon.code variable in the Order Template.
Custom Code Examples
Here is an example of how you can modify the default Order Template to show the coupon code if a coupon is used in an order:
Default Code
{% if order.uses_coupon? %}
<tr>
<td class="heading">Coupon Discount</td>
<td class="qty">{{ order.coupon_discount_inc_tax | simple_price_format }}</td>
</tr>
{% endif %}
Custom Code
Add the code in red to the default code shown above as follows:
{% if order.uses_coupon? %}
<tr>
<td class="heading">Coupon Discount ({{ order.coupon.code }})</td>
<td class="qty">{{ order.coupon_discount_inc_tax | simple_price_format }}</td>
</tr>
{% endif %}
Result

How to Include Payment Due Date in the Order Template
You can use the date_payment_due variable to include the payment due date in the Order Template.
Custom Code Examples
Here is an example of how you can modify the default Order Template to show the payment due date:
Default Code
{% if is_quote %}
<li><label>Date</label><span>{{ order.date_quoted | date: "%d/%b/%Y"}}</span></li>
<li><label>Valid Until</label><span>{{ order.date_quote_valid_until | date: "%d/%b/%Y"}}</span></li>
{% else %}
<li><label>Date</label><span>{{ order.date_ordered | date: "%d/%b/%Y"}}</span></li>
% if order.order_invoice_dates_differ? %}
<li><label>Invoiced</label><span>{{ order.date_invoiced | date: "%d/%b/%Y"}}</span></li>
{% endif %}
Custom Code
Add the code in red to the default code shown above as follows:
{% if is_quote %}
<li><label>Date</label><span>{{ order.date_quoted | date: "%d/%b/%Y"}}</span></li>
<li><label>Valid Until</label><span>{{ order.date_quote_valid_until | date: "%d/%b/%Y"}}</span></li>
{% else %}
<li><label>Date</label><span>{{ order.date_ordered | date: "%d/%b/%Y"}}</span></li>
<li><label>Payment Due</label><span>{{ date_payment_due | date: "%d/%b/%Y"}}</span></li>
% if order.order_invoice_dates_differ? %}
<li><label>Invoiced</label><span>{{ order.date_invoiced | date: "%d/%b/%Y"}}</span></li>
{% endif %}
Result
How to Include Production Days in the Order Template
You can use the production_days variable to include the number of production days in the Order Template.
Custom Code Examples
Here is an example of how you can modify the default Order Template to show the number of days an order takes to be completed in production:
Default Code
<li><label>Shipping</label><span>{{ order.shipping_method_name }}</span></li>
{% if order.shipping_days %}
<li><label>Maximum Delivery Days</label><span>{{ order.shipping_days }}</span></li>
{% endif %}
Custom Code
Add the code in red to the default code shown above as follows:
<li><label>Shipping</label><span>{{ order.shipping_method_name }}</span></li>
{% if order.production_days %}
<li><label>Production Days</label><span>{{ order.production_days }}</span></li>
{% endif %}
{% if order.shipping_days %}
<li><label>Maximum Delivery Days</label><span>{{ order.shipping_days }}</span></li>
{% endif %}
Result

How to Include the Supplier Product Name in the Worksheet Template
You can use the item.supplier_product.product_name variable to include the supplier product name of a catalog product in the Worksheet Template.
Custom Code Example
Here is an example of how you can modify the default Worksheet Template to include the supplier product name for a catalog product ordered:
Default Code
<div class="lineitem_summary_col1">
<h3>Color</h3>
{% if (item.is_freeform?) %}
<span>{{ item.free_form_color }}</span>
{% else %}
{% for color in item.chosen_colors %}
<span class="colorbox">
<span style="background: {{color.color}}; height:50px;">
{% if color.swatch_image_20 %}
<img src="{{ color.swatch_image_20 }}" style="position: absolute; width: 100%; height: 100%; top: 0; left: 0">
{% else %}
{% endif %}
</span>
</span>
{{ color.color_name }}
{% endfor %}
{% endif %}
</div>
Custom Code
Add the code in red to the default code shown above as follows:
<div class="lineitem_summary_col1">
<span><h3>Supplier Product Name</h3></span>
{{item.supplier_product.product_name}}
<h3>Color</h3>
{% if (item.is_freeform?) %}
<span>{{ item.free_form_color }}</span>
{% else %}
{% for color in item.chosen_colors %}
<span class="colorbox">
<span style="background: {{color.color}}; height:50px;">
{% if color.swatch_image_20 %}
<img src="{{ color.swatch_image_20 }}" style="position: absolute; width: 100%; height: 100%; top: 0; left: 0">
{% else %}
{% endif %}
</span>
</span>
{{ color.color_name }}
{% endfor %}
{% endif %}
</div>
Result

How to Include the Current Date in the Order and Worksheet Templates
You can use the following variables to show the current date and time at the moment an order or worksheet is created in the Order and Worksheet Templates.
- "now" | date: "%d/%b/%Y %H:%M": shows the current date and time of the DecoNetwork server.
- tz_now | date: "%d/%b/%Y %H:%M": shows the local date and time for you (the licensee).
Custom Code Example
Here is an example of how you can modify the default Order Template to show the current server or local date instead of the order date. Replace the default code in red below with the desired variable above.
Default Code
{% else %}
<li><label>Date</label><span>{{ order.date_ordered | date: "%d/%b/%Y" }}</span></li>
{% if order.date_due %}
<li><label>Date Ship By</label><span>{{ order.date_due | date: "%d/%b/%Y" }}</span></li>
{% endif %}
{% endif %}
Result

How to Show the Brand Name of an Item in the Order Template
You can use the item.supplier_product.product_brand variable to show the brand name of a supplier product item in the Order Template.
Custom Code Example
Here is an example of how you can modify the default Order Template to show the brand name for a line item:
Default Code
Code to be modified highlighted in red:
<table class="hundred">
<thead>
<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 %}
<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>
{% if item.has_sizes_or_colors? %}
{% if (item.is_freeform?) %}
<td class="text_left">{{ item.free_form_color }}</td>
{% else %}
<td class="text_left">{{ item.color_names }}</td>
{% endif %}
{% if item.free_form_size %}
<td class="text_left">{{ item.free_form_size }}</td>
{% else %}
<td class="text_left">{{ item.sizes }}</td>
{% endif %}
{% endif %}
<td class="text_right">{{ item.currency_unit_price | simple_price_format }}</td>
{% if order.use_extra_line_item_columns %}
{% if order.has_a_discount %}
<td class="text_right">
{{ item.discount_percent }}%
</td>
<td class="text_right">{{ item.currency_disc_unit_price | simple_price_format }}</td>
{% endif %}
{% if order.has_taxes_against_items %}
<td class="text_right">{{ item.unit_tax | simple_price_format }}</td>
{% endif %}
{% endif %}
<td class="text_right">{{ item.qty }}</td>
<td class="text_right qty">{{ item.currency_full_price | simple_price_format }}</td>
</tr>
{% assign row_count = row_count | plus:1 %}
{% endfor %}
</tbody>
<tfoot>
<tr class="total">
<td colspan="{{colspan}}" class="text_right">Subtotal</td>
<td colspan="2" class="text_right">{{ order.main_item_price | simple_price_format }}</td>
</tr>
</tfoot>
</table>
Custom Code
Add/replace the code in red to the default code shown above as follows:
<table class="hundred">
<thead>
<tr>
<th>Product</th>
<th>Product Brand</th>
<th>Colour</th>
<th>Size / Qty</th>
<th>Unit Price</th>
{% if order.use_extra_line_item_columns %}
{% if order.has_a_discount %}
<th>Discount</th>
<th>Disc Unit Price</th>
{% endif%}
{% if order.has_taxes_against_items %}
<th>VAT</th>
{% endif %}
{% endif %}
<th class="text_right">Qty</th>
<th class="text_right">Total</th>
</tr>
</thead>
<tbody>
{% assign colspan = 6 %}
{% 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 %}
<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>{{ item.supplier_product.product_brand }}</td>
{% if item.has_sizes_or_colors? %}
{% if (item.is_freeform?) %}
<td class="text_left">{{ item.free_form_color }}</td>
{% else %}
<td class="text_left">{{ item.color_names }}</td>
{% endif %}
{% if item.free_form_size %}
<td class="text_left">{{ item.free_form_size }}</td>
{% else %}
<td class="text_left">{{ item.sizes}}</td>
{% endif %}
{% endif %}
<td class="text_right">{{ item.currency_unit_price | simple_price_format }}</td>
{% if order.use_extra_line_item_columns %}
{% if order.has_a_discount %}
<td class="text_right">
{{ item.discount_percent }}%
</td>
<td class="text_right">{{ item.currency_disc_unit_price | simple_price_format }}</td>
{% endif %}
{% if order.has_taxes_against_items %}
<td class="text_right">{{ item.unit_tax | simple_price_format }}</td>
{% endif %}
{% endif %}
<td class="text_right">{{ item.qty }}</td>
<td class="text_right qty">{{ item.currency_full_price | simple_price_format }}</td>
</tr>
{% assign row_count = row_count | plus:1 %}
{% endfor %}
</tbody>
<tfoot>
<tr class="total">
<td colspan="{{colspan}}" class="text_right">Subtotal</td>
<td colspan="2" class="text_right">{{ order.main_item_price | simple_price_format }}</td>
</tr>
</tfoot>
</table>
Result

How to Show the Shipping Method Name in the Purchase Order Template
You can use the shipping_method_names variable to show the name of the shipping method used to deliver a purchase order in the Purchase Order Template.
Custom Code Example
Here is an example of how you can modify the default Purchase Order Template to show the name of the shipping method used:
Default Code
<div id="in_customer">
<div class="shipping">
<h3>Deliver To</h3>
<span>
{{ purchase_order.delivery_address_html }}
</span>
</div>
Custom Code
Add the code in red to the default code shown above as follows:
<div id="in_customer">
<div class="shipping">
<h3>Deliver To</h3>
<span>
{{ purchase_order.delivery_address_html }}
</span>
<br />
<div class="shipping">
<span><label>Shipping Method</label></span><span>{{ shipping_method_names }}</span>
</div>
</div>
Result

How to Show the Tracking URL in the Packing Slip Template
You can use the following variables to show the tracking URL in the Packing Slip Template.
- shipment.has_tracking_url?: the condition that the shipment has a tracking URL associated with it.
- shipment.tracking_url: the weblink that allows the customer to track the shipping status of the shipment.
Custom Code Example
Here is an example of how you can modify the default Shipping Slip Template to show the tracking URL:
Default Code
<div class="order">
<ul>
{% if order.has_po_number? %}
<li><label>PO Number</label><span>{{ order.po_number }}</span></li>
{% endif %}
<li><label>Date</label><span>{{ order.date_ordered | date: "%d/%b/%Y"}}</span></li>
{% if order.date_due %}
<li><label>Date Ship By</label><span>{{ order.date_due | date: "%d/%b/%Y"}}</span></li>
{% endif %}
{% if order.shipping_days %}
<li><label>Maximum Delivery Days</label><span>{{ order.shipping_days }}</span></li>
{% endif %}
<li><label>Shipping</label><span>{{ shipment.freight_method_description }}</span></li>
{% if shipment.tracking_number %}
<li><label>Tracking Code</label><span>{{ shipment.tracking_number }}</span></li>
{% endif %}
</ul>
</div>
Custom Code
Add the code in red to the default code shown above as follows:
<div class="order">
<ul>
{% if order.has_po_number? %}
<li><label>PO Number</label><span>{{ order.po_number }}</span></li>
{% endif %}
<li><label>Date</label><span>{{ order.date_ordered | date: "%d/%b/%Y"}}</span></li>
{% if order.date_due %}
<li><label>Date Ship By</label><span>{{ order.date_due | date: "%d/%b/%Y"}}</span></li>
{% endif %}
{% if order.shipping_days %}
<li><label>Maximum Delivery Days</label><span>{{ order.shipping_days }}</span></li>
{% endif %}
<li><label>Shipping</label><span>{{ shipment.freight_method_description }}</span></li>
{% if shipment.tracking_number %}
<li><label>Tracking Code</label><span>{{ shipment.tracking_number }}</span></li>
{% endif %}
{% if shipment.has_tracking_url %}
<li><label>Tracking URL</label><span>{{ shipment.tracking_url }}</span></li>
{% endif %}
</ul>
</div>
Result

How to Show the Tracking URL in the Order Template
You can use the following variables to show the tracking URL in the Order Template.
- shipment.has_tracking_url?: the condition that a shipped order has a tracking URL associated with it.
- shipment.tracking_url: the weblink that allows the customer to track the shipping status of a shipped order.
Custom Code Example
Here is an example of how you can modify the default Order Template to show the tracking URL:
Default Code
<li><label>Date</label><span>{{ order.date_ordered | date: "%d/%b/%Y"}}</span></li>
{% if order.order_invoice_dates_differ? %}
<li><label>Invoiced</label><span>{{ order.date_invoiced | date: "%d/%b/%Y"}}</span></li>
{% endif %}
{% if order.date_due %}
<li><label>Date Ship By</label><span>{{ order.date_due | date: "%d/%b/%Y"}}</span></li>
{% endif %}
{% endif %}
<li><label>Shipping</label><span>{{ order.shipping_method_name }}</span></li>
{% if order.shipping_days %}
<li><label>Maximum Delivery Days</label><span>{{ order.shipping_days }}</span></li>
{% endif %}
{% if order.shipping_tracking_code %}
<li><label>Tracking Code</label><span>{{ order.shipping_tracking_code }}</span></li>
{% endif %}
Custom Code
Add the code in red to the default code shown above as follows:
<li><label>Date</label><span>{{ order.date_ordered | date: "%d/%b/%Y"}}</span></li>
{% if order.order_invoice_dates_differ? %}
<li><label>Invoiced</label><span>{{ order.date_invoiced | date: "%d/%b/%Y"}}</span></li>
{% endif %}
{% if order.date_due %}
<li><label>Date Ship By</label><span>{{ order.date_due | date: "%d/%b/%Y"}}</span></li>
{% endif %}
{% endif %}
<li><label>Shipping</label><span>{{ order.shipping_method_name }}</span></li>
{% if order.shipping_days %}
<li><label>Maximum Delivery Days</label><span>{{ order.shipping_days }}</span></li>
{% endif %}
{% if order.shipping_tracking_code %}
<li><label>Tracking Code</label><span>{{ order.shipping_tracking_code }}</span></li>
{% endif %}
{% if order.shipping_tracking_url %}
<li><label>Tracking URL</label><span>{{ order.shipping_tracking_url }}</span></li>
Result

How to Show Notes for the Customer from an Artwork Approval in the Order Template
You can use the following variables to show notes for the customer for a related artwork approval in the Order Template.
- artwork.has_production_notes?: the condition that the artwork approval has notes to the customer associated with it.
- artwork.production_notes: the list of notes to the customer added to an artwork approval.
- {{ note.created_at | date: "%d/%b/%Y" }}: the date on which a note to the customer in artwork approval was created.
- {{ note.content }}: the content of a note to the customer in an artwork approval.
Custom Code Example
Here is an example of how you can modify the default Order Template to show artwork approval notes to the customer:
Default Code
<div class="artwork_detail">
<h3>Details</h3>
<ul>
<li><label>Process</label><span>{{ job.process_name }}</span></li>
<li><label>Dimensions</label><span>{{ job.product_dimensions }}</span></li>
{% if job.show_digitization? %}
<li><label>Est. Stitch Count</label><span>{{ job.get_digitization_stitch_count }}</span></li>
<li><label>Thread Colors</label>{{ job.get_digitization_thread_chart_colors }}</li>
{% endif %}
</ul>
</div>
</div>
{% endfor %}
</div>
{% endif %}
</div>
Custom Code
Add the code in red to the default code shown above as follows:
<div class="artwork_detail">
<h3>Details</h3>
<ul>
<li><label>Process</label><span>{{ job.process_name }}</span></li>
<li><label>Dimensions</label><span>{{ job.product_dimensions }}</span></li>
{% if job.show_digitization? %}
<li><label>Est. Stitch Count</label><span>{{ job.get_digitization_stitch_count }}</span></li>
<li><label>Thread Colors</label>{{ job.get_digitization_thread_chart_colors }}</li>
{% endif %}
</ul>
</div>
</div>
{% endfor %}
</div>
{% endif %}
<div>
{% if artwork.has_production_notes? %}
<h2>Notes</h2>
<div class="in_artwork" style="display:block;page-break-inside:avoid;">
<h3><i style="display:inline-block; width:100px;">Date</i>| Notes</h3>
{% for note in artwork.production_notes %}
<div>
<ul>
<li>
<i style="display:inline-block; width:110px;">{{ note.created_at | date: "%d/%b/%Y" }}:</i> {{ note.content }}<br><br>
</li>
</ul>
</div>
{% endfor %}
</div>
{% endif %}
</div>
</div>
Result

How to Include the Production Date in the Order Template
You can use the order.date_scheduled variable to show the production date in the Order Template.
Custom Code Example
Here is an example of how you can modify the default Order Template to show the production date.
Default Code
{% else %}
<li><label>Date<label><span>{{ order.date_ordered | date: "%d/%b/%Y"}}</span></li>
{% if order.date_due %}
<li><label>Date Ship By</label><span>{{ order.date_due | date: "%d/%b/%Y"}}</span></li>
{% endif %}
{% endif %}
<li><label>Shipping</label><span>{{ order.shipping_method_name }}</span></li>
{% if order.shipping_days %}
<li><label>Maximum Delivery Days</label><span>{{ order.shipping_days }}</span></li>
{% endif %}
Custom Code
Add the code in red to the default code shown above as follows:
{% else %}
<li><label>Date<label><span>{{ order.date_ordered | date: "%d/%b/%Y"}}</span></li>
<li><label>Production Date</label><span>{{ order.date_scheduled | date: "%d/%b/%Y"}}</span></li>
{% if order.date_due %}
<li><label>Date Ship By</label><span>{{ order.date_due | date: "%d/%b/%Y"}}</span></li>
{% endif %}
{% endif %}
<li><label>Shipping</label><span>{{ order.shipping_method_name }}</span></li>
{% if order.shipping_days %}
<li><label>Maximum Delivery Days</label><span>{{ order.shipping_days }}</span></li>
{% endif %}
Result

How to Include Custom Customer and Custom Company fields in the Order Template
You can use the following variables to show custom customer fields and custom customer company fields in the Order Template.
- customer.custom_fields.field_name
- customer.company_account.custom_fields.field_name
Replace field_name with the name of the field. Use lowercase and add an underscore to replace all characters which are not letters or numbers.
Custom Code Example
Here is an example of how you can modify the default Order Template to show a custom customer company field.
Default Code
<div class="billing">
<h3>Billing Address</h3>
<h4>{{ customer.full_name }}{% if customer.company %}<br>{{ customer.company }}{% endif %}</h4>
<span>
{{customer.address}}<br />
{{customer.city}}, {{customer.state}} {{customer.country_name}} {{ customer.zip }}
</span>
<span>
PH: {{ customer.phone_number }}<br/>
Email: {{ customer.email }}
</span>
</div>
Custom Code
Add the code in red to the default code shown above as follows:
<div class="billing">
<h3>Billing Address</h3>
<h4>{{ customer.full_name }}{% if customer.company %}<br>{{ customer.company }}{% endif %}</h4>
{% if customer.has_company_account? %}
<span>
{{customer.company_account.custom_fields.billing_department}}
</span>
{% endif %}
<span>
{{customer.address}}<br />
{{customer.city}}, {{customer.state}} {{customer.country_name}} {{ customer.zip }}
</span>
<span>
PH: {{ customer.phone_number }}<br/>
Email: {{ customer.email }}
</span>
</div>
Result

How to Include Custom Shipping Address fields in the Order Template
You can use the following variable to show custom customer fields stored against an order's shipping address in the Order Template.
- order.get_shipping_detail.custom_fields.field_name
Replace field_name with the name of the field. Use lowercase and add an underscore to replace all characters which are not letters or numbers.
Custom Code Example
Here is an example of how you can modify the default Order Template to show a custom customer field specified against the shipping address.
Default Code
{% if (order.get_shipping_detail) and (order.get_shipping_detail.use_shipping_details) %}
<div class="shipping">
<h3>Shipping Address</h3>
<h4>{{ order.get_shipping_detail.full_name }}{% if order.get_shipping_detail.company %}<br>{{ order.get_shipping_detail.company }}{% endif %}</h4>
<span>
{{order.get_shipping_detail.address}}<br />
{{order.get_shipping_detail.city}}, {{order.get_shipping_detail.state}} {{order.get_shipping_detail.country_name}} {{ order.get_shipping_detail.zip }}
</span>
</div>
{% else %}
Custom Code
Add the code in red to the default code shown above as follows:
{% if (order.get_shipping_detail) and (order.get_shipping_detail.use_shipping_details) %}
<div class="shipping">
<h3>Shipping Address</h3>
<h4>{{ order.get_shipping_detail.full_name }}{% if order.get_shipping_detail.company %}<br>{{ order.get_shipping_detail.company }}{% endif %}</h4>
<span>
{{order.get_shipping_detail.address}}<br />
{{order.get_shipping_detail.city}}, {{order.get_shipping_detail.state}}
{{order.get_shipping_detail.custom_fields.locality}}
{{order.get_shipping_detail.country_name}} {{ order.get_shipping_detail.zip }}
</span>
</div>
{% else %}
Result

How to Include the Store Group Name in the Order Template
You can use the following variable to show the name of the store group in the Order Template.
- site.store_group_name
Custom Code Example
Here is an example of how you can modify the default Order Template to show the name of the store group for the store that the order originates from.
Default Code
<div class="details">
<h1>
{% if from.account.company %}{{ from.account.company }}{% endif %}
{% if from.fc_settings.company_identification_number %}<br />{{ from.fc_settings.company_identification_number }}{% endif %}
{% if from.account.has_address? %}
<span>
{{ from.account.address }} {{ from.account.city }}, {{ from.account.state }} {{ from.account.zip }}<br />
{{ from.account.country_name }}
</span>
{% endif %}
<a href="http://{{ site.primary_domain }}">http://{{ site.primary_domain }}</a>
</h1>
</div>
Custom Code
Add the code in red to the default code shown above as follows:
<div class="details">
<h1>
{% if from.account.company %}{{ from.account.company }}{% endif %}
{% if from.fc_settings.company_identification_number %}<br />{{ from.fc_settings.company_identification_number }}{% endif %}
{% if site.store_group_name %}
<p>Group: {{ site.store_group_name }}</p>
{% else %}
<p>No Group</p>
{% endif %}
{% if from.account.has_address? %}
<span>
{{ from.account.address }} {{ from.account.city }}, {{ from.account.state }} {{ from.account.zip }}<br />
{{ from.account.country_name }}
</span>
{% endif %}
<a href="http://{{ site.primary_domain }}">http://{{ site.primary_domain }}</a>
</h1>
</div>
Result

How to Identify Internal Notes from Public Notes in the Worksheet Template
You can use the following variable to show only the internal notes in Worksheet Template.
- is_internal_note?
Custom Code Example
Here is an example of how you can modify the default Worksheet Template to distinguish between internal notes and public notes that the customer can see.
Default Code
{% if order.show_notes_on_worksheet %}
{% if order.production_notes.size > 0 %}
<div id="header_order_notes">
<h3>Customer Notes</h3>
{% for note in order.production_notes %}
<div id="customer_order_notes">
{% if note.note_cat == "history" && note.message != blank %}
<p>{{ note.created_at | date: "%b %d, %Y %I:%M %p"}} - {{ note.user_name }} - {{ note.message }} </p>
{% else %}
<p>{{ note.created_at | date: "%b %d, %Y %I:%M %p"}} - {{ note.user_name }} - {{ note.content }} </p>
{% endif %}
</div>
{% endfor %}
</div>
{% endif %}
{% endif %}
Custom Code
Add/replace the code in red to the default code shown above as follows:
{% if order.show_notes_on_worksheet %}
{% if order.production_notes.size > 0 %}
<div id="header_order_notes">
{% for note in order.production_notes %}
<div id="customer_order_notes">
{% if (note.is_internal_note?) %}
<h3>Internal Notes</h3>
{% if note.note_cat == "history" && note.message != blank %}
<p>{{ note.created_at | date: "%b %d, %Y %I:%M %p"}} - {{ note.user_name }} - {{ note.message }} </p>
{% else %}
<p>{{ note.created_at | date: "%b %d, %Y %I:%M %p"}} - {{ note.user_name }} - {{ note.content }} </p>
{% endif %}
{% else %}
<h3>Customer Notes</h3>
{% if note.note_cat == "history" && note.message != blank %}
<p>{{ note.created_at | date: "%b %d, %Y %I:%M %p"}} - {{ note.user_name }} - {{ note.message }} </p>
{% else %}
<p>{{ note.created_at | date: "%b %d, %Y %I:%M %p"}} - {{ note.user_name }} - {{ note.content }} </p>
{% endif %}
{% endif %}
</div>
{% endfor %}
</div>
{% endif %}
{% endif %}
Result


How to Include the list of used decoration processes in the Order Template
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.
Custom Code Example
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>
Result

How to Include a list of batch order numbers in the Production Worksheet
You can use the site.batch_production_invoice_numbers variable to show a comma-separated list of order numbers that are included in a given batch production worksheet.
Custom Code Example
Here is an example of how you can modify the default Worksheet Template to show a comma-separated list of batch order numbers.
Default Code
{% elsif order.confirmed_balance > 0 %}
<div class="red">Awaiting Payment Confirmation</div>
{% else %}
<div class="green">Paid In Full</div>
{% endif %}
{%endif %}
</div>
</div>
<div id="header_order">
<span style="float:left; padding:0px 10px;"><b>{{ customer.full_name }}</b> | {{ customer.company }}</span>
<span style="float:right; padding:0px 10px;"><span style="font-size:13px; text-transform: uppercase;">Production order #:</span> {{order.order_number}}</span>
</div>
Custom Code
Add the code in red to the default code shown above as follows:
{% elsif order.confirmed_balance > 0 %}
<div class="red">Awaiting Payment Confirmation</div>
{% else %}
<div class="green">Paid In Full</div>
{% endif %}
{%endif %}
</div>
</div>
<div id="header_order">
<span style="float:left; padding:0px 10px;"><b>Batch Production</b></span>
</div>
<div>
<h3>Order Numers</h3>
<p>{{ site.batch_production_invoice_numbers }}</p></br>
</div>
<div id="header_order">
<span style="float:left; padding:0px 10px;"><b>{{ customer.full_name }}</b> | {{ customer.company }}</span>
<span style="float:right; padding:0px 10px;"><span style="font-size:13px; text-transform: uppercase;">Production order #:</span> {{order.order_number}}</span>
</div>
Result

How to Include notes set against a customer/company in the Production Worksheet
You can use the customer.internal_notes and customer.company_account.internal_notes variables to show the internal notes set against a customer and notes against a company in the production worksheet respectively.
Custom Code Example
Here is an example of how you can modify the default Worksheet Template to show notes set against a customer/company.
Default Code
<div id="header_order_details_2">
<ul>
<li><label>Order date: </label>{{ order.date_ordered | date: "%b %d, %Y" }}</li>
<li><label>Due date: </label><span class="highlight">{{ order.date_due | date: "%b %d, %Y"}}</span></li>
<li><label>Ship by: </label><span class="highlight">{{ order.shipping_method_name }}</span></li>
</ul>
</div>
</div>
{% if order.show_notes_on_worksheet %}
{% if order.production_notes.size > 0 %}
<div id="header_order_notes">
<h3>Customer Notes</h3>
{% for note in order.production_notes %}
<div id="customer_order_notes">
{% if note.note_cat == "history" && note.message != blank %}
<p>{{ note.created_at | date: "%b %d, %Y %I:%M %p"}} - {{ note.user_name }} - {{ note.message }} </p>
{% else %}
<p>{{ note.created_at | date: "%b %d, %Y %I:%M %p"}} - {{ note.user_name }} - {{ note.content }} </p>
{% endif %}
</div>
{% endfor %}
</div>
{% endif %}
{% endif %}
{% if order.invoice_note %}
<div id="header_order_notes">
<h3>Order notes</h3>
<p>{{ order.formatted_invoice_note }}</p>
</div>
Custom Code
Add/replace the code in red to the default code shown above as follows:
<div id="header_order_details_2">
<ul>
<li><label>Order date: </label>{{ order.date_ordered | date: "%b %d, %Y" }}</li>
<li><label>Due date: </label><span class="highlight">{{ order.date_due | date: "%b %d, %Y"}}</span></li>
<li><label>Ship by: </label><span class="highlight">{{ order.shipping_method_name }}</span></li>
</ul>
</div>
</div>
{% if order.show_notes_on_worksheet %}
{% if order.production_notes.size > 0 %}
<div id="header_order_notes">
<h3>Internal Notes</h3>
{% for note in order.production_notes %}
<div id="customer_order_notes">
{% if note.note_cat == "history" && note.message != blank %}
<p>{{ note.created_at | date: "%b %d, %Y %I:%M %p"}} - {{ note.user_name }} - {{ note.message }} </p>
{% else %}
<p>{{ note.created_at | date: "%b %d, %Y %I:%M %p"}} - {{ note.user_name }} - {{ note.content }} </p>
{% endif %}
</div>
{% endfor %}
</div>
{% endif %}
{% if customer.internal_notes.size > 0 %}
<div id="header_order_notes">
<h3>Customer Notes</h3>
{% for note in customer.internal_notes %}
<div id="customer_order_notes">
{% if note.note_cat == "history" && note.message != blank %}
<p>{{ note.created_at | date: "%b %d, %Y %I:%M %p"}} - {{ note.user_name }} - {{ note.message }} </p>
{% else %}
<p>{{ note.created_at | date: "%b %d, %Y %I:%M %p"}} - {{ note.user_name }} - {{ note.content }} </p>
{% endif %}
</div>
{% endfor %}
</div>
{% endif %}
{% endif %}
{% if order.invoice_note %}
<div id="header_order_notes"><h3>Order notes</h3><p>{{ order.formatted_invoice_note }}</p></div>
Result

How to Include the artwork job description in the Artwork Approval Form
You can use the job.comments variables to show the job description in the artwork approval form.
Custom Code Example
Here is an example of how you can modify the default Artwork Approval Template to show the job description for each job.
Default Code
{% if artwork.has_jobs? %}
<div class="artwork_jobs" style="display:block;page-break-inside:avoid;{% unless artwork.is_general_job? %}page-break-before: always;{% endunless %}">
<h2>Artwork Jobs</h2>
{% for job in artwork.jobs %}
<div class="in_artwork" style="display:block;page-break-inside:avoid;">
<div class="artwork_image" style="text-align: center;">
<h3>Job #{{ job.number }}: {{ job.name }} </h3>
<div class="image">
<img style="{% if job.wide? %}width{% else %}height{% endif %}:580px" src="{{ job.big_image_url }}" alt="[]" />
</div>
</div>
<div class="artwork_detail">
<h3>Details</h3>
<ul>
<li><label>Process</label><span>{{ job.process_name }}</span></li>
<li><label>Dimensions</label><span>{{ job.product_dimensions }}</span></li>
{% if job.show_digitization? %}
<li><label>Est. Stitch Count</label><span>{{ job.get_digitization_stitch_count }}</span></li>
<li>
<label>Thread Colors</label>
{{ job.get_digitization_thread_chart_colors }}
</li>
{% endif %}
</ul>
</div>
</div>
{% endfor %}
</div>
{% endif %}
Custom Code
Add the code in red to the default code shown above as follows:
{% if artwork.has_jobs? %}
<div class="artwork_jobs" style="display:block;page-break-inside:avoid;{% unless artwork.is_general_job? %}page-break-before: always;{% endunless %}">
<h2>Artwork Jobs</h2>
{% for job in artwork.jobs %}
<div class="in_artwork" style="display:block;page-break-inside:avoid;">
<div class="artwork_image" style="text-align: center;">
<h3>Job #{{ job.number }}: {{ job.name }} </h3>
<div class="image">
<img style="{% if job.wide? %}width{% else %}height{% endif %}:580px" src="{{ job.big_image_url }}" alt="[]" />
</div>
</div>
<div class="artwork_detail">
<h3>Details</h3>
<ul>
<li><label>Process</label><span>{{ job.process_name }}</span></li>
<li><label>Dimensions</label><span>{{ job.product_dimensions }}</span></li>
{% if job.show_digitization? %}
<li><label>Est. Stitch Count</label><span>{{ job.get_digitization_stitch_count }}</span></li>
<li>
<label>Thread Colors</label>
{{ job.get_digitization_thread_chart_colors }}
</li>
{% endif %}
<li><label>Description</label><span>{{ job.comments }}</span></li>
</ul>
</div>
</div>
{% endfor %}
</div>
{% endif %}
Result
How to Include the customer details in the Artwork Approval Form of standalone artwork job
You can use the following variables to show the customer details in the artwork approval form when the artwork job is not associated with an order.
- artwork.artwork_customer.full_name: the full name of the customer
- artwork.artwork_customer.company: the name of the company the customer belongs to
- artwork.artwork_customer.full_address: the customer's full address
- artwork.artwork_customer.phone_number: the customer's phone number
- artwork.artwork_customer.email: the customer's email address
Custom Code Example
Here is an example of how you can modify the default Artwork Approval Template to show the customer's details when the artwork approval is not associated with an order.
Default Code
{% if artwork.order %}
<div class="order">
<ul>
<li><label>Date</label><span>{{ artwork.order.date_ordered | date: "%d/%b/%Y"}}</span></li>
</ul>
</div>
{% endif %}
</div>
</div>
Custom Code
Add the code in red to the default code shown above as follows:
{% if artwork.order %}
<div class="order">
<ul>
<li><label>Date</label><span>{{ artwork.order.date_ordered | date: "%d/%b/%Y"}}</span></li>
</ul>
</div>
{% endif %}
</div>
</div>
<div id="in_customer">
<h3>Customer</h3>
<h4>{{ artwork.artwork_customer.full_name }}<br>{{ artwork.artwork_customer.company }}</h4>
<span>
{{ artwork.artwork_customer.full_address }}
</span>
<span>
PH: {{ artwork.artwork_customer.phone_number }}<br/>
Email: {{ artwork.artwork_customer.email }}
</span>
</div>
Comments
0 comments
Please sign in to leave a comment.