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.
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
Still have questions? Use the Search Tool at the top of the page to find more related guides. Need help? Click the icon to submit a support ticket – our Client Services team is ready to assist!
Comments
0 comments
Please sign in to leave a comment.