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.
Shipping Label Date Configured Custom Code Example
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
Packing Slip Date Configured Custom Code Example
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>
Comments
0 comments
Please sign in to leave a comment.