#set ( $customer = $order.customer ) #set ( $orderid = $order.getId() ) #set ( $shippingAddress = $order.getShippingAddress() ) #set ( $billingAddress = $order.getBillingAddress() ) #set ( $searcherManager = $store.getSearcherManager() ) #set ( $orderNumber = $order.orderNumber ) #set ( $shipments = $order.getShipments() ) #set ( $isFullyShipped = $order.isFullyShipped() ) #set ( $sSize = $shipments.size() )

Shipping History

Order ID: $orderid

#if ( $sSize > 0)

Order Status: #if ($isFullyShipped == "false") Partially Shipped #else Shipped #end

Shipment Details per Product.

#else

No shipments for this order

#end #if ( $sSize > 0) #set($itemCounter = 0) #foreach ( $item in $order.getItems() ) #set( $productid = $item.getProduct().getId()) #set( $itemCounter = $itemCounter + 1 ) #if ( ($itemCounter % 2) == 0 ) #else #end #set( $product = $store.getProductSearcher().searchById($productid) ) #set( $path="$apphome/products/${store.getProductPathFinder().idToPath($productid)}.html" ) #foreach ( $shipment in $shipments ) #if ( $shipment.containsEntryForSku($product.get("manufacturersku")) ) #set($entry = $shipment.getEntryForSku($product.get("manufacturersku"))) #if ( ($itemCounter % 2) == 0 ) #else #end #set($waybill = "") #end #end #end
Product SKU Product ID Quantity Ordered Waybill Number Quantity
Shipped
$product.get("manufacturersku")$product.getName() $item.quantity    
  #set($waybill = $shipment.get("waybill")) #if (!$waybill.equals("") && $waybill.length()>0) $waybill #else N/A #end $entry.getQuantity()
#foreach ( $shipmentEntry in $shipments ) #set( $shipCounter = $shipCounter + 1 ) #end

Shipment Details per Waybill.

#set( $types = $searcherManager.getList($catalogid ,"itemstatus") ) #set( $shipCounter = 0) #foreach ( $shipment in $shipments ) #set( $shipCounter = $shipCounter + 1 ) #set( $waybill = $shipment.get("waybill") ) #set( $courier = $shipment.get("courier") ) #set( $shipdate = $shipment.get("shipdate") ) #if ( ($shipCounter % 2) == 0 ) #else #end #if (!$waybill.equals("") && $waybill.length()>0) #else #end #foreach ( $item in $order.getItems() ) #set( $productid = $item.getProduct().getId()) #set( $product = $item.getProduct()) #set( $productsku = $product.get("manufacturersku")) #if ( $shipment.containsEntryForSku($productsku) ) #set( $entry = $shipment.getEntryForSku($productsku) ) #set( $product = $store.getProductSearcher().searchById($productid) ) #if ( ($shipCounter % 2) == 0 ) #else #end #end #end #set($waybill = "") #set($productid = "") #set($productsku = "") #end
Waybill Number Product SKU Product Name Quantity
Shipped
$waybillN/A 
  $productsku $product.getName() $entry.getQuantity()
#end