Ejemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 public function process(OrderInterface $order)
 {
     if ($order->isEmpty()) {
         $order->removeShipments();
         return;
     }
     $shipment = $this->getOrderShipment($order);
     if (null === $shipment) {
         return;
     }
     foreach ($order->getItemUnits() as $itemUnit) {
         if (null === $itemUnit->getShipment()) {
             $shipment->addUnit($itemUnit);
         }
     }
 }