예제 #1
0
 public function transfer(OrderInterface $from, OrderInterface $to)
 {
     foreach ($from->getItems() as $item) {
         if ($item instanceof OrderItemInterface) {
             $product = $item->getProduct();
             $quantity = $item->getQuantity();
             if ($product) {
                 $this->addItem($product, $quantity, $to);
             }
         }
     }
 }