Esempio n. 1
0
 /**
  * Add Shipping
  *
  * @return void
  */
 protected function addShipping()
 {
     $shipping = $this->cart->getShipping();
     /**
      * Order Shipping
      * @var $orderShipping \Extcode\Cart\Domain\Model\Order\Shipping
      */
     $orderShipping = $this->objectManager->get('Extcode\\Cart\\Domain\\Model\\Order\\Shipping');
     $orderShipping->setPid($this->storagePid);
     $orderShipping->setServiceId($shipping->getId());
     $orderShipping->setName($shipping->getName());
     $orderShipping->setStatus($shipping->getStatus());
     $orderShipping->setGross($shipping->getGross());
     $orderShipping->setNet($shipping->getNet());
     $orderShipping->setTaxClass($this->taxClasses[$shipping->getTaxClass()->getId()]);
     $orderShipping->setTax($shipping->getTax());
     $orderShipping->setNote($shipping->getNote());
     $this->shippingRepository->add($orderShipping);
     $this->orderItem->setShipping($orderShipping);
 }