Exemplo n.º 1
0
 /**
  * Merge
  *
  * @param \XLite\Model\Cart $cart Cart
  *
  * @return \XLite\Model\Cart
  */
 public function merge(\XLite\Model\Cart $cart)
 {
     if (!$cart->isEmpty()) {
         foreach ($cart->getItems() as $item) {
             $cart->getItems()->removeElement($item);
             $item->setOrder($this);
             $this->addItems($item);
         }
     }
     $this->updateOrder();
 }
Exemplo n.º 2
0
 /**
  * {@inheritDoc}
  */
 public function isEmpty()
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'isEmpty', array());
     return parent::isEmpty();
 }